Skip to main content
AI Fin Hub

Playground

Walk-Forward Validation Visualizer

Paste a strategy returns CSV; see in-sample vs out-of-sample Sharpe per window plus the IS→OOS drop. Browser-only deterministic math.

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.

Inputs

Daily strategy returns as decimals (0.012 = 1.2%). The benchmark column is optional and not used in the Sharpe split.

Number of test windows

The series is cut into one training block followed by this many back-to-back test blocks.

Training share of each window

120 training days, 48 test days per window (of 504).

Window mode

OOS Sharpe drop vs IS

3%

IS Sharpe 0.66. OOS Sharpe 0.64, 8 windows (rolling).

In-sample vs out-of-sample Sharpe by window

3.50-1.912345678

Light bars: in-sample Sharpe. Dark bars: the following out-of-sample block.

Per-window Sharpe

#IS spanOOS spanIS SharpeOOS SharpeΔ
112048-0.971.36+2.33
2120480.713.46+2.75
3120481.68-1.61−3.29
4120482.400.09−2.31
5120480.371.89+1.52
6120480.16-1.87−2.03
7120481.031.96+0.92
812048-0.13-0.18−0.05

Reading the result

A drop >50% is a red flag — the strategy looks overfit to the in-sample window. 20–50% is typical for honest strategies once costs are added. <20% is rare and worth verifying.

How to use it

  1. Paste daily strategy returns (date, strategy, optional benchmark). A decaying-edge demo loads by default.
  2. Set the number of test windows and the training share of each window. The series is cut into one training block followed by that many back-to-back test blocks.
  3. Choose rolling (fixed-length training window) or anchored (training always starts at the first day).
  4. Read the drop from mean in-sample Sharpe to mean out-of-sample Sharpe and the bar chart of both for every window.
  5. Use the per-window table to see which periods fail. A drop above 50% is a red flag for overfitting.

Questions people ask

What's walk-forward validation?

Iterative out-of-sample validation: optimize on the first N years, test on years N+1 to N+2, then slide the window forward. Repeat. Each test window is genuinely out-of-sample with respect to the optimization. This is much more robust than a single train/test split.

How is window length chosen?

You choose the number of test windows and the training share of each window; the tool sizes the blocks so one training block plus the test blocks cover the whole series. A training span several times the test span (for example 70% training) is common. Shorter test blocks give more windows but noisier Sharpes; longer ones let drift accumulate.

What's the visualization showing?

Paired bars for the in-sample and out-of-sample Sharpe of every window, and a table with each window's spans, Sharpes and the drop between them. The tool works from returns only; it does not see or optimize strategy parameters, so it shows performance decay, not parameter drift.

Should I aggregate the test windows for a single Sharpe?

Yes, and report it next to the in-sample number. This tool shows the mean out-of-sample Sharpe across windows; the Walk-Forward Validator also reports the Sharpe of all out-of-sample days pooled. The in-sample Sharpe is biased upward wherever parameters were fitted on it.

How does this compare to k-fold cross-validation?

K-fold is fine for static prediction problems but wrong for time series, because folds shuffle past and future. Walk-forward respects time order. Time-series CV (rolling-origin CV) is mathematically equivalent to walk-forward. The tool implements it.

Guides, formulas and worked examples

  • Playgrounds Walk-Forward Validator

    Upload a returns CSV. Rolling or expanding IS/OOS windows, per-window Sharpe, walk-forward efficiency, and a concatenated OOS equity curve. Catches regime.

  • Calculators Deflated Sharpe Ratio Calculator

    Bailey & López de Prado deflated Sharpe — corrects observed Sharpe for selection bias across K trials. Reports deflated Sharpe, PSR (probability of skill).

  • 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.

  • 12 min read Did You Overfit? PBO and Deflated Sharpe

    A practical tutorial on the two best-documented tests for backtest overfitting — PBO via CSCV and the Deflated Sharpe Ratio. Runnable Python + tool.

  • 9 min read How to Read a Backtest Report: 2026 Cheat Sheet

    Five questions a backtest report must answer — edge real, persistent, cheap to trade, bearable, explainable — with the statistics that verify each.

  • 11 min read Walk-Forward Validation: A Cookbook

    Walk-forward is the cheapest honest backtest you can run. Anchored vs rolling windows, the four parameters that matter, and a 60-line Python template.

All articles

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-validation-visualizer.js";

Input and output contract and the guide for agents.