VALYNOX
VALYNOXSTRATEGY RESEARCH TECHNOLOGY
AlphaPrimeAlphaPrime
ACADEMY / Strategy generation

Testing the day session after a big TAIEX night rally

A big TAIEX futures night rally can be written as a rule and tested. But you cannot buy the night move or the opening gap, so a rule can earn only from the next day session's open to close. Define a big rally in percent, test continuation and retracement side by side on the same events, look at the sample size after costs, then use stress checks to confirm the result is not carried by a handful of trades.

By · Published · updated · Editorial policy

Contents
  1. After a big TAIEX futures night rally, does the next day session keep rising?
  2. How do you define a big night rally? In points or in percent?
  3. How do you measure the gap from the night session close to the next day session open?
  4. Continuation or retracement: how big a sample counts?
  5. Is the night session move related to US stocks?
  6. With few events that cluster, how do you avoid being fooled by the results?
  7. Which numbers should you read on the report when you actually run the test?
  8. Frequently asked questions
  9. References

After a big TAIEX futures night rally, does the next day session keep rising?

After a big TAIEX futures night rally, whether the next day session continues or retracts can be written as a rule and tested. Most tests find that the night move is mostly priced in by the day session open, so all you can actually buy is the day-session move after the open. And only a few nights a year qualify as a “big rally,” so the conclusion has to rest on the number of events and the average trade after costs, not on impressions.

The night session is the TAIEX futures trading session after the day session closes. TAIFEX after-hours trading starts at 15:00 and closes at 05:00 the next day; the day session runs from 08:45 to 13:45. The exchange adjusts these hours, so go by the TAIFEX contract page for the official figures. To convert them to your own time zone, use the free Is the futures market open now? tool. For night-session hours and how holidays and settlement days differ, see TAIEX futures night session: hours, holidays and settlement.

Think of a trading day as three stretches of road. The night session travels one stretch, the market jumps another stretch while it is closed from 05:00 to 08:45, and then the day session travels the last stretch. By the time you see the signal, the first two stretches are already done. It is like wanting to board a bus after you watch it pull away. The only stretch a rule can board is the third. So this whole article rests on one claim: a big night rally is not itself a trading opportunity; the move after the next day session's open is. Whether that move leans toward continuation or retracement takes enough events to tell.

A TAIEX futures trading day has three parts: the night session from 15:00 to 05:00 is already missed, the 05:00 to 08:45 gap has no trading, and only the day session from 08:45 to 13:45 can be traded Trade day session only One trading day, three parts Night Gap Day 15:00–05:00 05:00–08:45 08:45–13:45 Missed Closed Tradable Night move: signal, not a trade. So: trade open to close only.
A TAIEX futures day has three parts: you cannot buy the night-session gain or the gap before the open, so a rule can trade only the next day session.

How do you define a big night rally? In points or in percent?

Define a big rally as a percentage, measured from the prior day session close. This compares best across years. How high you set the threshold directly decides how many events you get, and the threshold must be written down before you look at results. A big night rally means the night session close is above the prior day session close by more than your pre-set threshold. The base is the day session close rather than the night session open because the day session close is the last fully traded reference price for the whole market, while the night session open may already have gapped.

The problem with a points threshold is that its meaning changes with the index level. The same 200 points is 2% when the index is at 10,000 and only 1% when it is at 20,000. A “big rally” defined in points is rare in low-index years and common in high-index years, so the event distribution you count is really just a side effect of the index rising. A percentage threshold means the same thing in every year, so events from different years can be pooled and compared.

Comparison itemPercentage threshold (recommended)Points threshold
Comparable across yearsSame meaning every yearAfter the index doubles, the same points are half the size
How events are distributedFollows how volatile the market wasSkews toward high-index years
Converting to profit and lossMultiply by the index level at the time to get pointsMaps directly to value per point
Best used forDefining the signal, screening eventsSetting stop losses, sizing positions
The same 200-point night move is 2% when the index is at 10,000 and only 1% at 20,000, so cross-year comparisons need a percentage threshold Same points, half the size 200 points at two index levels 10,000 200 points = 2% 20,000 200 points = 1% Higher index, less per point. So: define big moves in percent.
A higher threshold means fewer events. A fixed number of points is a different size at different index levels, so only percentages compare across years.

