In-Sample vs. Out-of-Sample Testing
In-sample (IS) data is the period you use to develop and optimise your strategy. Out-of-sample (OOS) data is held back — untouched — until you have finalised your rules. The OOS result is your one honest estimate of how the strategy will perform on data it has never seen.
Why keep data out of sample?
Every parameter choice you make based on IS results is a form of fitting to that data. The IS Sharpe ratio is optimistic by construction. OOS performance is the only unbiased estimate of future performance — and even it becomes biased the moment you use it to make another decision.
How much data should be out-of-sample?
A common split is 70% IS / 30% OOS, with the OOS period always being the most recent data (never a random sample from the middle of the series — that would introduce look-ahead bias). For strategies with many parameters, consider walk-forward analysis to extract more OOS windows from the same dataset.