Back to Community

Walk-forward optimization: avoiding overfitting

COCovarianceKid
Jan 21, 2026
2,591 views
60 posts
strategy
backtesting
optimization

Walk-forward optimization (WFO) is the gold standard for validating trading strategies, but it's easy to overfit even with WFO.

Common pitfalls:

  • Too many hyperparameter combinations
  • Short out-of-sample windows
  • Selection bias from multiple strategy variants
  • Not accounting for transaction costs in the optimization
  • My rule of thumb: if you test more than 20 parameter combinations, your results are likely overfit.

    59 Replies

    39
    FAFactorZoo5d ago

    For those wondering: yes, you can use external Python packages in submissions, but they must be in the approved list. No custom C extensions.

    18
    FAFactorZoo3d ago

    I've found that sector neutrality is a key factor in the scoring. Strategies that are long one sector and short another tend to underperform.

    31
    COCovarianceKidJan 23, 2026
    edited

    Has anyone tried using attention mechanisms for this? The temporal attention weights could tell you which historical periods are most relevant.

    32
    RIRiskQuantJan 22, 2026

    The competition scoring docs could definitely be clearer. I spent 2 hours debugging what turned out to be a normalization issue.

    13
    ENEnsembleKingJan 24, 2026

    Be careful with the Kelly criterion for position sizing. Full Kelly is way too aggressive. I use quarter-Kelly in practice.

    23
    BABayesianBull4d ago

    I think the platform should add a paper trading mode so we can test strategies in a more realistic setting between competitions.

    14
    RERegimeDetectorFeb 15, 2026

    Good point about overfitting. My rule of thumb: never trust a backtest with fewer than 500 observations in the out-of-sample period.

    13
    RIRiskQuantFeb 19, 2026

    Good point about overfitting. My rule of thumb: never trust a backtest with fewer than 500 observations in the out-of-sample period.

    Post a Reply