The level of the threshold is a trade-off. At 1% you get many events, but many are just ordinary moves. At 2% every event is big enough, but after several years you may be left with a dozen or so. The way to handle it is to write down a main threshold first (for example 1.5%), then two neighboring thresholds (1% and 2%) for the stress checks later. All three numbers are decided before you run any test. If you look at results first and then pick a threshold, you are picking the best-looking of several candidates, and the result will be overstated. TAIEX Futures Night vs Day Session Statistics, 2017–2026 gives the historical distribution of night-session moves, so you can see how big a typical move is before you set a threshold.

How do you measure the gap from the night session close to the next day session open?

Split each event into three parts and count them separately: the night-session gain, the gap from the night session close to the day session open, and the move from the day session open to the close. You cannot buy the first two, so a rule can earn only from the third. The gap is the price difference between the night session close (05:00) and the next day session open (08:45). Nothing trades during those three hours and forty-five minutes, so news from the European morning session and ahead of the Asian stock open goes straight into the opening price.

  1. Night-session gain = night session close − prior day session close. This is the signal itself, used to decide whether the event qualifies.
  2. Opening gap = day session open − night session close. This part decides how far your entry price is from the signal price, and it often eats or reverses part of the night-session gain.
  3. Day-session move = day session close − day session open. This is the only part a rule can earn, and both continuation and retracement are judged on it.

Hypothetical example

The prior day session closes at 20,000 points and the night session closes at 20,300, a night-session gain of +300 points (+1.5%), which meets the threshold. The next day session opens at 20,280, an opening gap of −20 points. The day session closes at 20,350, a day-session move of +70 points. The event as a whole rose 350 points, but a continuation rule that buys at the open and exits at the close captures only 70 points. At NT$50 per point for Mini-TAIEX (MXF), the gross profit is NT$3,500. If the round-trip cost (commission, tax and slippage combined) is assumed to be NT$200, net profit is about NT$3,300.

A hypothetical event in three parts: the night session rises 300 points, the opening gap is −20 points, the day session rises 70 points, and only the day-session part is tradable for the rule You capture +70 points Hypothetical event, in points Night +300 Gap −20 Day +70 tradable Event: +350. You get 70. So: judge the rule on the day move.
The same event split into three parts: night-session gain, opening gap and day-session move. Only the last part is tradable for a rule (see the hypothetical example above for the numbers).

NT$50 per point for Mini-TAIEX (MXF) is the contract specification published by TAIFEX. The exchange can adjust it, so go by the contract page for the figure. To convert the value per point of other contracts, use the free Futures contract and profit calculator. There are two things to confirm in the data. First, which bar to use for the night session close: the last trade at 05:00 is not always the same as the after-hours reference price the exchange publishes, and TAIEX futures night close: which price should a backtest use? explains the difference. Second, if you use full-session daily bars (night and day combined), the night session and the next day session are merged into one bar and the three parts cannot be separated. So this test needs intraday data split by session, or separate day-session and night-session series.

Continuation or retracement: how big a sample counts?

Test the continuation rule and the retracement rule on the same events, with the same commission and slippage, side by side. The average trade after costs should be several times the round-trip cost, and fewer than a few dozen events is only a clue. The continuation rule is: after a big night rally, buy the next day session open and exit at the close, betting that the day session extends the night session's direction. The retracement rule is its mirror: sell short at the open and cover at the close, betting that the day session gives back the night rally. On the same events the two rules have exactly opposite gross profit and loss. The only difference is that costs are deducted from both, so on the same events both rules cannot be positive after costs.

