Purged Cross-Validation for a Return Model With Overlapping Labels

Last updated: November 29, 2026

Quick Overview

You train a gradient boosted model to predict each stock's 10-day forward return from daily features, and standard shuffled 5-fold CV reports an information coefficient far above what a forward test shows. Explain why and design a validation scheme that gives an honest estimate.

Trexquant
Machine Learning
Machine Learning Engineer
Trexquant
November 29, 2026
Machine Learning Engineer
Onsite
Machine Learning
Medium

0

0

0 solved


You train a gradient boosted model to predict each stock's 10-day forward return from daily features, and standard shuffled 5-fold CV reports an information coefficient far above what a forward test shows. Explain why and design a validation scheme that gives an honest estimate.

Applying ML to financial time series is a large part of how a systematic fund turns many features into signals, and leakage in validation is the most common way it goes wrong. The interviewer wants you to identify label overlap and serial correlation as the leak and to describe purging, embargo and walk-forward evaluation concretely.

What the Interviewer Expects
  • Identifies that overlapping 10-day labels leak across shuffled folds
  • Explains serial correlation of features and cross-sectional correlation within a date
  • Describes purging training samples whose label window overlaps the test window
  • Adds an embargo after each test block
  • Proposes walk-forward evaluation with the same metric used in production (daily IC or portfolio Sharpe)
Key Topics to Cover
time series cross-validation
label leakage
purging and embargo
information coefficient
walk-forward
How to Approach This
  1. Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
  2. Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
  3. Feature engineering is often more impactful than model selection.
  4. Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
  5. Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
  • How long should the embargo be and what sets it?
  • Why split by date rather than by stock?
  • How do you tune hyperparameters without leaking through the validation set?
  • What does a combinatorial purged CV buy you over a single walk-forward path?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Explore ML Interview Prep
Sample Answer
Clarify

Samples are (date, stock) pairs; the label at date t is the return from t+1 to t+10. Features include rolling windows of 20 to 250 days. The metric is the daily cross-sectional rank IC between predict...

Approach

Find the leak, then build folds by contiguous date blocks with purging and an embargo, and confirm with a walk-forward test....


Submit Your Answer
Markdown supported

Related Questions