Cross-Validation in FinanceCross-Validation in Finance85

Cross-Validation in Finance [/ˈkross-validaʃən ɪn ˈfaɪˌnæns/] n - Standard k-fold cross-validation presumes observations independent and exchangeable. Returns are neither. A random split will set future returns in the training set and past returns in the test set, leaking knowledge backward through time; the fruit is an inflated estimate of performance.

The least remedy is walk-forward validation: train upon an expanding window, predict the next period, then roll onward. This honors causality, yet it does not wholly close the leakage where the training window holds events overlapping the test window.

Purged cross-validation with embargo gap Purged cross-validation with embargo gap

Purged cross-validation strikes out the observations surrounding each test point. If one predicts the one-day return following an earnings announcement, the training set should bar the announcement day and perhaps a window about it. Knowledge diffuses slowly, and the exact cutoff turns upon the signal’s horizon.

Embargo carries the notion further: after each test fold, a gap is enforced ere the next training fold begins, lest the model learn patterns too near in time to the test period. It matters above all for signals whose effects linger long.

Combinatorial cross-validation essays many possible train-test splits and averages their yield, giving a sturdier estimate of variance at a dearer price in computation. For strategies of low signal-to-noise ratio, the sturdiness repays the cost.

The choice of method should answer to the trading frequency. A high-frequency strategy with thousands of observations a day wants other treatment than a monthly macro strategy with dozens a year; the method that reads well in a textbook may squander data in the one case and leak it in the other.

Validation is no substitute for a true out-of-sample period the researcher never touches; see Backtesting and Multiple Comparison Bias. The cleanest validation is a held-out sample kept for a single final test, once every decision upon the model has been made.