Purged Cross-Validation Explained: Why Shuffled K-Fold Leaks in Stock Research, and How Purging and Embargo Fix It

November 9, 2026 · Guides · 9 min read

Published by , founder of Equity Rank

Purged Cross-Validation Explained: Why Shuffled K-Fold Leaks in Stock Research, and How Purging and Embargo Fix It

Cross-validation is the standard way to measure a model on data it was not trained on. Split the history into k folds, train on all but one, measure on the one left out, and repeat until every fold has been the test set once.

The method assumes the observations are independent. Daily stock research usually breaks that assumption, and when it does, ordinary cross-validation measures skill that is not there. This guide explains why, and how two adjustments — purging and an embargo — restore an honest measurement.

Where the leak comes from

Most stock signals are judged against a forward return: the return over the next month, or the next quarter, from each scoring date. Score every trading day and the labels overlap heavily.

Most useful features are also persistent: a valuation ratio, a quality score or a slow-moving trend changes little from one day to the next.

Put those two facts together. Tuesday's features look almost exactly like Monday's, and Tuesday's answer is almost exactly Monday's answer. If Monday sits in the training set and Tuesday in the test set, a flexible model can look up Monday and "predict" Tuesday nearly perfectly — without having learned anything about future returns. (The same overlap also inflates t-statistics; see Overlapping Returns and Newey-West.)

Three ways to split the history

Method How the folds are formed Leak
Shuffled k-fold Days assigned to folds at random Severe: almost every test day has a training neighbour sharing most of its label
Blocked k-fold Folds are contiguous stretches of time Smaller: only at the edges of each block
Purged k-fold Blocked, then any training day whose label window overlaps the test block's label windows is removed Label overlap removed

An embargo goes one step further: after purging, it also drops a short stretch of training days immediately after each test block, in case information from the test period carries forward into later observations.

A simulation: a signal with no skill

To measure the size of the leak, a seeded simulation (seed 20261109) built 300 hypothetical histories, each 2,520 trading days long (about ten years). Each day had a persistent feature (day-to-day autocorrelation 0.999) and an independent daily return. The feature had no relationship to future returns at all: the true information coefficient is zero.

A flexible model (5-nearest-neighbour regression) was fitted to predict the forward return from the feature, and its skill was measured as the information coefficient (IC) — the correlation between predicted and realised forward returns (see The Information Coefficient Explained). Each validation method was compared with a genuine holdout: the model trained on the full ten years and tested on the following three years, after a gap at least as long as the label.

21-day forward returns, 5 folds

Validation method Average IC Histories with IC above 0.05
Shuffled k-fold 0.150 95%
Blocked k-fold −0.002 20%
Purged k-fold −0.003 19%
Purged k-fold + embargo −0.001 22%
Future holdout (true out-of-sample) 0.009 33%

63-day forward returns, 20 folds

Validation method Average IC Histories with IC above 0.05
Shuffled k-fold 0.248 100%
Blocked k-fold 0.022 34%
Purged k-fold 0.003 25%
Purged k-fold + embargo 0.004 24%
Future holdout (true out-of-sample) 0.004 36%

Embargo of 25 trading days. All figures are hypothetical outputs of the stated simulation, not results of any real strategy or of Equity Rank output.

What the tables show:

With a small amount of real skill

The same simulation was repeated with a weak genuine link between the feature and future returns. On quarterly labels with 20 folds, the future holdout measured an average IC of 0.037. Shuffled k-fold reported 0.310 — more than eight times the holdout figure. Blocked k-fold reported 0.028 and purged k-fold 0.008. Purging erred on the cautious side here, partly because each cross-validation model trains on less data than the full-history holdout model; a method that understates a real effect is a far smaller problem than one that invents a large one.

Common mistakes

A checklist for reading a model-validation result

  1. How were the folds formed — shuffled, blocked, or purged?
  2. How long is the label, and was every training day whose label overlaps a test block removed?
  3. Do any features use trailing data that could include the test period, and was an embargo applied?
  4. How many folds, and how large is the gap between training and test data relative to the label length?
  5. Is there a genuine future holdout — and how wide is the uncertainty on it?
  6. How many model variations were tried before this one was reported?

The method behind purging and embargo is set out in Marcos López de Prado's Advances in Financial Machine Learning (2018), chapter 7. For the wider family of backtest errors, see Backtest Biases Explained.


This content is for educational and informational purposes only and does not constitute investment advice. Equity Rank is not a registered investment adviser. All signals, information coefficients and simulations in this article are hypothetical illustrations generated from stated assumptions; they are not the results of any real fund, security, strategy, or Equity Rank output, and they do not predict future results.