Look-ahead bias is when a backtest uses information that wasn’t available at the moment the simulated trade was made. The strategy appears to predict the future because, in the test, it could see it.
It’s the most common reason a backtest looks brilliant and live trading doesn’t.
How it creeps in
Using a day’s closing price to make a decision that would have executed during that day. Using fundamentals or on-chain data with publication dates later than the data date. Normalising a dataset using the full-period mean and standard deviation, which bakes future values into every earlier point.
Survivorship is a cousin: testing only on assets that still exist means the failures were excluded before the test began.
Why it’s hard to catch
None of these feel like cheating. They’re natural coding shortcuts, and the strategy that results is usually not absurdly good — just good enough to be believed.
How to defend against it
Point-in-time data, where every record carries the timestamp it became available. Strict separation of the decision timestamp from the execution timestamp. Walk-forward testing, where parameters are fit on one period and tested on the next, never the reverse.
And the only test that can’t be faked: live performance, dated, with drawdowns published. A backtest is a claim. A live record is evidence.