Why timezone errors corrupt daily candles
4 min read
Daily candles are session-defined aggregates, not universal objects. Cross‑venue timestamp normalization and session conventions are critical; misalignment can change which observations fall into a given day, corrupting OHLC values. Researchers should use audit methods to test whether backtest behavior may reflect data‑construction errors.
A daily candle is not a universal object. It is an aggregation over a specific session boundary, and that boundary depends on where midnight or the designated session close is defined. In cross-venue datasets, mixing those conventions can move trades and quotes across calendar days, which changes the open, high, low, and close assigned to a daily bar.
As a teaching example, market data integration across venues requires careful normalization of timestamps, trading sessions, and venue-specific conventions. When timestamps are not aligned to the correct venue session definition, the same underlying sequence of events can be partitioned into different daily buckets, producing different OHLC bars from identical raw observations. This is the core mechanism by which timezone errors corrupt daily candles: the aggregation window changes, so the candle changes.
The practical problem is larger in multi-venue research because different venues can define trading days differently. A cash equity venue with a regular exchange session and a futures venue with extended or nearly continuous trading do not naturally share a single daily cutoff. If a researcher aggregates both using one naive timezone rule, the resulting daily bars may embed session mismatches rather than market structure. In that case, a bar close can be attributed to the wrong date, highs and lows can migrate between adjacent days, and opens can reflect a prior session’s final prints instead of the intended session start.
The cross-venue data source supports the need to preserve venue metadata during normalization, including timestamp semantics and session context. That directly bears on daily candle integrity because aggregation without reliable timezone and session metadata can create bars that are internally consistent in software yet economically incorrect. A candle builder may still output valid-looking OHLC values, but those values no longer correspond to the venue’s intended trading day.
This distortion matters for research and backtesting because many signals are defined on daily bars: gap measures, previous-close relationships, breakout levels, range expansions, rolling volatility, and end-of‑day portfolio states all depend on correct day boundaries. If the close is shifted across days, then any derived feature using prior‑day close or same‑day range inherits that error. A backtest can therefore become sensitive not to market behavior but to timestamp convention mistakes.
Researchers should audit whether apparent strategy behavior may be an artifact of data handling choices rather than robust signal structure. In this context, timezone alignment is one of the data‑construction choices that should be stress‑tested before interpreting backtest outputs.
If candle corruption introduces accidental patterns, performance statistics computed on those bars may require skepticism, and tools that adjust for selection bias become more important when data‑construction risk is present.
Daily candle construction depends on correct timezone and session conventions, and when these are mismatched across venues, normalization errors can corrupt OHLC bars in ways that propagate directly into downstream research and backtesting.
Drafted with AI assistance from cited sources. Reviewed and approved by Sonar Sciences Quant & Research Team.