ACADEMY / Markets and trading sessions

TAIEX futures candlestick charts: day, night and daily bars

A TAIEX futures K bar depends on three choices: the session template, how bars align to the clock, and how contracts are joined at the roll. Set all three to match how you will trade before you trust a backtest.

By · Published · updated · Editorial policy

Contents
  1. How is a TAIEX futures candlestick chart built?
  2. How are 1-minute, hourly and daily bars formed for TXF?
  3. 1-minute bars (1 分K)
  4. Hourly bars (60 分K)
  5. Daily bars (日K)
  6. Where does the daily bar break between the night and day sessions?
  7. How do the continuous contract and the roll change the chart?
  8. Why can the chart you see differ from the data your backtest uses?
  9. How should you set bar size and sessions for TAIEX futures research?
  10. Frequently asked questions

How is a TAIEX futures candlestick chart built?

A TAIEX futures (TXF) candlestick chart groups trades into bars by time. The day session runs 08:45–13:45 and the night session runs 15:00–05:00 Taiwan time. Each bar's open, high, low and close depends on which sessions are included, how bars align to the clock, and how contract months are joined. A backtest inherits all three choices.

A K bar (K 線) is one candlestick: the first price, highest price, lowest price and last price traded during a fixed time period. Traders searching for a 台指期 K 線圖 usually look at 分K (minute bars) for entries and 日K (daily bars) for the bigger picture.

Exchanges can change trading hours and contract rules, and the TAIFEX contract page (see References) is the final word on the current values. See the sessions in your own time zone with the free futures market hours tool.

How are 1-minute, hourly and daily bars formed for TXF?

All three bar sizes come from the same trades, but larger bars depend more on where the bar starts and ends.

1-minute bars (1 分K)

A 1-minute bar holds every trade inside one minute. The day session produces 300 one-minute bars and the night session produces 840. One detail matters here: some software stamps a bar with its start time, and some stamps it with its end time. A bar labelled 09:00 can mean 08:59–09:00 or 09:00–09:01. If your chart and your backtest data use different conventions, every signal looks shifted by one bar.

Hourly bars (60 分K)

Hourly bars show the alignment problem most clearly, because the day session starts at 08:45, not on the hour.

AlignmentDay-session barsResult
Session-aligned (starts at 08:45)08:45, 09:45, 10:45, 11:45, 12:455 full one-hour bars
Clock-aligned (starts on the hour)08:45–09:00, 09–10, 10–11, 11–12, 12–13, 13:00–13:456 bars, the first and last are partial

The night session starts at 15:00, so both methods give 14 full hourly bars there. A strategy that reads "the first hourly bar of the day" gets a 60-minute bar in one setup and a 15-minute bar in the other.

The TAIEX futures day session from 08:45 to 13:45 cut into hourly bars two ways: session-aligned gives five full 60-minute bars, clock-aligned gives a 15-minute first bar, four full hours and a 45-minute last bar Clock bars make short bars Day session 08:45–13:45, hourly bars Session Clock 15 min 60 min 45 min The first bar can be 15 minutes. So: anchor bars at 08:45.
The same day session cut into hourly bars two ways. Clock alignment creates a short first bar and a short last bar.

Daily bars (日K)

A daily bar holds every trade in one trading day, so its open, high and low change with whether the night session is counted.

Where does the daily bar break between the night and day sessions?

TAIFEX counts the night session as part of the next trading day (TAIFEX contract rules, see References), so a full-session daily bar starts at 15:00 on the previous trading day and ends at 13:45.

A trading day is the exchange's accounting day for trades, positions and settlement. Under this rule, Tuesday's trading day is Monday 15:00 to Tuesday 05:00, plus Tuesday 08:45 to 13:45. The Friday night session runs until 05:00 on Saturday and belongs to Monday's trading day.

Charting software usually offers two kinds of daily bar:

Day-session daily barFull-session daily bar
Contains08:45–13:45 onlyPrevious 15:00–05:00, then 08:45–13:45
OpenFirst price at 08:45First price at 15:00 on the previous trading day
High and lowDay session onlyBoth sessions
Overnight gapVisible between barsMostly inside the bar
One TAIEX futures trading day on the clock from Monday 15:00 to Tuesday 13:45: the full-session daily bar holds the night session and the day session, the day-session daily bar holds only the day session Tuesday starts Monday 15:00 One trading day, Taiwan time Mon 15:00 Tue 13:45 Full bar Night Day Day bar None Day Closed The two daily bars are different data. So: use one kind in chart and test.
One trading day on the clock. The full-session daily bar starts at 15:00 on the previous trading day; the day-session daily bar covers only the day session (08:45–13:45).

Hypothetical example

On Monday the day-session high is 22,400. That night, news pushes the price to 22,550 at 22:00. On Tuesday morning the day-session high is 22,450. A rule says "buy when price breaks yesterday's high." On Wednesday, a day-session daily bar gives yesterday's high as Tuesday's morning high, 22,450. A full-session daily bar gives 22,550, because Tuesday's trading day includes Monday night. The breakout level differs by 100 points, so the rule fires at different prices or not at all.

The settlement price is a separate question from the daily bar. See which close price to use for the TAIEX futures night session.

How do the continuous contract and the roll change the chart?

A long TXF chart is stitched together from many monthly contracts, and the stitching can create price jumps that no trader ever experienced.

