Skip to content
PMPipMentorSchool of forex
0/25 lessons0d streak0 XPNext lesson

Lesson 2 of 4 · Brown belt · #19 of 25 overall

Backtesting honestly

History will confirm anything you want if you let it. Here is how to stop it.

8 min read·Strategy & The Journal·2 quiz questions at the end

Backtesting means applying your written rules to historical data to see what would have happened. Done carefully it tells you whether an idea has ever worked and what its bad periods look like. Done carelessly it manufactures confidence in nonsense, which is considerably worse than having no test at all.

The first and largest sin is hindsight bias. Scrolling a chart with the future visible on the right-hand side, you will unconsciously take the trades that worked and skip the ones that did not. The fix is mechanical: hide the future. Replay bar by bar, record the decision before advancing, and accept the result you actually recorded.

The second sin is curve fitting. If you keep adjusting parameters until the equity curve looks beautiful — a 37-period average, but only on Tuesdays, and only above 1.0850 — you have not found an edge, you have described this particular history in unnecessary detail. Fewer parameters, tested on data you did not use for tuning, is the antidote. Reserve a period of history you never look at until the rules are final.

History will confirm anything you want if you let it see the answer first. Hide the right-hand side of the chart.

Third, model costs. A strategy that clears the spread in a backtest with zero costs can be comfortably negative in reality. Subtract a realistic spread and commission from every trade, and add slippage on stops. Many short-term strategies fail this test alone, which is exactly the information you wanted.

Finally, judge sample size and distribution, not the headline. Thirty trades tell you almost nothing. Look at at least a hundred, spread across trending and ranging regimes, and read the worst losing run and the deepest drawdown before you read the profit. If the bad stretch is one you could not sit through, the profit at the end is theoretical.

Key takeaway

Replay bar by bar so the future is hidden, keep parameters few, subtract realistic costs, and judge the worst losing run over 100+ trades before judging the profit.

Check yourself

0/2 answered

Two questions on what you just read. Answer them before moving on — recall is what makes a lesson stick.

1. What is curve fitting?

2. Which number should you read before the total profit of a backtest?

Take the full brown belt quiz →