walk-forward-validation

walk-forward-validation is a skill for Claude Code from agiprolabs/claude-trading-skills. It costs 28 tokens per session (2,153 once invoked), scanned A, original, MIT.

A time-series validation framework for trading strategies and machine-learning models. Walk-forward validation tests a model on later data after training it on earlier data, helping avoid using future information by mistake.

In plain words
What is it for?
Use it to create rolling or expanding train-and-test windows, apply purged validation methods, and check whether a strategy is overfit or works across market regimes.
Why use it?
It reduces misleading results caused by random data splits, lookahead bias, correlated observations, and changing market conditions.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the trading-skills plugin — 68 skills shipped together

not rated 354repo +12 8d ago A scan Socket: passSnyk: passSkillSpector: pass 28 tokens original MIT

Good fit Use it to create rolling or expanding train-and-test windows, apply purged validation methods, and check whether a strategy is overfit or works across market regimes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agiprolabs/claude-trading-skills/walk-forward-validation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add agiprolabs/claude-trading-skills --skill walk-forward-validation
Clone the repo
git clone --depth 1 https://github.com/agiprolabs/claude-trading-skills

Made for: Claude Code.

Or install trading-skills, the plugin that ships this one along with the rest of its 68 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for walk-forward-validation

README.md
[![agentmods](https://agentmods.dev/badge/skills/agiprolabs/claude-trading-skills/walk-forward-validation/github.svg)](https://agentmods.dev/skills/agiprolabs/claude-trading-skills/walk-forward-validation)
Your own site
<a href="https://agentmods.dev/skills/agiprolabs/claude-trading-skills/walk-forward-validation"><img src="https://agentmods.dev/badge/skills/agiprolabs/claude-trading-skills/walk-forward-validation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for walk-forward-validation

Your own site · 80×15
<a href="https://agentmods.dev/skills/agiprolabs/claude-trading-skills/walk-forward-validation"><img src="https://agentmods.dev/badge/skills/agiprolabs/claude-trading-skills/walk-forward-validation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,153 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 21 Mar 2026
  • Snyk pass 21 Mar 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00028 $0.02153
Opus 5 $0.00014 $0.01077
Sonnet 5 $0.00006 $0.00431
Haiku 4.5 $0.00003 $0.00215

Measured 8d ago against content hash 4b291994d2e4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

walk-forward-validation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/overfit_detector.py, scripts/walk_forward.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/walk-forward-validation/SKILL.md · 213 lines

How it starts

The opening of the file, as written. The whole thing — 213 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Walk-Forward Validation

Walk-forward validation framework for trading strategies and ML models. Standard cross-validation (k-fold, random splits) fails catastrophically for financial time series because it introduces lookahead bias and ignores autocorrelation. This skill covers proper time-series validation techniques including rolling and expanding windows, purged cross-validation, combinatorial purged cross-validation (CPCV), and overfit detection metrics.

Why Standard Cross-Validation Fails

Standard k-fold CV assumes data points are independent and identically distributed (IID). Financial time series violate both assumptions:

  1. Lookahead bias — Random splits let the model train on future data and predict past data, artificially inflating performance.
  2. Autocorrelation — Adjacent observations are correlated. A random split that puts Monday in test and Tuesday in train leaks information.
  3. Regime dependence — Markets shift between regimes. A model trained on a bull market and tested on a bull market tells you nothing about bear market performance.
  4. Label overlap — If labels are computed over windows (e.g., 24h forward return), adjacent train/test samples share label computation periods, leaking information.

Walk-Forward Framework

Rolling Window (Fixed Train Size)

The train window has a fixed size and slides forward in time. This is preferred when you believe older data is less relevant (common in crypto).

Window 1: [===TRAIN===][=TEST=]
Window 2:    [===TRAIN===][=TEST=]
Window 3:       [===TRAIN===][=TEST=]

Parameters:

  • train_size: Number of bars/days in the training window
  • test_size: Number of bars/days in the test window
  • step_size: How far to advance between folds (often equals test_size)

Expanding Window (Growing Train)

The train window starts at the beginning and expands forward. This uses all available historical data, which helps when data is scarce.

Window 1: [==TRAIN==][=TEST=]
Window 2: [====TRAIN====][=TEST=]
Window 3: [======TRAIN======][=TEST=]

Read the full file on GitHub · 213 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 213 lines · 28 tokens per session scan A 4b291994d2e4

Subscribe to this mod's changes

walk-forward-validation is a skill published in the GitHub repository agiprolabs/claude-trading-skills (354 stars, last pushed 8d ago), licensed MIT. It adds 28 tokens to every session and 2,153 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

strategy-generate

Create, modify, and optimize quantitative trading strategies, then backtest and evaluate them.

HKUDS/Vibe-Trading · 21 tokens

health

Runs a budget-aware agent-assisted engineering health audit for instruction/config drift, hooks/MCP, verifier surfaces, and AI maintainability. Use when users ask in any language to audit Claude, Codex, Pi, agent instructions, MCP or hooks, verifier coverage, or AI-maintainability drift. Not for debugging application…

tw93/Waza · 71 tokens

mt5-robot-tester

Select the best MetaTrader 5 trading robots (Expert Advisors) that have not been backtested yet, by running the MT5 Strategy Tester from the command line through a 3-round pipeline. Use when the user wants to batch-test MT5 bots/EAs, screen robots across all symbols, optimize EA parameters, or move candidate bots to…

tradermonty/claude-trading-skills · 111 tokens

prompt-proximity-architecture

Turn an approved measurement charter, ICPs, and buyer jobs into a budget-aware prompt coverage blueprint across proximity bands, aided status, information acts, journey states, roles, locales, evidence grades, partitions, and measurement lanes. Use before prompt wording to define required, optional, and prohibited…

elvisun/newsjack · 67 tokens

ln-41-test-strategy-planner

Plans a risk-based test portfolio and prioritized scenarios without editing tests. Not for test execution or implementation.

levnikolaevich/claude-code-skills · 29 tokens

finance-weekly-outlook

Generate a source-backed weekly financial trading outlook from daily-finance, finance-core-analysis, and finance-explosive-article outputs plus fresh authoritative market data. Use when the user asks for future-one-week market outlook, weekly bullish/bearish sectors, stock picks, China A-share and US stock coverage…

digoal/blog · 122 tokens