On this page
In brief
Using information that was unavailable at the simulated decision, which distorts reported performance.
Where does look-ahead bias enter historical data?
An observation date identifies the period a number measures. A release timestamp tells you when a researcher could read it. An economic series may first appear the following month and be revised later. Substituting a later value for the version available at the decision gives the simulation information too soon.
A signal computed from today’s close cannot produce a fill at today’s open. Preprocessing can also leak information: scaling old signals using a full-sample mean uses later observations. A backtest should make each allowed history window explicit and preserve the ordering of signals and execution.
How do you check what a signal could have known?
Keep the observation date, public release time and earliest usable time for each input. When replaying a decision, join only versions available by that cutoff. The St. Louis Fed’s economic archive provides initial and revised values for many series. An intraday study also needs the actual release time.
Recreate a few decisions by hand. Check the filing vintage, historical constituent list and quote session behind each one. In an out-of-sample evaluation, build features using only information available at each cutoff. Keep an audit log explaining changes in results after fixing a timing problem.
A timing audit for the data pipeline
Observation period, official release, vendor receipt and processing time are different timestamps. Quarterly earnings were not known at the quarter’s start, and a monthly statistic was not necessarily available at month-end. Separate reference dates from decision-availability dates. If historical availability is unknown, keep that limitation visible rather than replacing it with the neatness of a later download.
Current constituents can omit firms that later delisted or merged, creating survivorship and possibly timing bias. Seek historical membership, announcement and effective dates. Adjusted prices are useful for continuous returns, but a simulation of historical thresholds, order prices and share quantities needs internally consistent treatment of corporate actions.
Cleaning can leak future information through full-sample imputation or filters chosen after seeing the whole history. Run the pipeline once on a truncated dataset and once on all observations, then compare features before the cutoff. Unexplained changes reveal time dependencies that a final equity curve may conceal.
Attach a minimal evidence snapshot to each order: inputs, availability times, signal and submission time. Reject orders predating required inputs. Allow for transmission and computation instead of assuming simultaneous availability. A classmate should be able to explain the order from the snapshot without referring to subsequent prices.
The GUTL perspective
Timestamps are evidence. Record publication, receipt and order times so later answers do not enter earlier decisions.
Everyday example
A score prediction made after watching match highlights is not a pre-match forecast. Historical analysis needs the same timing boundary.
Simulation example
A signal calculated at Friday’s close cannot drive a fill at Friday’s open. Doing so uses future information in the backtest.
Can the latest economic data cause look-ahead bias in a backtest?
Yes, if the latest value was first released or revised after the simulated decision. Use the vintage published and obtainable by the decision cutoff.
Student comments
Further reading
3 articles-
Out-of-sample data
Data held out from designing and tuning a strategy. Lock the rules before testing on the independent range.
-
Backtest
Applying a written trading rule to historical data to simulate fills, costs and performance using information available at each decision.
-
Economic surprise
The difference between a first economic release and the pre-release consensus. Reviews need the release time and data vintage.