Recency-Weighted Training Samples
Instead of treating every historical training example as equally important, recency weighting tells a model to pay more attention to recent data — useful when markets change character over time, but risky if pushed too far.
Prerequisites: Reframing Forecasting as Supervised Learning, Recency Weighting and Decay in Training Samples
Train a model on ten years of market data and, by default, most training procedures treat a random day from 2016 exactly the same as a day from last month — one example, one vote, in the loss function that gets minimized. But markets aren't static: correlations shift, volatility regimes change, and a relationship that held in 2016 might have reversed by now. Recency weighting is a simple fix: give more weight in the loss function to more recent training examples, so the model fits itself preferentially to how things behave now, not to an average of how things have behaved across a decade.
How the weighting works
Instead of a plain average loss over all training examples, recency weighting multiplies each example's contribution to the loss by a weight that decays going backward in time — often an exponential decay, , where is the most recent training date, is the date of a given example, and is a decay factor just under 1 (say, 0.999 per day). A recent observation gets a weight close to 1; an observation from years ago gets a weight close to zero, so it barely moves the fitted model even though it's technically still "in" the training set.
In plain English: rather than throwing away old data outright (which wastes information — old data can still teach the model general shape and structure), the weight just turns the dial down on how much old examples get to argue with recent examples when they disagree.
Worked example: choosing a half-life
Suppose you set the decay so the weight halves every 250 trading days (roughly a year) — a "half-life" of one year. An observation from exactly one year ago carries weight relative to today's weight of ; an observation from two years ago carries ; from four years ago, . If the model is being fit with mean squared error, a four-year-old data point now contributes about 6% as much to the total loss as an equivalent-sized error on today's data point — present but nearly silent. Compare that to a one-month half-life: an observation from four years ago (roughly 48 half-lives back) would carry a weight of , a number so close to zero it is functionally deleted from training, leaving the model reacting almost entirely to the last few weeks.
The trade-off: adaptivity versus sample size
A short half-life makes the model track regime changes fast but effectively shrinks the usable training sample to a small recent window, which increases variance in the fitted parameters — the model has less genuine data to learn stable patterns from, and can overfit to a few recent, possibly unrepresentative weeks. A long half-life uses more effective data and produces more stable estimates but is slow to adapt when the market genuinely does shift character. There's no universally correct half-life; it's typically chosen by testing several candidates on a walk-forward basis and picking whichever produces the best out-of-sample forecasts over time, not the best in-sample fit.
Watch how the running average settles as more data accumulates — recency weighting is the mirror image: it deliberately keeps the "effective" amount of data small and recent rather than letting an estimate settle on the full, possibly stale, history.
What this means in practice
Recency weighting is standard in production alpha models and volatility forecasts precisely because financial relationships are non-stationary — a covariance structure or a factor's average return genuinely does drift over years. It is not free, though: an aggressively short half-life can make a model chase noise in the last few weeks, mistaking a temporary blip for a permanent regime shift.
Recency weighting multiplies each training example's contribution to the loss by a weight that decays with age (commonly exponential, set by a half-life), letting a model track evolving market behavior without discarding older data outright. Shorter half-lives adapt faster but shrink the effective sample size and raise the risk of overfitting to recent noise.
A common mistake is tuning the half-life by checking which value gives the best fit on the training data itself — that will always favor the shortest possible half-life, since a model that only "remembers" the last few days can fit those days almost perfectly. The half-life must be chosen using genuinely out-of-sample, walk-forward evaluation, not in-sample fit quality.
Related concepts
Practice in interviews
Further reading
- de Prado, Advances in Financial Machine Learning, ch. 4
- Hyndman & Athanasopoulos, Forecasting: Principles and Practice, ch. 12