Advertisement IC Markets

Daylight saving shifts and the data that does not line up

Share, develop, and backtest custom MQL4/MQL5 Expert Advisors, Python data-scraping scripts, trading bots, and automated market alert systems.
Post Reply
Amanhasnoname
Posts: 1506
Joined: Fri Oct 30, 2026 9:45 am

Daylight saving shifts and the data that does not line up

Post by Amanhasnoname »

Historical data and live data can quietly differ because of daylight saving rules. A feed on server time shifts by an hour twice a year, and so do session opens, news times, and rollover.

If a backtest assumes fixed hours, like entering only between 8:00 and 10:00 server time, the window covers different real world periods before and after the change. Half the sample then measures one session, and half measures another.

The difference is easy to miss. Results look noisy, and an effect that exists in one half of the year vanishes in the other.

The fix is converting data to a single reference, like UTC, and defining windows in terms of real sessions. Then the strategy follows actual market opens, regardless of the server clock.

Also check how the data vendor handles the transition days, which have 23 or 25 hours. Some datasets include duplicated or missing bars.

Has a daylight saving error ever corrupted a test or a live strategy?
Recommended broker for automated trading & scalping IC Markets
Post Reply