entekhab.netentekhab.nettrilingual encyclopedia

In-Sample versus Out-of-Sample

ENGLISHIn-Sample versus Out-of-Samplereference
فارسیدرون‌نمونه در برابر بیرون‌نمونهRecommended equivalent
کوردیناو-نموونە بەرامبەر دەرەوەی-نموونەProposed equivalent — not standard
Category
Algorithmic Trading
Level
Professional

Simple definition

In-sample is the data you used to build the rule. Out-of-sample is data the rule never saw. Only the second says anything about what happens next.

Professional definition

The split between observations used to choose a rule's form and parameters and observations reserved to evaluate it. In-sample statistics measure fit; out-of-sample statistics are the only estimate of generalisation, and they stop being out-of-sample the moment a result from them changes the rule.

Technical definition

The distinction is about information flow, not about dates. A held-out period is out-of-sample only while no decision has been informed by it: looking at it, rejecting the rule, adjusting and looking again consumes it, and after a few such rounds it measures fit as surely as the training set does. Financial series make this worse than in cross-sectional problems, because observations are serially dependent, so a random split leaks information, and regimes mean one out-of-sample window is a single draw rather than a distribution.

Academic definition

The partition of a sample into an estimation set used to select model structure and parameters and an evaluation set used only to assess generalisation, with validity conditional on the evaluation set having informed no modelling choice.

Mechanism

A fitting procedure minimises error on the data it can see, so in-sample error is a biased estimate of future error by construction, and the bias grows with the flexibility of the search. Holding data back does not remove that bias from the fit; it supplies a second, independent measurement — which is exactly why its value is destroyed by reuse.

In practice

Who uses it
Strategy developers, quantitative researchers, and anyone reading a performance record someone else produced.
Why it matters
It is the only way to get an estimate of future performance from historical data that the fitting process has not already contaminated.
Limitations
One out-of-sample window is a single sample of one regime. A good result there is weak evidence, and a reused window is no evidence at all.

Common mistakes

  • Re-testing on the same held-out period after each change.
  • Splitting serially dependent data at random.
  • Reporting in-sample statistics as the headline result.

Examples

numeric

Eight years of data are split six in-sample and two out-of-sample. The tuned rule returns 40 percent a year in-sample and 4 percent out-of-sample: the out-of-sample figure is one tenth of the fitted one, and it is the only one worth quoting.

Given
  • total sample = 8 years
  • in-sample = first 6 years, out-of-sample = last 2 years
  • illustrative in-sample annual return 40%
  • illustrative out-of-sample annual return 4%
Steps
  1. degradation ratio = 4 / 40 = 0.10
  2. out-of-sample length = 2 years, so the estimate rests on two annual observations
out-of-sample performance is 10% of in-sample; the estimate itself is very imprecise

Illustrative figures. The second line is the point practitioners skip: a two-year out-of-sample window gives a noisy estimate even when the protocol was followed honestly.

research

A researcher tests on the held-out years, is disappointed, adds a volatility filter and tests again. The second test is in-sample: the held-out years have now informed the rule, and a third split would be needed to measure anything.

Related terminology

related
Backtesting Walk-Forward Testing Overfitting Curve Fitting Parameter Optimisation Data Snooping Lookahead Bias Feature Leakage Moving Window Sample versus Population
Commonly confused with

Walk-Forward Testing

A single split produces one in-sample and one out-of-sample period. Walk-forward testing repeats that split rolling forward, so the reported result is a sequence of out-of-sample segments rather than one window.

Sources

Technical Analysis: Modern Perspectives
CMT Association · chapters on out-of-sample validation of rule-based methods
https://cmtassociation.org/wp-content/uploads/2019/01/Technical-Analysis-Modern-Perspectives-CMT-Association.pdf URL verified
Portfolio Performance Evaluation (refresher reading)
CFA Institute · cautions on inference from historical performance records
https://www.cfainstitute.org/insights/professional-learning/refresher-readings/2026/portfolio-performance-evaluation URL verified

Editorial status

Needs expert reviewconsensusv1.02026-11-05

Flagged by the editor as uncertain on a linguistic, mathematical or regulatory point.

Kurdish headword is a descriptive proposal by this project, matching the wording used in the overfitting and walk-forward entries. The return figures in the example are explicitly illustrative, not observed results.