Learning objectives
- Align lower-timeframe decisions with the latest completed higher-timeframe state.
- Avoid treating nested bars as independent confirmations.
Prerequisites: Understand bar timestamps, sessions and resampling.
Mechanism and interpretation
A higher-timeframe bar contains the same underlying events as several lower-timeframe bars. It supplies a different summary, not an independent market vote. For each lower-timeframe decision, attach the latest higher-timeframe bar that has fully completed and become available. This is an as-of join by availability time, not a join that assigns the final hourly close to every five-minute row within that hour.
Developing higher-timeframe conditions are possible, but then the historical simulation must reconstruct the partial bar at each decision. Mixing live partial bars with historical final bars changes the strategy. Define session origin when resampling: hourly bars beginning at 09:15 differ from those beginning 09:00, even though each lasts sixty minutes.
Worked case · synthetic data
Hourly bars run 09:00–10:00 and 10:00–11:00. At 10:20, the latest completed hourly close is the 10:00 close. The 11:00 close is unavailable. If the 10:00 hourly candle rose from 100 to 104, a five-minute rule may record that completed context while evaluating its 10:20 trigger. If the developing next hourly price is 102, that is a separate partial-bar observation, not its final close.
Failure modes and context
Timestamp labels may denote bar start or bar end. Incorrect interpretation shifts context forward by an entire period. Missing lower-timeframe bars can distort resampled highs and lows. Adding more timeframes can overfit a small sample because their states are strongly related. Evaluate whether the extra context improves an aligned baseline after costs.
Practice assignment
Thirty-minute bars end 09:30,10:00 and 10:30. At 10:12 a three-minute signal fires. Which completed context is available? If a file labels bars by start time and the row 10:00 contains the 10:30 close, explain the required timestamp conversion.
Worked answer
Use the bar ending 10:00. The start-labeled 10:00 row becomes available only at 10:30, so assign availability=start+30 minutes before joining. At 10:12 that row is future information. A partial-bar variant would need data only from 10:00 through 10:12 and must be tested as such.
Check your understanding
Question 1
At 10:20, which hourly close is available for bars ending on the hour?
- 11:00
- 12:00
- 10:00
Reveal answer and reasoning
C. 10:00
The latest fully completed hour ended at 10:00.
Question 2
Are five-minute and hourly bullish candles independent evidence?
- Only if colors match
- No; their underlying trades overlap
- Yes always
Reveal answer and reasoning
B. No; their underlying trades overlap
Nested aggregation creates statistical dependence.
Question 3
What does an as-of join use?
- The most recent already-available observation
- The closest observation in either direction
- The final observation of the day
Reveal answer and reasoning
A. The most recent already-available observation
Availability must not be later than the lower-timeframe decision.
