Skip to main content

Walk-Forward Validation

In short

Testing RL models on future data not seen during training — prevents overfitting

Walk-forward validation trains the AI on old data, then tests it on the next period — then repeats. This mimics real-world conditions and prevents the AI from 'memorizing' the training data instead of learning real patterns.

Walk-forward validation divides historical data into rolling windows: train on period 1, test on period 2, then train on 1+2, test on period 3. It detects overfitting (great training performance, poor test performance) and provides realistic performance estimates.

Related concepts

  • Reinforcement LearningRL is how an AI learns to make decisions by trying things and getting rewards or penalties. Think of training a dog — good moves get treats, bad moves get nothing. The AI keeps adjusting until it finds the best strategy.
  • RL Model TrainingTraining the RL model means running the AI through years of historical market data thousands of times, letting it learn from its mistakes. Like a chess AI playing millions of games — it gradually figures out what works.
  • Sharpe RewardInstead of rewarding the AI just for making money, we reward it for making money efficiently relative to risk. An AI rewarded with Sharpe ratio learns to avoid unnecessary risks and build consistent returns.
  • Maximum DrawdownIf your portfolio hit $10,000 then fell to $6,000 before recovering, the max drawdown is 40%. It measures the worst experience a real investor would have endured.