Out of sample

Test on data not used in development to verify whether results transfer beyond the initial historical period.

On this page

Who this is for — Anyone who built a strategy on historical data and wants to verify whether it works outside the "terrain" where it was born.

Out of sample is the data block kept separate from the development phase. Rules are fixed on the in-sample set, then evaluated on this "new" period without tweaks.

In plain terms — It is the honest test: if you change the questions after seeing the answers, you are no longer validating — you are adapting.

Bronze prerequisite — Before this lesson: trading-journal, trade-result, trading-mistake. See bronze-path.


What it really shows

Out-of-sample does not seek perfection; it seeks coherence:

  • result structure similar to backtest;
  • drawdown in line with planned risk management;
  • no systematic collapse as soon as the period changes;
  • understandable method behaviour, not random.

If the method lives only in the development sample, you often have overfitting.

Example — Moving-average strategy optimised on 2018–2022. On 2023–2024 (out-of-sample) it loses frequently in sideways markets: rules too specialised for the prior trending period.


Good operational practices

  1. Freeze parameters before opening the out-of-sample dataset.
  2. Evaluate real costs too: slippage-and-fees.
  3. If the test is coherent, proceed with forward-test.
  4. If it is not coherent, revisit base logic — not only parameters.

Card

  • What it is: independent data slice used to validate an already defined method.
  • When to use it: after backtest and before the live phase.
  • Typical mistake: tweaking parameters after every negative result.

Silver path — Module: Validation. Part of silver-path.