Look-ahead bias means a past test used facts from the future. A test can get the math right and still use a price or report too soon. Check the clock before you trust the result.

Ask one question: could we know this yet?

A backtest replays rules on past data. Each rule needs data that existed at that point. If the rule uses a day’s closing price, it cannot act on that final price at the start of the same day.

Write down when the data was known, when the signal was final, when the order could be sent and which later price could fill it. A fill is the price at which the test treats an order as traded.

  1. 8:29 — DecisionThe report is not yet known.
  2. 8:30 — ReleaseKeep the first version and when it arrived.
  3. Later — RevisionDo not use this new value in an earlier decision.

These times are made up. This is not a trade or test result.

A report date is not always the date it was known

A report can describe June but first appear in July. A later update may change the June value. The month being measured, the first release and a later revision are three different dates.

The St. Louis Fed explains real-time periods: today’s record of the past may include revisions. ALFRED can show data known in an earlier period. That does not by itself establish the exact minute a trading system received a release.

Try this point-in-time input log

Point-in-time means the version available then. The table below is a made-up timing example. It uses no real economic series, price or return.

Hypothetical report: June data, released July 12 at 8:30
DecisionInput consideredCan this test use it?
July 12, 8:29Report released at 8:30No. The decision is before release.
July 12, 8:31First version of that reportOnly if the system had received it by then. Record that assumption.
July 12, 8:31A revision released August 10No. That revision was still in the future.

Use one time zone throughout the log. Keep the release time and receipt time apart. If you only have a calendar date, say so. Do not invent a minute to make an intraday test work.

ALFRED’s help page also explains that release dates can come from a source, a data provider or first availability in FRED. Check which basis applies to the data you use.

Save these fields beside each input

  • What the value measures and which period it covers.
  • Its first release date and time, when known.
  • The version used and any later revision date.
  • When your system could receive and use it.
  • The signal time, order time and assumed fill.
  • The file or source version needed to repeat the test.

Price bars can leak future facts too

A bar groups prices over a set span of time. Its final high, low and close are not all known at its start. Mixing timeframes can also put a later value on an earlier bar.

TradingView’s repainting guide warns about higher-timeframe requests that leak future values into historical bars. Check the requested timeframe, confirmation timing and value alignment together. A setting name alone does not prove a test is sound.

Review a few trades from input to fill

  1. Pick a normal trade, an early trade and a strong result.
  2. Hide data after each decision time.
  3. Check whether the rule can still produce that signal.
  4. Check that the order and fill happen in a possible order.
  5. Record unknown times and fix the test before reading returns.

This is a suggested audit, not proof that a strategy is free from bias. A one-bar delay can help find a timing issue, but a different result alone does not prove the original was wrong.

Keep other test risks separate

Using today’s list of surviving companies can leave failed ones out. Training a model on the full history can let later data affect earlier choices. Neither problem is solved just by shifting one price row.

Keep the test period out of rule choices, write clear trading rules and use the wider backtest validation checklist.

What a clean timing check can tell you

It can support a narrow claim: the reviewed decisions used data that could have been known under the saved assumptions. It does not prove profit, remove other risks or predict live results.

Risk disclosure

Historical tests are hypothetical, depend on their data and assumptions, and do not predict future results. Removing look-ahead bias does not remove market, model, liquidity, or execution risk. Paper trading also differs from live execution. This material is educational and is not financial advice or a recommendation to trade.