Advertisement IC Markets

Historical data gaps make backtests lie

Share, develop, and backtest custom MQL4/MQL5 Expert Advisors, Python data-scraping scripts, trading bots, and automated market alert systems.
Post Reply
Fairman
Posts: 6757
Joined: Tue Jul 21, 2026 7:11 am
Location: Abuja

Historical data gaps make backtests lie

Post by Fairman »

Historical data gaps make backtests lie

A backtest is only as good as the data under it. Many platforms hold history with missing minutes, wrong prices, or interpolated gaps, especially for older periods and for less liquid pairs.

On one minute data, a gap of a few bars looks harmless. For a scalping strategy, those bars can contain exactly the kind of spike or stop run that decides profit and loss.

Brokers also differ. The same pair on two platforms may show different highs and lows, because each platform records its own feed. A strategy tuned to one set of history can look worse on another.

A basic check is comparing the history with a second source for a few random days and looking for differences. If the numbers disagree, the backtest should be taken with caution.

Cleaning and fixing data is tedious but makes results more trustworthy. Better still is testing on recent live forward data, collected through the real trading environment.

A quick method for checking: count the bars per day for a one minute chart. A full trading day should have around 1,440 bars, minus the weekend closure. A day with 1,380 means sixty missing minutes, and those minutes might hide the event that decided the day.

Has a data check ever changed the verdict on a backtest?
It’s Fairman :geek:
Recommended broker for automated trading & scalping IC Markets
Post Reply