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, client-side.
- Inputs
- Paste + configure
- Runtime
- 1–15 s
- Privacy
- Client-side · no upload
- API key
- Not required
- Methodology
- Open →
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.
See methodology for the formal definition of walk-forward efficiency, window sliding, and purged K-fold considerations. Combine this with Backtest Overfitting Score for the PBO / DSR angle.
How to use
Step-by-step
- 1
Upload data and pick the strategy specification.
- 2
Set training and testing window lengths and minimum number of windows (≥ 5).
- 3
Run the validator. It computes per-window OOS metrics and stability statistics.
- 4
Read pass/fail across the three thresholds: median OOS Sharpe ≥ 50% of in-sample, parameter stability across windows, no single window destroys lifetime P&L.
- 5
If validation fails, do not iteratively re-tune until it passes — that defeats the purpose. Reformulate the strategy from first principles instead.
For agents
Use in an agent
Same math, same result shape as the UI above — as a static ES module. No HTTP request, no auth, no rate limit.
import { compute } from "https://aifinhub.io/engines/walk-forward-validator.js"; Contract: /contracts/walk-forward-validator.json Full agent guide →
Glossary references
Terms used by this tool
Questions people ask next
FAQ
What does this validate?
Whether your strategy's optimization process generalizes — i.e., does optimizing on one period produce parameters that work on the next period? The validator runs an automated walk-forward and reports per-window stability metrics.
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 produces a pass/fail report. Use the validator for go/no-go decisions; use the visualizer for diagnosis when validation fails.
What metrics decide pass/fail?
Three thresholds documented on the methodology page: (1) median OOS Sharpe ≥ 50% of in-sample Sharpe, (2) parameter stability (no parameter has more than 50% relative variation across windows), (3) no single test window destroys the lifetime P&L. All three must pass.
How many windows do I need?
Minimum 5; ideally 8-10. With 5 windows you get a basic stability picture. 10+ gives confidence intervals on the OOS Sharpe estimate. The methodology page warns at 4 or fewer windows — too few to call the result robust.
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 deep dive
All articles →Read further
Long-form context behind the tool output.
- Tutorial · Runnable·14 min
Building a Production Claude Agent for Finance
Production Claude agent for finance: price-blind research, idempotent execution, heartbeat + watchdog + circuit breaker, under $225/month at small scale.
Read - Tutorial · Runnable·9 min
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.
Read - Tutorial · Runnable·11 min
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.
Read
Used in
Decision workflows that use this tool
Goal-driven flows that bundle this tool with adjacent ones.
Complementary tools
Users of this tool often explore
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.
Risk-Adjusted Returns Calculator
Paste a returns CSV. Sharpe, Sortino, Calmar, Omega, alpha, beta, tracking error, information ratio, max drawdown, and tail moments — plus.
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.