FRENESDE

Training and test sets

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

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
Take the mission on Doji Academy

← Back to the index