Backtesting basics
What is lookahead bias in backtesting?
Lookahead bias is when a backtest uses information that would not have existed at the moment of the decision — the strategy "peeks" at the future. Classic examples: acting on a candle's close before the candle has closed, using an indicator computed over the full dataset, or entering at a day's low that was only knowable in hindsight.
It inflates results silently and is entirely an engine-quality issue: an event-driven backtester that feeds the strategy one bar at a time, with indicators warmed up incrementally, makes lookahead structurally impossible rather than something you have to remember to avoid.
The fastest answer is a test
Most 'does X work?' questions take a minute to answer empirically — on real data, with an out-of-sample check, free.
Backtest a strategy freeMore in this topic
Educational content, not financial advice. Backtested and historical figures describe past periods only; past performance does not guarantee future results.