Backtest vs Live Trading: Why Results Diverge
The equity curve in the backtest climbs cleanly, then you switch the strategy on live and the account slides into losses. The first question that comes to mind is obvious: is the strategy broken? In most cases, the answer is no. Most of the gap between backtest and live trading doesn't come from the trading rules themselves. It comes from differences in data, execution, and the natural conditions of a real market. This article walks through the documented causes one by one, shows how to lay both results side by side with QuantAnalyzer, and also states plainly what that comparison can't tell you.
A gap between backtest and live trading is normal
When a backtest shows gains and the same rules produce losses live, that's usually not a sign that the strategy is fundamentally flawed. The most common cause isn't the trading logic itself, it's a mismatch in the data used for the two tests.
That shifts the first question you should ask. Not: what's wrong with my rules? But: what's different between the backtest run and the real market run? The sections below go through the documented differences one at a time.
The most common causes sit in the data
The most frequently cited causes of differences between backtest and live trading involve the data itself, not the strategy:
- different price feeds from different brokers
- different time zones between the data source and the trading platform
- different handling of daylight saving time
- a coarser data resolution in the backtest than live trading actually sees
None of these four causes is treated as more important than the others in the source. They act side by side, and depending on the strategy, one shows up more strongly than another.
Small differences in execution timing
Strategies that trigger orders "On Bar Open" or "On Bar Close" don't get the exact same execution timing in a backtest as they do live: an order can't actually fill at the precise instant a candle opens or closes. The documentation describes this difference as normally negligible for performance, but it states clearly that it doesn't disappear because of that.
Why live results generally come out a bit worse
Real trading always comes with slippage and the occasional price spike, something a backtest in its usual form doesn't have. Live results therefore tend to run a bit worse than the backtest. That's down to the nature of real markets, not a glitch. How close backtest and live results stay to each other depends on how precisely the live trades that actually got executed match the trades simulated in the backtest. That's a general tendency, not a fixed or predictable number.
Even two backtest engines can disagree
Even if you keep data, time zone, and execution timing clean, there's still another source of divergence: different backtest engines, say MetaTrader 4 compared with MetaTrader 5, can produce different results for the same strategy. How large the difference turns out to be depends on the strategy, the building blocks used, and the internal behavior of each engine. A better result on one engine doesn't automatically make that engine the more accurate one. In the same discussion, one user reported deviations far larger than what the manufacturer describes as typical, and that contradiction was never resolved.

How to compare backtest and live results systematically
QuantAnalyzer includes a Compare results module that can load a folder of live or platform-exported results alongside a separate folder of backtests from StrategyQuant or AlgoWizard. Matching the two sets runs either by strategy name or by magic number.
Splitting the data into two folders isn't a minor detail: loading depends on exactly this folder structure, not on a setting inside the comparison tool itself. So put live results and backtests into two clearly separated folders before you start the comparison.

The interface itself carries a note on this: if a backtest deviates from another result, the most likely cause is different trading options or different data on the two platforms being compared. This text is written in general terms and isn't tailored to one specific comparison dialog, it doesn't rule out other causes such as execution or broker behavior.
What settings and data usually explain, and what they don't
The manufacturer states that differences between backtests mostly trace back to issues around settings and data, less often to the trading logic itself. That statement refers broadly to differences between backtests, not specifically to the comparison between backtest and live trading. It's a pointer to where you should look first, not proof that it accounts for every single deviation.
What this comparison can tell you, and what it can't
The Compare results check shows you where live results and backtest diverge. It doesn't automatically tell you which of the causes mentioned carries the biggest weight in your case: there's no documented ranking of which cause typically matters most. There's also no fixed threshold at which a comparison counts as "close enough" to keep running a strategy, that stays a judgment call you make for your own case. And even a backtest that ends up matching the live data closely says nothing about whether the strategy will win or lose going forward. For that you need other checks, for example a walk-forward analysis or a look at overfitting in trading strategies. If you get stuck on your own comparison, the QANTERIS community is a place where others have gone through the same gap before.
This article is for education only and is not investment advice. Past results, including backtests, do not guarantee future results. Trading financial instruments involves risk, and you can lose money.
This article is for education only and is not investment advice. Past results do not guarantee future results.
How do you do it? Share it in the community. Free, in your language.
Sign up free