A continuous contract is a single price series built by joining consecutive contract months, usually by following the near month (近月) until it expires. TXF contracts settle on the third Wednesday of the contract month, and the expiring contract stops trading at 13:30 that day (TAIFEX contract specifications, see References). The next month then becomes the near month. You can look up each date with the free TAIEX futures settlement dates tool.

At each roll an unadjusted chart shows a price jump, and a back-adjusted chart removes it by shifting older prices; the guide to 台指全 continuous data for backtests explains both. Pardo (2008) treats the way the continuous series is built as part of the test design, not as a detail left to the data vendor.

Hypothetical example

The expiring contract last trades at 22,000. The next month trades at 21,900 at the same moment. An unadjusted near-month chart shows a 100-point drop at the roll. A backtest on that series would book a 100-point loss on a long position, even though a real trader would close the old contract and open the new one with no such loss. A back-adjusted series subtracts 100 points from all history before the roll, so the drop is gone, but a 2019 price level on the chart is 100 points lower than the price actually traded then.

A hypothetical TAIEX futures roll where the next month trades 100 points below the expiring contract: the unadjusted series shows a 100-point drop that looks like a loss, the back-adjusted series moves older prices down 100 points so the gap is removed Rolls create a fake gap Hypothetical: next month 100 pts lower Unadjusted Back-adjusted −100 −100 Fake −100 loss Gap removed Raw data books a loss nobody took. So: use back-adjusted data for P&L.
The hypothetical roll above. Unadjusted data shows a gap at the roll; back-adjusted data removes the gap by moving older prices.

Use back-adjusted data to calculate profit and loss. Use unadjusted data when a rule depends on actual price levels, such as round numbers.

Why can the chart you see differ from the data your backtest uses?

The chart and the backtest can use the same market and still disagree, because each one makes its own choices about sessions, time stamps and rolls.

Check these six points when a signal on your chart does not appear in the backtest, or the other way round:

  1. Session template. The chart shows day-only bars and the data file holds full-session bars, or the reverse.
  2. Bar alignment. Hourly or 30-minute bars start at 08:45 in one and on the clock hour in the other.
  3. Time stamp convention. Bars are labelled by start time in one and by end time in the other.
  4. Daily break. The daily bar starts at 15:00 in one and at 08:45 in the other.
  5. Roll method. The chart is unadjusted and the data is back-adjusted, or they roll on different days.
  6. Time zone. The data is stored in UTC or another zone and the night session crosses midnight differently.
The same 1-minute trades make two different hourly bars: from the 1-minute bars of 08:45 to 10:00, the chart's bar covers 08:45 to 09:45 and is stamped 08:45, the data file's bar covers 09:00 to 10:00 and is stamped 10:00, and their open, high, low and close all differ Same trades, two hourly bars 1-minute bars from 08:45 to 10:00 Your chart Your data file Hourly bars 08:45 10:00 Open, high, low and close all differ. So: match all six settings.
The same 1-minute trades become two different hourly bars when the chart and the data file use different settings.

How should you set bar size and sessions for TAIEX futures research?

Choose the session and bar size from how you will trade, then make the data, the chart and the backtest settings agree.

  1. Decide which hours you will trade. If you only trade the day session, use day-session data. If you hold positions through the night, use full-session data. The article on night sessions in futures backtests compares the two.
  2. Match the bar size to the holding time. A strategy that holds for an hour needs bars much smaller than an hour, so that entries and exits fall at realistic times. A strategy that holds for days can use larger bars.
  3. Anchor intraday bars to the session. For TXF, bar sizes that divide the 300-minute day session evenly when counted from 08:45 (5, 15, 30 or 60 minutes) avoid partial bars.
  4. Decide how daily values are built. If a rule uses yesterday's high, low or close, write down whether that comes from day-only or full-session bars.
  5. Choose the roll method. Back-adjusted for profit and loss, and check that the roll date matches the settlement calendar.
  6. Include costs and realistic execution. Decide at the bar close and fill on the next bar, with commission and slippage in every trade; in MultiAlphas (Valynox) the trading sessions, data resolution, next-bar execution and fees are set once in backtesting and apply to every candidate.

Before the first full run, pull the 08:45, 13:30 and 22:00 bars from one recent day and compare open, high, low and close between your chart and your data file; if any of the four prices differ, fix the session template or roll method first.

Frequently asked questions

What time does the TAIEX futures daily bar start?

It depends on the session template. A day-session daily bar starts at 08:45 and ends at 13:45 Taiwan time. A full-session daily bar follows the TAIFEX trading day and starts at 15:00 on the previous trading day, because the night session belongs to the next trading day.

Why does my TAIEX futures 日K look different on two platforms?

One platform probably builds daily bars from the day session only and the other includes the night session. The open, high and low then differ, and overnight gaps appear in one chart but not the other. Roll method and time stamp conventions can add further differences.

Which 分K bar size is best for TAIEX futures?

No bar size is best in general. Choose one that is clearly smaller than your typical holding time and that divides the session evenly from 08:45, such as 5, 15 or 30 minutes. Then test the strategy on neighbouring bar sizes to see whether the result depends on one exact choice.

Does the Friday night session belong to Friday or Monday?

TAIFEX counts the night session as part of the next trading day. The Friday night session, which runs until 05:00 on Saturday, therefore belongs to Monday's trading day. A full-session daily bar for Monday includes those Friday night trades.

Should a TAIEX futures backtest use back-adjusted data?

For profit and loss, back-adjusted data is usually better, because it removes roll gaps that no real position would have suffered. If a rule depends on actual printed price levels, keep an unadjusted series for those levels.