Skip to main content
AI Fin Hub

Playground

Walk-Forward Validator

Rolling or expanding IS/OOS windows from a returns CSV. Per-window Sharpe, walk-forward efficiency ratio, concatenated OOS equity curve. Free,

Runs in your browser. Nothing you enter is uploaded, and no account or API key is needed.

Education, not investment advice. Past performance does not predict future results. How we check our numbers.

Load a returns CSV

Long format: date,returns. Simple daily returns. Walk-forward is meaningful only with enough observations — aim for 2+ years (~500+ rows). Entirely client-side.

Combine walk-forward efficiency with Backtest Overfitting Score for the PBO / DSR angle.

How to use it

  1. Upload your return series (CSV).
  2. Set the in-sample length, out-of-sample length, and step, and choose rolling or expanding mode. The number of windows follows from these versus the length of the series.
  3. Run the validator. It reports each window's in-sample and out-of-sample Sharpe plus a concatenated out-of-sample curve.
  4. Read the walk-forward efficiency (mean out-of-sample Sharpe divided by mean in-sample Sharpe): below 0.4 is likely overfit, 0.4 to 0.7 is some decay, above 0.7 is robust. An aggregate out-of-sample Sharpe below 0.3 flags a weak edge regardless.
  5. If validation fails, do not iteratively re-tune until it passes — that defeats the purpose. Reformulate the strategy from first principles instead.

Questions people ask

What does this validate?

Whether an optimization generalizes out of sample. You give it a return series; it slides in-sample / out-of-sample windows across the series and reports each window's in-sample and out-of-sample Sharpe plus an aggregate walk-forward efficiency. It does not see your strategy's parameters — it works from the returns you supply.

What's the difference between this and the visualizer?

The visualizer shows window-by-window detail interactively. The validator runs the full walk-forward and reports per-window Sharpes plus an aggregate efficiency verdict band. Use the validator for a quick robust-versus-fragile read; use the visualizer to diagnose which windows fail.

What decides the verdict?

There is no strategy-parameter check, median rule, or lifetime-P&L rule. The verdict is a band on two aggregate numbers: walk-forward efficiency (mean out-of-sample Sharpe divided by mean in-sample Sharpe) and the aggregate out-of-sample Sharpe. Efficiency below 0.4 flags likely overfitting, 0.4 to 0.7 is some decay, above 0.7 is robust; an aggregate out-of-sample Sharpe below 0.3 flags a weak edge regardless.

How many windows do I need?

You don't set a window count directly — the number of windows falls out of your in-sample length, out-of-sample length, and step versus the length of the series. More windows give a steadier efficiency estimate; a handful is enough for a rough read but leaves the aggregate Sharpe noisy.

Can I tune the strategy based on validator feedback?

If you tune until validation passes, you've used the validator as just another in-sample fit, which defeats the purpose. The validator should be a final gate, not an iterative optimizer. Use a held-out 'final' window that's never seen by the validator until the strategy is otherwise locked.

  • Calculators Backtest Overfitting Score

    Upload a backtest trade log and compute Probability of Backtest Overfitting (PBO), Deflated Sharpe Ratio, and the odds your edge survives live trading.

  • Calculators Risk-Adjusted Returns Calculator

    Paste a returns CSV. Sharpe, Sortino, Calmar, Omega, alpha, beta, tracking error, information ratio, max drawdown, and tail moments — plus.

  • Playgrounds Pair Trading Cointegration Tester

    Paste two price series. Engle-Granger cointegration test: OLS hedge ratio, Augmented Dickey-Fuller on residuals, Ornstein-Uhlenbeck half-life, z-score.

All articles
  • Workflow Validate your strategy

    Pressure-test a quant or LLM-augmented strategy before paper-trading or production.

Use it from code

The same calculation as a JavaScript module you can import. It runs where you import it, with no request, key or rate limit.

import { compute } from "https://aifinhub.io/engines/walk-forward-validator.js";

Input and output contract and the guide for agents.