To know whether a rule really works, you must judge it on data it has never seen. You cut the history: the training set (in-sample) is for building and tuning, the test set (out-of-sample) is for judging.
Classic split: about 70% training, 30% test, in time order (the test comes after). Over 10 years: 7 years to tune, 3 years to judge. Never draw days at random: markets have trends and regimes, and the future must stay in the future.
Expect a decline out of sample. A strategy that keeps half or more of its performance (Sharpe 1.2 → 0.7, i.e. 58%) is still interesting. A drop to zero signals overfitting.
Golden rule: the test is done only once. If you tweak the rule after seeing the test and re-test, the test becomes disguised training (data leakage). Many keep a third slice, the validation set, to choose between variants without touching the test.
Examples
SPLIT-X (fictional market) : Imagine a vertical line two-thirds of the way through this fictional market. On the left you may tune everything. On the right you apply the rule as is, with no tweaks: only that part tells you whether it has value.
2016: McLean and Pontiff : In the Journal of Finance (2016), R. David McLean and Jeffrey Pontiff revisited 97 return predictors published by researchers. After the period studied in the original paper their returns were about 26% lower, and about 58% lower after publication. Even among professionals, out-of-sample performance declines.
Key terms
Training set
Data used to build and tune the rule
Test set
Data set aside to judge the rule only once
Validation
Intermediate period used to choose between a few variants
Data leakage
Test information contaminating the construction of the rule