Lookahead Bias
- Category
- Algorithmic Trading
- Level
- Expert
Simple definition
Using information at time t that did not exist at time t. A backtest that peeks at the future shows profits nobody could have taken, so its result is void rather than merely optimistic.
Professional definition
Any use of data in a simulated decision that was unavailable when the decision had to be made: the bar's own close, revised data at its original date, a universe filtered by later survival, or chart objects drawn after the move. The result is not an overstatement of edge; it is not a measurement of anything.
Technical definition
Formally, a position weight must be measurable with respect to the information set available before the period it is applied to. Violations include intrabar decisions taken on that bar's close, macro series carrying restated values at first-print dates, universes built from instruments that still exist today, indicators that repaint after the fact, and analyst-drawn objects placed with hindsight then fed to the rule. Each imports knowledge of the outcome, which makes the statistics uninterpretable rather than biased by a measurable amount.
Academic definition
The use of information in a simulated decision rule that was not contained in the information set available at the decision time, rendering the resulting performance estimates invalid rather than biased.
Mechanism
A simulated decision is only meaningful if it could have been taken. Peeking removes the uncertainty that the decision was supposed to resolve, so the rule is no longer being tested against the market; it is being tested against an answer key. This is why the defect is categorical: there is no discount factor that converts a leaked result into an honest one.
In practice
- Who uses it
- Anyone writing or reviewing a backtest, and anyone reading one written by someone else.
- Why it matters
- It is the one defect that cannot be traded around: a result built on future information describes a market that did not exist.
- Limitations
- Hand-drawn trendlines, zones and levels placed after the fact belong to this category. Fed into a backtest as inputs they import the analyst's hindsight; the rule that generates them must be learned and coded instead.
Common mistakes
- Deciding on a bar's close and filling at that same close.
- Backtesting a universe of instruments that still exist today.
- Using restated macro or fundamental data at its original release date.
Examples
A trendline drawn today touches four historical pivots perfectly, because the pivots chose the line. Replayed bar by bar, the same line could not have been drawn until after the trade it was meant to signal.
A rule that buys an open only when that bar will close higher captures every up bar and never loses. With 138 up bars of 0.9 percent in a year, equity multiplies by 3.4 — an impossible result that signals the leak.
- 138 up bars in the year, each closing 0.9 percent above its open
- the rule enters at the open only on those bars, which requires knowing the close
- losing bars are skipped, so no loss is ever taken
- costs ignored
- 1.009^138
- = exp(138 x ln 1.009) = exp(1.2365)
- = 3.44
Illustrative figures. The giveaway is structural, not numerical: a win rate near 100 percent on intrabar entries almost always means the decision used the bar it traded.
Mathematical foundation
Variables
| r^{\text{strat}}_t | Strategy return attributed to period t | fraction |
| w_{t-1} | Position weight, which must be fully determined before period t begins | fraction of equity |
| r_t | Instrument return over period t | fraction |
| \mathcal{F}_{t-1} | Information genuinely available before period t, including publication and revision timing | information set |
Procedure
For each simulated decision, name the exact timestamp at which every input became knowable, including first-print dates for revised series and listing status for instrument universes. If any input's timestamp is at or after the period being traded, the decision is inadmissible and the result must be discarded, not adjusted.
Worked example
- a signal computed from the close of bar t
- the position is applied to the return of bar t itself
- the signal belongs to the information set F_t, not F_{t-1}
- the admissibility condition w_{t-1} in F_{t-1} is violated
- no correction factor exists for the violation
Interpretation
The condition is a yes-or-no test, not a magnitude. Either every input to a decision predates the period it trades, or the reported performance is not an estimate of anything the strategy could have earned.
Assumptions
- Bars are treated as closed intervals whose close is knowable only at their end; intrabar execution needs tick or quote data to be simulated honestly.
- The information set includes data vintage: a value that was later revised was not knowable at its revision value on the original date.
- Instrument universes are part of the information set, so delisted and failed instruments must remain in the sample for the periods in which they traded.
- The condition detects inadmissibility, not degree: it cannot say how much of a leaked result came from the leak.
- Satisfying it does not make a backtest valid; costs, fill assumptions and selection over variants remain separate requirements.
Related terminology
Overfitting
Overfitting selects a rule on data it is then judged by, using only information that existed. Lookahead bias uses information that did not exist. The first makes a result unmeasurable; the second makes it void.
Sources
CMT Association · chapters on testing methodology and the hazards of historical simulation
https://cmtassociation.org/wp-content/uploads/2019/01/Technical-Analysis-Modern-Perspectives-CMT-Association.pdf URL verified
CFA Institute · requirements for valid historical performance records
https://www.cfainstitute.org/insights/professional-learning/refresher-readings/2026/portfolio-performance-evaluation URL verified
Editorial status
Flagged by the editor as uncertain on a linguistic, mathematical or regulatory point.
