Look-ahead bias is when a backtest uses information that would not actually have been available at the moment the decision was made. The strategy effectively "peeks into the future," producing results that look brilliant and are impossible to reproduce live — because in reality you don't have tomorrow's data today.
How it sneaks in
It's usually subtle and accidental. Using a day's closing price to make a decision that should have been made at the open. Using restated or revised data (like a revised GDP figure) that wasn't known on the original date. Calculating an indicator over a full period that includes bars from after the signal. Filtering your universe by data that only existed later. Each quietly leaks future knowledge into a past decision.
Why it's so dangerous
Look-ahead bias produces backtests that are not just optimistic but physically impossible — the strategy is trading on information from the future. Unlike survivorship bias (which flatters), look-ahead bias can make a worthless strategy look like a money printer, then fail completely live, because the "edge" was pure time-travel. It's one of the most common reasons a stunning backtest collapses in forward-testing.
If your backtest knew the close before the close, it wasn't a strategy — it was a time machine you can't actually build.
How to catch it
Be ruthless about timing: at every decision point, use only data that existed at that instant. Use point-in-time datasets, lag your data appropriately, and simulate the exact information flow of live trading. The ultimate check is forward-testing on genuinely unseen data — where look-ahead bias is impossible by construction. Honest system development assumes a beautiful backtest is hiding a leak until proven otherwise.