All lessons
Backtest without looking ahead
Once you know the ending, almost every old chart looks easy. Hide the future and make the decision again.
Build a historical test that respects what was knowable at each decision.
A backtest applies written rules to historical data. Freeze the rules and move chronologically. If an entry depends on a candle's close, that close must be available before the simulated decision; you cannot also assume an earlier entry within that candle.
Include spread, commissions, financing and a realistic fill assumption. When a candle touches both stop and target and their order is unknown, do not automatically award the target. Use finer data or a conservative stated rule.
Keep development data separate from an untouched evaluation period. Every parameter trial is part of the research history. Repeatedly tuning on the evaluation period turns it into development data. Report losses, drawdown, trade count and uncertainty alongside average return.
Let’s use numbers · hypothetical example
Hypothetically a bullish hourly close at 1.1000 triggers entry. A test that buys at that same hour's low of 1.0970 uses information unavailable at the low. A subsequent executable price is a more defensible assumption, with costs included.
Keep in mind
Historical simulation cannot reproduce every live fill or emotional response. Good past results are not a guarantee.
Your turn
Audit five simulated trades for decision time, available information, bid/ask assumption and ambiguous stop-target ordering.
A quick check before we move on
Which test contains look-ahead bias?
- Keeping later data untouched
- Using a candle's final close to justify buying its earlier low
- Entering after the completed signal
Check answer
Using a candle's final close to justify buying its earlier low The final close was not known at the earlier low, so that entry uses future information.
Sources and further reading
Content reviewed: 29 October 2026
Educational material with hypothetical examples. Trading can cause substantial losses. A course, pattern, stop order or past result cannot guarantee a profit or limit every loss. Practise in simulation and check current rules and product terms in your jurisdiction.