A walk forward test checks the rule on data it was not fitted to, one stretch after another
A single split into train and test is one test. Walk forward repeats that split across time. Fit the rule on an in sample window, freeze its parameters, trade the next window out of sample, record the result, then slide both windows forward and fit again.
The point is to mimic how the rule would really be used. A trader refits on what is known and trades the next period, rather than picking the best settings after seeing the whole history. Walk forward keeps that order and shows whether parameters chosen in one period still work in the next.
The chart marks one split on the Nifty 50 close: fit on the sessions before the marked date, test on the sessions after it. In a full walk forward the split moves through the history, and the out of sample stretches are joined into one record.
Three choices change the answer: the window lengths, the step size and the way parameters are picked. A rule that works only with one window length has shown little. Count these choices, as the overfitting page explains, because each one is a chance to fit noise.
Walk forward does not prove a rule either. Markets change regime, and lot sizes and expiry rules change too. A rule that held through one stretch can fail in the next, so the useful output is the spread of out of sample results over time, not the best single period.
Before you trade. Derivatives trading carries a high risk of loss. SEBI's study "Profitability of Individual Traders in the Equity Derivatives Segment (FY25 to FY26)" (August 2026) found that 87.7% of individual traders in equity F&O made net losses in FY26, with aggregate net losses of Rs 91,685 crore. Read the SEBI study