ItemContinuation ruleRetracement rule
EntryBuy at the day session openSell short at the day session open
ExitClose the position at the day session closeCover at the day session close
Bets thatThe day session moves the same way as the night sessionThe day session gives back the night rally
What a pass looks likeAverage trade after costs is several times the round-trip costSame as left, using the same events and the same costs
Minimum number of eventsFewer than about 30 is only a clue; a hundred or more is worth trustingSame as left
On the same set of events, the gross result of the continuation rule is exactly the mirror of the retracement rule, and both pay the same costs, so both cannot be profitable after costs Two rules, same events Gross results mirror each other Continuation + Gross Retrace − Gross Costs Same costs on both sides Same events: both can't win. So: test both at the same cost.
Continuation and retracement are mirrors on the same events. Compare them side by side with the same costs, rather than testing each on its own.

To see why sample size matters, imagine judging whether a coin is fair from ten flips. Seven heads and three tails is common and does not mean the coin is off. If you still get seven to three after a hundred flips, that is worth doubting. The same applies to the average trade, and there is only one formula worth remembering:

Uncertainty of the average trade = spread of single-trade results ÷ √N

Here, the “spread of single-trade results” is how far each trade result typically sits from the average (the standard deviation). N is the number of events, and √N is its square root. A square root grows slowly: you need four times as many events to cut the uncertainty in half. Single-trade results after a big night rally are widely spread (the day session after a big rally is volatile to begin with), so an average trade computed from 20 events has not yet settled even on its sign. At a 1.5% threshold, TAIEX futures may have only a few to a dozen or so events a year. Reaching a hundred or more takes more than ten years of night-session data, and the TAIEX futures night session only started in 2017. That is an inherent limit of this topic.

The night session overlaps almost entirely with US cash trading hours, and TAIEX futures night moves mostly just follow US stocks. So the test should check whether a “big night rally” carries any information beyond “US stocks closed higher.” US cash trading runs 09:30 to 16:00 ET. In Taiwan time that is 22:30 to 05:00 the next day in winter and 21:30 to 04:00 the next day in summer. In winter the US close falls exactly at the 05:00 night session close, so the night session close has already absorbed the whole US session. In summer the night session trades one hour longer than the US close.

Taiwan winter time, TAIEX futures night session 15:00 to 05:00, US cash 22:30 to 05:00, so the second half of the night session overlaps with US trading Big night rally ≈ big US rally Taiwan time, winter Overlap TX Night session US stocks Cash 15:00 22:30 05:00 Most of the night is US hours. So: check against the US close.
The second half of the TAIEX futures night session overlaps with US cash hours, and a big night rally is mostly a copy of a big US rally.

What this means for the test: if the next day session's performance can be explained by “how much US stocks rose last night,” then “big night rally” has no value of its own as a signal, and as a rule you are just trading the US close the long way round. The check is to split events into two groups and compare them side by side:

  1. Big night rally and US stocks also up big that day: this group is the norm. Look at the average trade of the next day session move.
  2. Big night rally but US stocks flat or up a little: this group reflects Taiwan's own news or capital flows. It will have fewer events, but only if the next day session behaves clearly differently from the first group does the night signal carry information beyond US stocks.

You can also run it the other way around: on nights when US stocks rose big but the night session did not keep up, how does the next day session go? If the next day session differs between the two splits only within the range of noise, the more honest conclusion is “this is a US stock rule, not a night session rule.” Then use the US close move directly as the condition, which gives you more events and a cleaner definition.

With few events that cluster, how do you avoid being fooled by the results?

Big night rally events are concentrated in a few volatile months, and a handful of trades can decide the whole result. So confirm it with stress checks: remove the biggest few winners, double the slippage, change the threshold. The market does not produce a 1.5% night rally every month. They show up in strings, in the weeks of a rebound after a sharp drop, a major policy move or a surge in US stocks, and there may be no event at all for half a year in between. This means your “hundred or more events” really come from only three or four market episodes that are highly correlated with each other, and the effective sample is much smaller than the number on paper.

