Home · Blog · How algo works
How algo works

Backtest vs live trading: why the numbers differ

Bakhytzhan Aigelov12 October 2026 · 8 min read
BacktestMonte CarloOverfittingMT5Slippage
Backtest vs live trading: why the numbers differ

A backtest runs a strategy on historical data: "what would have happened if the bot had traded the last 5 years". It is an essential tool, but it is always more optimistic than reality. The question is not whether there will be a gap, but how big it is and where it comes from.

Backtesting in plain words

Imagine training a football team on recordings of the opponent's past matches. In training you know every move and win 10–0. In the real match the opponent plays differently, there is rain, a referee, fatigue. The backtest is training, the live account is the match.

6 reasons the live result is worse

FactorIn the backtestOn a live account
SpreadOften fixed or averagedWidens on news and at night
Commission and swapsMay be ignoredCharged every day
SlippageUsually zeroFill price worse than requested
Execution delayInstantMilliseconds to seconds, depends on VPS
Data qualityMinute bars or modelled ticksReal ticks
MarketThe past oneA new one, in a different regime

1. Costs. Spread and commission in a backtest are often set as averages. In a live market spreads widen around news — exactly when many strategies trade most.

2. Slippage. A backtest fills the order at the exact price. In reality the price moves away in a fast market. For high-frequency strategies this adds up.

3. Data quality. MetaTrader 5 has an "every tick based on real ticks" testing mode — closer to reality than a minute-bar model3. A backtest on coarse data can show trades that would have been impossible in real life.

4. Overfitting — the main reason. Try hundreds of parameter combinations and one of them will fit history perfectly — by chance. Bailey, Borwein, López de Prado and Zhu showed that with 5 years of data, trying as few as 45 configurations is enough to get at least one that looks great on history and performs poorly afterwards2.

5. Look-ahead bias. An error where the strategy in the test uses data that did not exist yet at the time of the trade. For example, the daily close used for a decision made at midday.

6. Market regime change. A strategy trained on a calm market may get lost in a high-volatility period, and vice versa.

What a study of 888 strategies showed

In 2016 the Quantopian team compared the backtests and real results of 888 algorithms, each with at least 6 months of out-of-sample trading1.

Algorithms in the sample888at least 6 months out of sample each
R² of backtest vs reality< 0.025the backtest Sharpe ratio barely predicted the result

The more times an author re-ran the backtest, the bigger the gap with reality. Future results were better predicted not by returns but by risk characteristics: volatility and maximum drawdown.

Takeaway. When choosing a strategy, look at the drawdown, not at the backtest return.

How to tell an honest backtest

  1. Out-of-sample. Part of the history was not used for tuning, and the strategy works on it too.
  2. Walk-forward. The strategy is tuned on one period and tested on the next — several times in a row.
  3. Monte Carlo. Thousands of trade reshuffles show not one future but a range, including bad scenarios.
  4. Real costs. Spread, commission and swaps are taken from a specific broker's conditions.
  5. Few parameters. The fewer "knobs", the lower the chance of fitting the strategy to history.
  6. A live track next to the backtest. The gap between them is the best indicator of honesty.

How we test robots for clients

For every robot we develop we prepare a report: a backtest with real spreads and commissions, an out-of-sample check, a Monte Carlo stress test and real-time running on a demo account. The gap between the backtest and the demo is a normal part of the picture, and we show it before the robot is handed over.

How to read drawdown depth and duration — in "Drawdown". Why a backtest that is too smooth is a warning sign — in the article on martingale and grids.

Risks

Backtest and simulation results are hypothetical and do not capture all real market conditions. Past performance is not indicative of future results. Leveraged CFD trading can lead to the loss of the entire deposit.

Trading involves risk of capital loss. Past performance is not indicative of future results. A Labs is a software developer, not a broker and not a financial adviser.

Tell us about your idea

The request takes 2 minutes. We reply within one business day and suggest the next step.

or message us on Telegram