Walk Forward Validation Without Lookahead for Return Forecasts

Last updated: November 29, 2026

Quick Overview

You are asked to evaluate a model that forecasts next day returns for a set of futures using features built from rolling windows of past data. Explain why standard k fold cross validation is wrong here and design a validation scheme that avoids leakage.

DRW
Machine Learning
Quantitative Researcher
DRW
November 29, 2026
Quantitative Researcher
Technical Screen
Machine Learning
Medium

0

0

0 solved


You are asked to evaluate a model that forecasts next day returns for a set of futures using features built from rolling windows of past data. Explain why standard k fold cross validation is wrong here and design a validation scheme that avoids leakage.

Leakage is the most common reason backtests at trading firms look good and then lose money live. DRW interviewers expect you to name the specific leakage channels in time series data and propose purging, embargoes, and walk forward retraining.

What the Interviewer Expects
  • Explains how shuffled folds leak future information
  • Identifies overlap leakage from rolling features and multi day labels
  • Proposes walk forward or expanding window evaluation
  • Adds purging and an embargo between train and test
  • Mentions leakage in preprocessing such as normalization and feature selection
Key Topics to Cover
cross validation
data leakage
time series
purging and embargo
backtesting
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 large should the embargo be?
  • How do you tune hyperparameters inside this scheme?
  • What leakage can come from the data vendor itself?
  • How would you detect leakage after the fact?
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

Features use windows up to 60 days back. Labels are next day returns, or sometimes 5 day returns, which overlap. Data covers 10 years....

Approach

Shuffled k fold puts days from 2023 in training when testing 2022, so the model learns regime information from the future. Even with time ordered folds, rolling features and overlapping labels near th...


Submit Your Answer
Markdown supported