TAIEX futures strategy backtest: testing it realistically
A realistic TAIEX futures backtest uses the contract you will trade, a clear roll rule, a deliberate session choice, full Taiwan costs on every trade, and a verdict based only on out-of-sample data.
By Soren Huang · Published · updated · Editorial policy
Contents
- What does a realistic 台指期 backtest need?
- Which contract should you test: TX, MTX or TMF?
- How do day and night sessions change your 台指期 data?
- How do you handle rolls and build a continuous series?
- What do fees, tax and slippage cost per trade in Taiwan?
- How should you validate a 台指期策略?
- What can a TAIEX futures backtest not tell you?
- Frequently asked questions
- References
What does a realistic 台指期 backtest need?
To backtest TAIEX futures (台指期) realistically, pick the contract you will actually trade, build a continuous series with a clear roll rule, decide whether night-session bars belong in the test, charge commission, the 0.002% futures transaction tax and slippage on every trade, and judge the strategy only on data it was not tuned on.
TAIEX futures (台指期貨, often shortened to 台指 or 台股期指) are cash-settled futures on the Taiwan Stock Exchange Capitalization Weighted Stock Index, traded on the Taiwan Futures Exchange (TAIFEX). A backtest of them is only as good as five decisions you make before the first run:
- Which contract the results are measured in.
- Which trading sessions the bars contain.
- How expiring months are joined into one price history.
- What each trade costs.
- Which part of the history is kept back for testing.
If you want a short settings list to check before a run, see the TAIEX futures backtest checklist.
Which contract should you test: TX, MTX or TMF?
Research the strategy on the index price, then measure costs and position size in the contract you will trade, because all three contracts follow the same index but differ in size and cost per point.
TAIFEX lists three TAIEX futures sizes. The big contract (大台指, code TX) is the original. The mini (小台指, MTX) and the micro (微台指, TMF) are smaller versions of the same contract.
| Contract | Common name | Value of one index point | Listed since | What it means for research |
|---|---|---|---|---|
| TX | 大台指 / 大台 | NT$200 | 1998 | Longest price history; fixed costs are the smallest share of each point |
| MTX | 小台指 / 小台 | NT$50 | 2001 | One quarter of TX; long history; finer position sizing |
| TMF | 微台指 | NT$10 | 2024 | One twentieth of TX; very fine sizing; short history of its own |
The minimum price move (tick) is one index point for all three. The prices of the three contracts move almost together, so the TX price series is a reasonable stand-in for the index when you look for signals. The difference shows up in costs. A broker charges commission per contract, and that fee does not shrink as much as the contract does. In index points, a TMF trade therefore usually costs more than a TX trade. The free futures contract calculator covers TX, MTX and TMF with commissions, so one sample trade shows how the same fee weighs on each.
How do day and night sessions change your 台指期 data?
Decide on purpose whether your bars include the night session, because day-only and full-session bars produce different indicators, different gaps and different trades.
TAIEX futures trade in two sessions, Taipei time:
- Regular (day) session: 08:45 to 13:45, which is 300 minutes.
- After-hours (night) session: 15:00 to 05:00 the next morning, which is 840 minutes. TAIFEX added it in 2017.
Three details matter for data preparation:
- Night trades belong to the next trading day. TAIFEX counts the night session as part of the following trading day. If your daily bars are built by calendar date instead, the daily high, low and close will not match the exchange's daily figures.
- History before 2017 has no night session. A full-session test that starts earlier mixes two market structures. Either start the full-session test in 2017, or run the strategy on day-only bars across the whole history.
- The expiring contract stops early. On the last trading day, the expiring month trades only until 13:30.
A 20-period moving average on day-only bars and the same average on full-session bars are two different indicators. On day-only bars, the price gap at each 08:45 open pulls the average sharply. The full-session version moves through the night and has a smaller gap at the open. The guide to night sessions in futures backtests explains how to choose between the two.
The calendar needs attention too. Taiwan markets close for the long Lunar New Year holiday and can close on typhoon days. Check that these closures appear as gaps in your data, with no flat filler bars in their place.
How do you handle rolls and build a continuous series?
Join contract months with a fixed, written roll rule, because a rule chosen after looking at results is a hidden parameter.
A continuous contract is one price series built by joining expiring futures months end to end, so that a strategy can be tested across many years. TAIEX futures expire on the third Wednesday of the contract month, and trading is concentrated in the nearest month. Most traders roll to the next month a few days before expiry, or on the settlement day itself.
The two months rarely trade at the same price. In Taiwan the gap is often largest around the summer dividend season, when the next month usually trades well below the near month. If you join the months without adjustment, the series shows a jump that never happened in any single contract. A strategy can react to that jump as if it were a real move.
Hypothetical example
On the roll day, the near month closes at 20,000 and the next month closes at 19,850. An unadjusted continuous series drops 150 points overnight. A breakout-short rule fires on that drop and books a profit, but no account holding real contracts saw that move. A back-adjusted series removes the jump by shifting all older prices down by 150 points.
Back-adjusting changes the price level of old data, and tax and some indicators depend on the level. A practical order of steps:
- Choose the session (day-only or full) and the bar length.
- Write down the roll rule, for example "roll at the close two trading days before expiry".
- Build a back-adjusted series for the signals.
- Keep the unadjusted prices to calculate tax, which depends on the real contract value.
- Check the trades around roll days. Test results that depend on a few roll-day trades usually depend on the joining method.
What do fees, tax and slippage cost per trade in Taiwan?
Every trade pays commission, futures transaction tax and slippage on both entry and exit, and you should express all three in index points so you can compare them with the strategy's average trade.
The futures transaction tax is a Taiwan tax charged on each side of every futures trade. For stock index futures it is 0.002% of the contract value, which is the price times the value of one point. Commission (手續費) is set by your broker per contract. Slippage is the difference between the price the backtest assumed and the price you would really get. It is usually largest at the 08:45 open, around news and in thin hours of the night session.
One formula puts the three together:
Round-trip cost in points = 2 × (C ÷ M) + 2 × (0.00002 × P) + S
Here C is your commission per contract per side in NT$. M is the NT$ value of one point (200, 50 or 10). P is the index price. S is your total slippage for entry plus exit, in points. The first part shows why small contracts cost more points: the same fee is divided by a smaller M.
Hypothetical example
The index is at 20,000. Tax is then 0.4 points per side for every contract size. Assume commissions of NT$50 per side for TX, NT$25 for MTX and NT$15 for TMF, and one point of slippage per side.
| Contract | Commission (2 sides) | Tax (2 sides) | Slippage (2 sides) | Round trip |
|---|---|---|---|---|
| TX | 0.5 points | 0.8 points | 2 points | 3.3 points |
| MTX | 1.0 points | 0.8 points | 2 points | 3.8 points |
| TMF | 3.0 points | 0.8 points | 2 points | 5.8 points |
A strategy with a gross average trade of 6 points keeps 2.7 points on TX and almost nothing on TMF.
Put your own broker's commission into the formula, and rerun the test with double the slippage. If the result collapses, the strategy depends on cheap fills. The guide to trading costs in backtests and the average trade covers this stress test in more detail.
How should you validate a 台指期策略?
Judge a strategy only by its results on data that played no part in choosing it, and test it across several walk-forward windows, not one split.
Out-of-sample data is the part of the history that was kept back while you built and tuned the strategy, and was used only for the final test. Walk-forward analysis is a repeated version of that idea: tune on one window, test on the next unseen window, move forward, and join the unseen pieces into one result. The guide to walk-forward analysis and window choice explains the setup.
This matters most when you test many variants. Picking the best of many backtests is like picking the luckiest of many coin-tossers: the winner looks skilled, but much of the result is chance. Research on backtest overfitting and data snooping shows that the best in-sample result is expected to look better than its future performance (White, 2000; Bailey et al., 2014; Bailey & López de Prado, 2014).
| Check | A result you can work with | A result to drop |
|---|---|---|
| Out-of-sample after costs | Positive, and a clear share of the in-sample result remains | Positive only in sample |
| Walk-forward windows | Most windows positive, and the worst window is survivable | One or two windows produce all the profit |
| Trade count | Dozens of trades in each test window | A handful of trades |
| Neighbouring parameters | Nearby values give similar results | Only one exact value works |
| Market conditions | Survives fast sell-offs such as March 2020 and quiet ranges | Works in one type of market only |
| Session and contract | Holds on the session and contract you will trade | Works only on day-only TX bars when you plan to trade TMF at night |
In AlphaPrime (Valynox), strategy validation offers Basic, Standard and Extensive validation levels, walk-forward analysis and thresholds you set yourself. A strategy that fails one check skips the later ones.
What can a TAIEX futures backtest not tell you?
A backtest describes how rules would have behaved on past data under your assumptions, so treat it as a filter for ideas, not as a forecast.
Use these points to decide how much weight a result deserves:
- The market structure changes. The night session started in 2017 and TMF in 2024. A result that comes mainly from years before such a change may describe a different market.
- Fills are estimates. A bar backtest does not know the order book. Compare your first live fills with the backtest's assumed prices and update the slippage figure.
- Gaps go past stops. A stop placed at 13:44 can fill far away after the 15:00 open, or after a long holiday. Bar data shows the gap but cannot show where you would have been filled inside it.
- Your search is part of the result. Write down how many variants you tested. The more you tried, the more you should discount the best one.
What this means if you use AlphaPrime: set the TAIEX futures session, fees and slippage in GPU backtesting before the first search (next-bar execution is always applied), so that every candidate is ranked after Taiwan costs. Then hold back an out-of-sample period and let validation remove the candidates that do not survive it.
Frequently asked questions
Should I backtest 大台指 (TX) or 小台指 (MTX)?
Use the longest clean price history to find signals, which is usually TX, and then calculate costs for the contract you will trade. TX and MTX follow the same index, so signals are nearly the same. Costs in points are usually higher on MTX because commission is charged per contract.
Do I need night-session data for a 台指期回測?
You need it if you plan to hold positions or trade between 15:00 and 05:00 Taipei time. For a day-only strategy, day-only bars are cleaner and cover history from before the night session existed in 2017. Do not mix the two in one test.
How much is the futures transaction tax on TAIEX futures?
For stock index futures, Taiwan charges 0.002% of the contract value on each side of every trade. The contract value is the index price times the value of one point. In index points the tax is the same for TX, MTX and TMF at the same price.
Can a strategy built on TX data be traded on TMF?
The price signals carry over because both contracts follow the same index. The costs do not carry over: commission takes a much larger share of each point on TMF. Rerun the backtest with TMF commission before deciding.
How many years of TAIEX futures data should a backtest use?
Use enough history to contain several kinds of market, including fast sell-offs and quiet ranges, and enough trades in every test window. Keep the session structure consistent: full-session tests begin in 2017, and day-only tests can go further back.
References
- White, H. (2000). A Reality Check for Data Snooping. Econometrica, 68(5), 1097–1126.
- Bailey, D. H., Borwein, J., López de Prado, M., & Zhu, Q. J. (2014). Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance. Notices of the American Mathematical Society, 61(5), 458–471.
- Bailey, D. H., & López de Prado, M. (2014). The Deflated Sharpe Ratio: Correcting for Selection Bias, Backtest Overfitting and Non-Normality. The Journal of Portfolio Management, 40(5), 94–107.

