Walk-forward validation is one way to examine whether a strategy rule transfers to later data. It does not establish future profitability, and its result depends on how windows, costs and selection rules are chosen.
Illustrative split
For example, train a rule using 2018–2020 data and evaluate it once on 2021 data. Then move the training window forward to 2019–2021 and evaluate on 2022. These dates illustrate the sequence; they are not a backtest result or a claim that a particular strategy worked.
Avoiding leakage
Define indicators, parameters, selection criteria and window lengths using training data only. Do not use the 2021 test period to choose a rule before reporting its 2021 outcome. Repeatedly selecting the best rule from test windows turns those windows into training data.
Costs and limitations
Include commissions, spread, slippage, execution timing and asset availability in each test window. Report the number of trades, all out-of-sample windows and uncertainty; a small sample or one favorable market regime cannot establish robust performance.

