Skip to content

Cross-validation

When trading strategies with an impressive backtesting performance are presented with new data, they often prove to be very brittle, or sometimes even fail catastrophically. The reason is backtest overfitting, which may be detected and prevented by a proper cross-validation.

  • We'll start with manual cross-validation, then review a variety of splitting schemes and split distribution analysis techniques, and, finally, get our hands dirty while learning how to automate various cross-validation steps: from splitting regular arrays and complex vectorbt objects, to testing entire parameter-based and ML-based pipelines 🔥
  • Example: Median Sharpe by market regime


View