Playground
Walk-Forward Validator
Across 4 rolling windows the in-sample Sharpe averages 0.71 and the out-of-sample −0.02 (efficiency −0.02); 2 of 4 windows lose money out of sample.
On the documented defaults, computed by this tool's engine · the same answer as JSON
Rolling or expanding IS/OOS windows from a returns CSV. Per-window Sharpe, walk-forward efficiency ratio, concatenated OOS equity curve.
01Playground
Runs in your browser. Nothing you enter is uploaded, and no account or API key is needed.
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.
02Receipt
What the answer above ran on, how it is computed, where the data comes from, and a link that reopens it.
Inputs
is_len252moderollingoos_len63returns504 valuesstep63
The documented defaults. Change any input above and the tool recomputes.
Method
How the hub's tools are built and checked
Engine /engines/walk-forward-validator.js, sha256 a3b0bd908821. The page, the API and MCP run the same file.
Source
Your inputs / BYO key
Page updated .
Permalink
aifinhub.io/walk-forward-validator/
The link carries the inputs you set, so it reopens this result.
03For agents
Any agent can run this calculator by URL or MCP and get the same answer as JSON: the inputs that used defaults, the result and a line to cite. The call below follows the inputs you set above. In code, import the same engine; it runs where you import it, with no request or key.
GET https://aifinhub.io/api/run/walk-forward-validator curl -s 'https://aifinhub.io/api/run/walk-forward-validator'
# Markdown instead of JSON:
curl -s 'https://aifinhub.io/api/run/walk-forward-validator?format=md' # MCP over Streamable HTTP, no sign-in: run_calculator
curl -s https://aifinhub.io/mcp \
-H 'content-type: application/json' \
-H 'accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"run_calculator","arguments":{"calculator":"walk-forward-validator","input":{}}}}' import { compute } from "https://aifinhub.io/engines/walk-forward-validator.js";
const result = compute(input); {
"calculator": "walk-forward-validator",
"title": "Walk-Forward Validator",
"site": "AI Fin Hub",
"input": {},
"defaults_used": {
"is_len": 252,
"mode": "rolling",
"oos_len": 63,
"returns": [
-0.001963,
-0.012479,
0.001678,
"… 501 more of 504"
],
"step": 63
},
"result": {
"windows": [
{
"index": 0,
"isStart": 0,
"isEnd": 252,
"oosStart": 252,
"oosEnd": 315,
"isSharpe": 1.0370415589969475,
"oosSharpe": 0.04214258756321766,
"oosReturn": -0.0014504410192713868
},
{
"index": 1,
"isStart": 63,
"isEnd": 315,
"oosStart": 315,
"oosEnd": 378,
"isSharpe": 1.1948138381451516,
"oosSharpe": -0.4451484542010896,
"oosReturn": -0.016414662344676367
},
{
"index": 2,
"isStart": 126,
"isEnd": 378,
"oosStart": 378,
"oosEnd": 441,
"isSharpe": 0.9498677865002498,
"oosSharpe": -1.7573662369190102,
"oosReturn": -0.08306833893099486
},
{
"index": 3,
"isStart": 189,
"isEnd": 441,
"oosStart": 441,
"oosEnd": 504,
"isSharpe": -0.3329028873075593,
"oosSharpe": 2.0971477694444314,
"oosReturn": 0.08502743961050307
}
],
"nWindows": 4,
"meanIsSharpe": 0.7122050740836975,
"meanOosSharpe": -0.015806083528112636,
"efficiency": -0.02219316332230332,
"aggregateOosSharpe": -0.06366014045719706,
"oosNegativeWindows": 2,
"verdict": "weak_oos"
},
"provenance": {
"run": "https://aifinhub.io/api/run/walk-forward-validator",
"page": "https://aifinhub.io/walk-forward-validator/",
"methodology": "https://aifinhub.io/walk-forward-validator/",
"contract": "https://aifinhub.io/contracts/walk-forward-validator.json",
"engine": "https://aifinhub.io/engines/walk-forward-validator.js",
"engine_sha256": "a3b0bd90882141b1e6f9f316c9f3444ad171dbca408380c31bdc293133400a1c",
"build": "1a772910d31ef1740892ed0e3a065ed71e8c7406"
},
"disclaimer": "Planning estimates only — not financial, tax, or investment advice.",
"license": "https://creativecommons.org/licenses/by/4.0/",
"cite": "AI Fin Hub, Walk-Forward Validator (engine a3b0bd908821), https://aifinhub.io/api/run/walk-forward-validator"
} How to use it
- Upload your return series (CSV).
- 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.
- Run the validator. It reports each window's in-sample and out-of-sample Sharpe plus a concatenated out-of-sample curve.
- 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.
- 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.
Related tools
- Calculators Backtest Overfitting Score
Upload a returns CSV (one column per strategy you tried) or simulate a strategy search: the probability of backtest overfitting (PBO) by CSCV and the Deflated Sharpe Ratio.
- 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 a benchmark-relative block when you include one.
- 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 time series with configurable entry/exit bands. Everything client-side.
Articles
- 11 min read Deflated Sharpe Ratio: Bailey-Lopez de Prado Worked Example
Deflated Sharpe ratio derived from Bailey & Lopez de Prado (2014), with a 1,000-trial Monte Carlo, the skew-kurtosis denominator, and the deflation table.
- 7 min read Synthetic Data: GARCH vs GBM for Backtesting
GBM Sharpe 1.91 on 504 days is the strategy null. GARCH paths add vol clustering — the regime that breaks vol-sensitive strategies. Run both.
- 11 min read Walk-Forward Window Sizing: A Decision Rule
On the canonical 50-bar tape the engine returns mean OOS Sharpe 0.653, efficiency 0.600 — but the four windows hide a regime flip the half-life rule fixes.