Quant Memo
Core

Label Horizon Selection

Choosing how far ahead a machine-learning label looks — one bar, one hour, one day — shapes everything downstream: too short and the label is mostly noise, too long and you run out of independent examples to learn from.

Prerequisites: In-Sample and Out-of-Sample Protocol

Before you can train a model to predict anything, you have to decide what "correct" looks like — and in finance that means picking a label horizon: how far into the future you measure the outcome you're trying to predict. Label the return over the next single minute and you're mostly labeling noise; label the return over the next quarter and you'll have painfully few independent examples to learn from, since overlapping quarters aren't really separate observations. The horizon isn't a minor implementation detail — it defines what phenomenon the model is even capable of learning.

The tradeoff: signal decay versus sample count

Every predictive signal has a decay profile — how quickly its edge fades as the horizon lengthens. A short-horizon microstructure signal (order flow imbalance, say) might predict the next few seconds well but say nothing about tomorrow; a slow fundamental or macro signal might say nothing about the next minute but predict returns over weeks. Choosing a horizon shorter than the signal's natural timescale buries a real effect in noise; choosing one much longer than the timescale dilutes it, and heavily overlapping labels (day-2's label uses almost the same price path as day-1's) also inflate the apparent number of training examples while the effective number of independent ones stays small. The right horizon is the one that roughly matches how long the underlying phenomenon you're modeling actually persists.

Worked example: horizon sweep for a mean-reversion signal

Suppose you're testing a signal built from a stock's deviation from its 20-day moving average, on daily bars, and you sweep the label horizon:

HorizonCorrelation with signalIndependent samples (5 yrs)
1 day0.02~1,250
5 days0.09~250
20 days0.11~63
60 days0.04~21

The correlation peaks around a 5–20 day horizon, roughly matching the mean-reversion signal's own construction window, then fades at 60 days as the effect washes out — but note that even at the "best" horizon, the number of independent (non-overlapping) samples has shrunk from 1,250 to 63, which is a serious loss of statistical power. The practical choice usually lands where correlation is still near its peak but the sample count hasn't collapsed too far — here, 5 or 10 days, not the single best-looking 20-day point, which is also the easiest one to have overfit to.

label horizon (days) signal correlation independent samples
Correlation with the label rises then decays as horizon lengthens, while the number of independent (non-overlapping) samples falls steadily — the usable horizon sits where both are still reasonable, not at the single peak of either curve.

What this means in practice

Pick the horizon from the economics of the signal first — how long should this effect plausibly persist — and only then confirm it empirically, rather than grid-searching horizons and picking whichever number tests best; a horizon chosen purely by hindsight-fitting a correlation curve is a classic way to overfit before a single feature is even built. When labels overlap heavily, account for it explicitly (block-based validation, adjusted standard errors) rather than treating each overlapping row as an independent observation.

Label horizon determines what timescale of market behavior your model can possibly learn: too short and the label is dominated by noise, too long and overlapping labels quietly shrink your effective sample size. Choose it to match the natural decay timescale of the signal, not by grid-searching for whichever horizon backtests best.

Related concepts

Practice in interviews

Further reading

  • de Prado, Advances in Financial Machine Learning, ch. 3
ShareTwitterLinkedIn