Why K-Fold Fails on Time-Ordered Data

Random k-fold cross-validation is the default validation tool in every machine learning course: shuffle the data, split into kk folds, train on k1k-1 and test on the held-out fold, rotate. Its guarantee rests on one assumption: that observations are exchangeable, so a random subset is a fair preview of unseen data. Financial data breaks that assumption three distinct ways, and an interviewer asking "why can't you just use k-fold here?" expects all three.

Serial dependence

Market data is autocorrelated: volatility clusters, trends persist, and neighbouring days share information (the statistical background is the stationarity and autocorrelation lesson). Shuffling scatters each fold's near-duplicates of test observations into the training set: Tuesday in test, Monday and Wednesday in train. The model needs only local interpolation to score well, an ability worth nothing live, where the neighbours of tomorrow have not happened yet.

The rest of this lesson is for subscribers

Unlock every lesson in Research Validation and Backtesting, and every other premium course.

Subscribe to continue

Test your knowledge

Questions are only available to subscribers.

Keep reading Research Validation and Backtesting

21 lessons in this course, and every other premium course, on one subscription.

  • Every lesson in every course, with the worked examples and interactive simulators
  • Graded questions on every lesson, with explanations for the wrong answers as well as the right one
  • The trainers, timed assessments and brainteaser library that go with them