This article explains a specific way backtests mislead and how to guard against it. It is educational and general, about evaluating any track record, not personalised investment advice, not a recommendation to buy or sell anything, and not a performance claim about any specific strategy.
Look-ahead bias is using information in a backtest that would not have been available at the instant of the decision. It is the subtlest way a backtest lies, because the leak is almost always invisible: a restated fundamental, a closing price used to trigger an at-open order, a universe cleaned with hindsight. The equity curve looks brilliant. It also could never have been traded.
The short version
The mechanism is a timestamp error: a simulated decision reads a value that was only knowable after the decision was made. The fix is a single discipline, point-in-time data: at every decision, use only what was actually knowable then, and take the snapshot at decision time, never a later one. Get that freeze right and the leak has nowhere to enter.
What look-ahead bias actually is
A backtest is a claim of the form “had we run these rules over this history, this is what would have happened.” The claim is only honest if, at each simulated decision, the rules saw exactly what a real trader would have seen at that moment: no more, no less. Look-ahead bias breaks that contract. Somewhere in the pipeline, a value that was only knowable later leaks into a decision made earlier. The strategy is, in effect, being graded on an exam it has already seen the answers to.
It is the subtlest backtest error because nobody has to cheat for it to happen. The author is not trying to deceive anyone; the data pipeline simply hands the future to the past, and the result looks wonderful. That is what makes it so much more dangerous than the obvious sins. An overfit curve at least looks suspiciously smooth, so a careful reader gets suspicious. A look-ahead curve can look entirely plausible, ugly stretches and all, while resting on a leak of a single day.
Why even a tiny leak inflates results dramatically
The intuition that a small leak means a small error is wrong, and badly so. A strategy that can see even slightly into the future does not just do a little better on average: it stops taking the losses that define real trading. Knowing tomorrow’s move, even imperfectly, lets the simulation dodge the drawdowns, hold the winners a beat longer, and cut the losers a beat sooner. Those are exactly the decisions that separate a good live record from a great backtest, and they are precisely the ones a leak makes free.
The damage concentrates in the tails. Momentum and breakout strategies live or die on how they handle sharp reversals, and a reversal is the one event a future-peeking backtest handles perfectly and a live book handles painfully. So the leak does its worst work in exactly the moments that matter most, which is why a backtest can be off by far more than intuition suggests, while looking, line by line, like clean code. This is the leakage effect Lopez de Prado documents: a small information leak concentrated in the tails can dominate the reported result rather than perturb it.
The common disguises
Look-ahead bias almost never announces itself. It arrives in a handful of recurring disguises, each of which feels harmless in the moment it is written:
- Restated financials. Databases store the final, corrected version of a company’s numbers. But at the moment you would have traded, only the originally reported figures existed. Ranking on a restated earnings number is ranking on information that did not exist yet. This is the single most common fundamental leak, and it is why serious data vendors sell point-in-time snapshots at a premium.
- Using the close to decide an at-open trade. A rule that triggers on a day’s closing price, then books the entry at that same day’s open, has bought before it knew the signal fired. It is a timestamp mismatch, trivial to write and devastating to results, because it hands the strategy a full session of hindsight on every single entry.
- Forward-filled or future-anchored data. Filling a gap by carrying a later value backward, or normalising a series against a statistic (a maximum, a mean, a z-score) computed over the whole sample including the future, quietly bakes tomorrow into today. The series looks continuous and well-behaved; it is also contaminated at every point.
- A universe chosen with hindsight. Testing on the names that turned out to matter, the ones that survived, that are still in the index today, is deciding what to trade using a list that could only be finalised in hindsight. That is a named sub-case with its own deep treatment in survivorship bias, and the closely related hindsight-universe problem, so we only flag it here rather than re-explain it.
How to prevent it: point-in-time data and a decision-time snapshot
There is really only one cure, and it is a discipline rather than a trick: reconstruct, for every decision, the exact state of the world as it stood at that instant, and let the rules see nothing else. The data has to be point-in-time, meaning it records not just a value but the value as it was known on each date, restatements and index changes and all. The mechanics of building and maintaining such data are their own subject, covered in point-in-time data.
The operational habit that flows from it is simple to state and easy to violate: take the snapshot at decision time, never a later one. When the backtest reaches a given day, it should freeze the world as of that day, make its decision against that frozen view, and only then advance. Any value that would require reading past the freeze point, tomorrow’s price, next quarter’s restated earnings, the eventual index membership, is off limits by construction. Get the freeze right and most disguises above simply cannot occur.
How this shapes the way we validate our own work
Our position is that a backtest is only worth trusting if it was built to refuse the future at every step. Scores are derived from data as it stood at the decision, not as it was later corrected, so the four engines rank names on what was genuinely knowable that day. And fills are modelled conservatively in the closing auction rather than at a favorable earlier print: the simulation books the same kind of price the live system actually targets, which closes the specific close-to-decide-an-open leak described above. The reasoning behind that execution choice is in market-on-close execution. This piece is one entry in the broader catalogue of ways a backtest can flatter itself, collected in why most backtests lie.
The honest limitation is that look-ahead bias is genuinely hard to eliminate by inspection alone. Some leaks are so subtle that the code reads as correct and the curve looks reasonable, and the only thing that surfaces them is the live record diverging from the backtest in a way that a clean pipeline would not. That is exactly why we run the locked rules forward in public and reconcile the two: the day the live results caught up to the backtest is the strongest evidence available that no meaningful future was leaking into the past, because live, by construction, cannot peek. The full forward record is published on the track record and independently timestamped on the attestation log.
Sources & further reading
- López de Prado, M. (2018). Advances in Financial Machine Learning. Wiley. (On point-in-time data, the timestamp of information availability, and leakage in backtests.)
- Bailey, D. H., Borwein, J. M., López de Prado, M. & Zhu, Q. J. (2014). “Pseudo-Mathematics and Financial Charlatanism.” Notices of the American Mathematical Society, 61(5), 458 to 471.