Search the docs⌘K
Glossario
Intermediate
ENIT

Walk-forward replay

UPDATED 2026-08-02

Walk-forward replay is the way a backtest moves through history: forward one step at a time, in strict chronological order, with each simulated decision using only the information that existed on that date and never anything later. The simulation holds a position in time — a cursor — and at every step it can read the past and the present but not the future, because from the cursor's point of view the future has not happened yet. This is the structural defence against look-ahead bias: a decision dated 2015 cannot draw on 2016 data, not because a rule forbids it but because the replay has not reached 2016.

Also seen as: Forward replay, chronological replay, point-in-time replay

Why does replaying forward prevent look-ahead bias?

Replaying forward takes look-ahead out of the computation by making future data unavailable rather than merely off-limits. The distinction matters, because look-ahead bias is almost never deliberate — it slips in when a value carrying a later date is joined to an earlier one, and a test that has the whole history in hand at once has no way to notice.

Formally, the constraint is that the decision at each date is a function of that date's information only:

wt=f(Ft)w_t = f(\mathcal{F}_t)

where wtw_t is the set of target weights the strategy holds at date tt, ff is the strategy's rules, and Ft\mathcal{F}_t is the information available up to and including tt — prices already printed, filings already published, indicators computable from both. A test whose decision at tt uses any part of Ft+k\mathcal{F}_{t+k} for k>0k > 0 has look-ahead bias, however small the leak. Walk-forward replay enforces the constraint by construction: at step tt, nothing after tt has been read.

What happens at each step of the replay?

Each step is the same four operations, repeated for every date in the period:

  1. Advance the cursor to the next date in the period.
  2. Read what is knowable at that date — the prices and reported figures already available on it.
  3. Apply the rules to that information: derive target weights, check exit conditions, decide whether this date is a rebalance date.
  4. Record the outcome — the resulting positions, the trades, and the portfolio value that becomes one point on the equity curve.

Then the cursor moves on, carrying the positions it just recorded and nothing else. Because step 2 always precedes step 3, the information a decision uses is fixed before the decision is made, and because step 4 only writes, no later date can reach back into an earlier one.

Worked example: the replay cursor on one rebalance date

A strategy rebalances monthly, and the replay's cursor reaches the close of 28 February 2018.

At that step the replay
can readevery price printed up to and including the 28 February close; every company filing published on or before 28 February; any indicator computable from those
cannot readthe 1 March price; a filing dated 20 March that describes the quarter ending 31 December; anything at all from 2019

From that information it derives the month's target weights. The resulting rebalance trades are modelled to fill at the Open of the first trading day after the rebalance date — so the decision is taken on the 28 February close and the fill happens at the 1 March open, a price the decision did not know. See execution time for which bar price a fill books at.

The cursor then advances to 1 March and repeats. When it reaches December 2018 it still knows nothing about 2019, even though the run as a whole will continue to the present — the strategy meets each year for the first time, in order, exactly once.

How is walk-forward replay different from walk-forward optimization?

They are different things that share a name, and confusing them is common:

  • Walk-forward replay is how one simulation moves through time. No parameters are chosen and nothing is fitted; the rules are fixed before the run and applied at every step. Every honest backtest is a walk-forward replay.
  • Walk-forward optimization — also called walk-forward analysis — is a research procedure that repeatedly fits a strategy's parameters on one window of history and then tests those parameters on the window immediately after it, rolling both windows forward. It contains replay, but it adds parameter fitting on top.

The two answer different questions. A replay answers "what would these rules have done?"; walk-forward optimization answers "would parameters chosen from the past have held up in the period after?" A Fincanva backtest is the first: it replays the rules you stated and does not auto-tune or optimize your parameters against the past, so the result reflects your rules rather than a fit to the history they ran on.

Defaults in Fincanva

  • A backtest replays your rules in chronological order, from the earliest year your chosen instruments allow, to the latest available market close — never into the future.
  • The end point follows the newest data rather than today's calendar date, and results refresh daily as new market data arrives, so the cursor's finish line moves forward as the data does.
  • Rebalance-driven trades are modelled to fill at the Open of the first trading day after the rebalance date, which keeps the decision date and the fill date distinct.
  • The rules replayed are the ones you stated: Fincanva does not tune or optimize your parameters to fit the past for you.
  • Screener analysis re-centres each match on its own selection date instead of the calendar — see event-time path — which is a different alignment of the same forward-only data, not an exception to it.

What does walk-forward replay not protect you from?

Walk-forward replay fixes when information reaches a decision. It does nothing about what you tested, how many times you tested it, or how you read the answer:

Still possible after a clean replayWhy the replay does not touch it
Selection biasyou chose the instruments and the period; the replay honours that choice faithfully
Cherry-picking biasthe replay produces the full result; which part of it gets quoted happens afterwards
Confirmation biasthe replay reports; reading is yours
Cost-ignoring biasa correctly ordered replay of a cost-free world is still cost-free
Data-quality biasreplaying wrong numbers in the right order still gives a wrong answer

A backtest can therefore be entirely free of look-ahead bias and still be misleading, which is why the replay is a floor rather than a guarantee. See how a backtest works in Fincanva for the run in more detail and the nine biases Fincanva helps you avoid for the product behavior in context.

Backtests show what would have happened — not what will. Fincanva provides no financial advice — see Is this financial advice?.

Where this term is used

Generated · 1 pages

The pages that reference this term — so a term page is somewhere you pass through, not somewhere you land and stop.

Fincanva provides no financial advice. Backtests show what would have happened — not what will.

GLOSSARY · 193 TERMS