Walk-forward testing optimises a strategy on one block of historical data, then tests it on the next block it has never seen, then rolls the window forward and repeats. The result is many out-of-sample results rather than a single in-sample curve — which is the only way to tell an edge from a curve fit.
A standard backtest lets you tune parameters using the same data you then measure on. That's marking your own homework. You will always find settings that look excellent in hindsight, because with enough parameters you can fit any past. Walk-forward removes that circularity.
Split history into sequential blocks. Optimise on block 1, then run those fixed settings on block 2 and record the result — that's one out-of-sample fold. Slide forward: optimise on block 2, test on block 3. Repeat across the whole dataset. You finish with a series of results from data the strategy never saw during tuning.
Look at the proportion of folds that were profitable, not the total. A strategy passing 21 of 32 folds (about 66%) is telling you it works more often than not, with real losing stretches. A strategy that passes every fold is usually a sign the test was too easy or the windows overlapped.
Walk-forward is much better than a plain backtest but it isn't proof. It still uses historical data, still needs realistic costs modelled, and still can't anticipate a genuine regime change. It reduces self-deception; it doesn't eliminate risk.
Enough to cover varied conditions — we use 32 across roughly six months of data. More folds across more market regimes is better.
Walk-forward is a structured, repeated form of out-of-sample testing that rolls through the whole dataset rather than testing once.
No. It reduces the chance you're fooling yourself, which is different from a guarantee.