Schematic: night rally events over several years crowd into three short volatile periods with long calm stretches between, and removing the five biggest winners can turn the total from profit to loss Events come in clusters Big-rally nights over a few years Schematic Calm Calm Remove top 5 Profit Loss Five trades can flip the result. So: remove big winners, retest.
Big rally events come in strings during a few volatile periods, and removing the biggest few winners can flip the overall result from positive to negative.

The purpose of a stress check is to try to break the result yourself before you trust it. Write down the pass standard for each of the four checks below before you run it:

  1. Remove the five biggest winners: if the total turns from positive to negative, a few trades are carrying the result, not the rule.
  2. Double the slippage: the bid-ask spread in the first minute after the day session open is often wider than usual, and wider still the day after a big rally. The result holds up only if it stays positive with the slippage doubled.
  3. Change the threshold: rerun with the 1% and 2% you wrote down in advance. The results at all three thresholds should point the same way. A rule that works only at 1.5% is most likely a coincidence.
  4. Split by year: look at the number of events and the average trade in each year. If all the profit comes from one year, you have only tested one market episode.

Bailey et al. (2014) point out that the more variants you try on the same data, the more the best-looking one is overstated, and Harvey and Liu (2015) suggest discounting results by the number of tests. With this topic everyone is tempted to try a few more thresholds and a few more exits, so writing down the main threshold, the neighboring thresholds and the pass standard before you start is the cheapest defense. If you are building your research process from scratch, Program trading for TAIEX futures: zero to first strategy, no coding lays out the order of rule definition, data and validation.

Which numbers should you read on the report when you actually run the test?

When you run the rule in a research tool, first fix the data range, the fill on the next bar, commission and slippage. Then read net profit, maximum drawdown, number of trades and average trade in that order, and last look at the shape of the out-of-sample (OOS) part of the equity curve. A fill on the next bar means the rule decides at the close of one bar and the order fills at the open of the next bar, which matches the flow of deciding at the night session close and entering at the day session open. Night session data for TAIEX futures is usually Mini-TAIEX (MXF) data. For the details of liquidity and session settings, see Mini-TAIEX night session: hours, liquidity and how to backtest it. In its backtest, AlphaPrime (Valynox) evaluates every candidate rule with the same commission, slippage and fill on the next bar, so the ranking you see is already net of costs and you do not have to add them afterward.

  1. Net profit: the total of closed trades after costs. Looking at it alone can mislead you when a few big trades drive it.
  2. Maximum drawdown: the largest fall of the equity curve from a high to a low. This is the number you actually have to sit through.
  3. Number of trades: this matches the event count above and decides whether the average trade can be trusted.
  4. Average trade: net profit divided by the number of trades. Compare it with the round-trip cost. If the multiple is not big enough, you do not need to look at the other numbers.
  5. Equity curve and out-of-sample: look at whether the slope of the out-of-sample part clearly flattens or turns, rather than only the summary numbers.

So you can see what these numbers look like on a real report, here is an actual AlphaPrime run. It does not test a big night rally rule. The market is NQ (Nasdaq-100 futures) daily bars, not TAIEX futures. The range is 2019-01-02 to 2025-06-30, long and short, 1 contract. The rule is a stand-in built from a standard indicator (Gamma-Smoothed RSI, using only it for entries and exits, with no stop loss, profit target or filter). The search kept this result out of 1,024 candidates, ranked by return to drawdown. Picking the best one after the fact makes the numbers look good on its own. So it is only an example for reading a report. It is not the result of a night rally rule, and it is not income anyone can expect.

Source: AlphaPrime product engine (CPU), run 2026-10-31. NQ daily, 2019-01-02 to 2025-06-30, long and short, 1 contract, commission $20 and slippage $10 per trade.

