How it works, step by step
- Pick an in-sample window (e.g. Jan–Dec 2022) and an out-of-sample window (Jan–Mar 2023).
- Optimise settings on the in-sample window only.
- Run those settings, unchanged, on the out-of-sample window and record the result.
- Slide both windows forward by the out-of-sample length and repeat.
- Stitch every out-of-sample result into one equity curve.
Reading the result
| What you see | What it suggests |
|---|---|
| Out-of-sample curve rises steadily | The optimising process finds real edges |
| Efficiency above ~50% | Unseen results keep a good share of in-sample results |
| Efficiency near 0% or negative | Optimisation mostly fits noise |
| Wildly different settings each window | No stable edge to find |
Why it matters for prop firms
A challenge is, by definition, out-of-sample: it happens after you built the strategy. Walk-forward results are the closest a backtest gets to what a challenge will feel like. Feed the stitched out-of-sample trades into Challenge Replay instead of the full backtest for a more honest pass rate.
A worked example
Suppose you optimise a moving-average strategy on gold. You use 12-month in-sample windows and 3-month out-of-sample windows, rolling from 2021 to 2025. That gives about 12 out-of-sample quarters. In-sample, the best settings average +18% a year. Stitched together, the out-of-sample quarters average +8% a year. Walk-forward efficiency = 8 ÷ 18 ≈ 44%. Not perfect, but positive: the process of optimising finds something that partly survives. If the stitched result were −2%, you'd know the optimiser was mostly finding noise.
Choosing window sizes
| Choice | Rule of thumb | If wrong |
|---|---|---|
| In-sample length | Long enough for at least 100 trades | Too short: the optimiser fits noise |
| Out-of-sample length | About 20–30% of in-sample | Too long: settings go stale |
| Step | Equal to out-of-sample length | No overlap between unseen windows |
Strategies that trade rarely need longer windows; scalpers can use shorter ones.
Anchored vs rolling
In a rolling walk-forward, the in-sample window keeps the same length and slides. In an anchored one, it always starts at the beginning of the data and grows. Anchored uses more data but adapts more slowly to changing markets; rolling adapts faster but each optimisation sees less. Try both: if they disagree wildly, the strategy's edge is unstable.
Turning the result into a prop firm decision
Export only the out-of-sample trades and replay them against your firm's rules. That pass rate is the most honest estimate a backtest can give, because every trade in it came from settings chosen without seeing it. If it's much lower than the full-backtest pass rate, plan for the lower number.
Common mistakes
- Peeking at the out-of-sample period and re-tuning.
- Windows too short to hold enough trades.
- Optimising so many settings that every window finds something.
- Ignoring costs in the out-of-sample run.




