Skip to content
GetProfitable
Search
Dictionary

Timestamp alignment

Making sure every dataset in a backtest agrees on what time it is, including timezones, daylight saving, exchange sessions, and whether a stamp is an event or an arrival time.

Merging an equity feed stamped in US Eastern with a futures feed in Chicago time and a macro release in UTC is where silent look-ahead-bias lives. One hour of misalignment on a news-reaction strategy can turn a losing rule into a wonderful one.

Distinguish event time from arrival time. An economic release is stamped 08:30 but your feed received it at 08:30:00.4 and your system could act at 08:30:01.2. Backtests using the stamp trade at a price that no longer existed.

Defensive practice: store everything in UTC, keep a separate field for the local exchange session, assert that no data row used by a decision has a timestamp later than the decision, and test the assertion on every run rather than once.

Related: look-ahead-bias, resampling, session-calendar, data-leakage

Educational only, not advice. Spotted an error? Post in Site Feedback.