NumberResult
Net profit (closed trades)$90,145
Max drawdown$28,805
Trades81
Win rate60.49%
Profit factor1.878
Average trade$1,112.9
Time in market9.05%

Read this table in the order above. Net profit of $90,145 against a maximum drawdown of $28,805: the drawdown is about one third of net profit. 81 trades counts, by the standard above, as more than a clue but not yet a hundred. The average trade of $1,112.9 against a cost of $30 per trade is dozens of times larger. Cost is not the risk in this result; the small number of trades and the after-the-fact selection are. Time in market of 9.05% means the strategy is flat most of the time, which, like a big night rally rule, is typical of event-driven rules.

Schematic: the equity curve rises steeply in the in-sample part and flattens in the out-of-sample part, and the drawdown below gets deeper after the split point Does the OOS slope hold? Schematic: equity, then drawdown In-sample Out-of-sample Equity Drawdown Flat out-of-sample: edge fading. So: read the OOS, not the total.
Look at whether the slope of the equity curve flattens or turns in the out-of-sample part, then compare the drawdown depth below it, rather than only the final net profit. NQ · Daily · 2019-01-02 to 2025-06-30 · CPU engine backtest

For a next step, work with your own data. Open your Mini-TAIEX (MXF) data split by session, use the prior day session close as the base, and count how many nights in recent years had a night-session gain above 1.5%. If there are fewer than 30, lower the threshold to 1% or lengthen the data range before you talk about testing. If there are enough, split out the gap and the day-session move as in the gap section above, and run continuation and retracement side by side.

Frequently asked questions

After a big TAIEX futures night rally, why is the next day session open different from the night session close?

Nothing trades between the night session close at 05:00 and the day session open at 08:45. During that time, news from the European morning session and ahead of the Asian stock open, along with currency moves, goes straight into the day session open, which creates a gap. The gap can go the same way as the night session or the opposite way. So count the night-session gain and the gap separately, and you will know where the rule's starting point is when it enters at the open.

What percentage is a reasonable threshold for a big night rally?

No single number is the right one. What matters is that the threshold is written down before you look at results, together with two neighboring thresholds for the stress checks. At 1% there are many events but many are just ordinary moves, and at 2% every one is big enough but after several years you may have only a dozen or so. You can look at the historical distribution of night-session moves first and pick a size that shows up only a few times a year as the main threshold.

Is the TAIEX futures night session move related to US stocks? How do you check?

The relationship is strong. The second half of the night session overlaps with US cash trading hours, and in winter the two even close together at 05:00 Taiwan time. To check, split the big night rally events into two groups, “US stocks also up big that day” and “US stocks flat,” and compare the next day session move. If the two groups are about the same, the night signal carries no information beyond US stocks, and you may as well use the US close move as the condition directly.

With very few big night rally events, is a backtest still meaningful?

Yes, but treat it as a clue, not a conclusion. With fewer than about 30 events, even the sign of the average trade has not settled. Events also often come in strings during a few volatile periods, so the event count on paper overstates the effective sample. Remove the biggest few winners, double the slippage and rerun at the neighboring thresholds. Only if all three hold up is it worth going further.

Can you use Mini-TAIEX (MXF) night session data to test a big night rally in TAIEX futures?

Yes. Mini-TAIEX (MXF) and TAIEX futures (TX) track the same index, so the night-session percentage move is almost the same, and most Taiwan traders also use Mini-TAIEX (MXF) data when they backtest the night session. The differences are the value per point and commission. When you work out net profit, use the Mini-TAIEX (MXF) contract specifications and your own fee rate, and use intraday data split by session, not full-session daily bars (night and day combined) that merge the night session and the day session.

References

  • Taiwan Futures Exchange. Mini-TAIEX Futures. https://www.taifex.com.tw/enl/eng2/mTX
  • 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.
  • Harvey, C. R., & Liu, Y. (2015). Backtesting. The Journal of Portfolio Management, 42(1), 13–28.