← Journal

Testing · 6 min

Why your backtest lies to you

Visual · A chart split at todayjournal-backtest-wide · 16:9

A backtest is evidence, not a promise. It tells you how a set of rules would have behaved on past prices, under the assumptions you gave the tester. Change the assumptions and the story changes. Here are four ways a report flatters an EA, and what to do about each.

1. The prices were too clean

Many default tests use generated ticks and a fixed spread. Real markets widen spreads around the open, the close and the news. In the MT5 Strategy Tester, choose "Every tick based on real ticks" where your broker provides them, and let the spread vary. If an EA only works on a perfect spread, it does not work.

2. The costs were missing

Commission, swap and slippage are small per trade and large in total, especially for scalping. Add your broker's commission to the test, and treat a strategy that survives only without costs as a strategy that does not survive.

3. The rules were fitted to the past

Tweak enough inputs and any EA can look brilliant on the data it was tuned on. That is overfitting. Keep a slice of history the EA has never seen, test on it once at the end, and be suspicious of settings that only work in a narrow band.

4. You read the profit, not the drawdown

Net profit is the least useful line in the report. Look at the maximum drawdown, the number of trades, the profit factor and the longest losing run. Then ask whether you could sit through that drawdown with real money, because live results will differ.