overfit-check

overfit-check is a skill for Claude Code, Codex from keel-trade/keel-trade. It costs 131 tokens per session (1,091 once invoked), scanned A, original, MIT.

A workflow for checking whether a trading backtest is robust or overfit. Overfitting means a strategy matches past data too closely and may fail on new data.

In plain words
What is it for?
Use it to examine in-sample and out-of-sample results, test high- and low-volatility periods, and receive a ROBUST, MIXED, or OVERFIT verdict.
Why use it?
It tests the result across separate time periods and market conditions instead of trusting one historical run. It can also compare runs after changing sensitive settings.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to examine in-sample and out-of-sample results, test high- and low-volatility periods, and receive a ROBUST, MIXED, or OVERFIT verdict.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/keel-trade/keel-trade/overfit-check
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 keel-trade/keel-trade --skill overfit-check
Clone the repo
git clone --depth 1 https://github.com/keel-trade/keel-trade

Made for: Claude Code, Codex.

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 overfit-check

README.md
[![agentmods](https://agentmods.dev/badge/skills/keel-trade/keel-trade/overfit-check/github.svg)](https://agentmods.dev/skills/keel-trade/keel-trade/overfit-check)
Your own site
<a href="https://agentmods.dev/skills/keel-trade/keel-trade/overfit-check"><img src="https://agentmods.dev/badge/skills/keel-trade/keel-trade/overfit-check/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 overfit-check

Your own site · 80×15
<a href="https://agentmods.dev/skills/keel-trade/keel-trade/overfit-check"><img src="https://agentmods.dev/badge/skills/keel-trade/keel-trade/overfit-check.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 131 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,091 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.
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.00131 $0.01091
Opus 5.5 $0.00052 $0.00436
Sonnet 5.5 $0.00026 $0.00218
Haiku 4.5 $0.00013 $0.00109

Measured 9d ago against content hash 72874cf8036c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

overfit-check 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 9d ago.

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.

keel/skills/overfit-check/SKILL.md · 110 lines

How it starts

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

Method

Step 1 — Confirm the baseline

The strategy_id, the baseline run_id (or run one on the default window), and its window. State the baseline Sharpe / return / max DD before probing.

Step 2 — Agree the out-of-sample windows

The probe takes several runs — one backtest of the plan's weekly allowance each, plus wall-clock time. Before starting, say how many runs it needs and which windows, and start once the user agrees; they may drop or pick windows. Windows the user named are used as given. When the user asks for a default split, this one is relative to the baseline window:

  • W1 in-sample — its first half;
  • W2 out-of-sample — its second half;
  • W3 held-out tail — the most recent 3 months;
  • W4 / W5 regimes — one high-vol stretch, one low-vol / chop stretch.

Every window must cover the strategy's warm-up. For each agreed window: keel_backtest_run(strategy_id=<id>, start_date=<start>, end_date=<end>); if still active, keel_backtest_watch(backtest_id=<run_id>). When all are terminal, keel_backtest_compare once with every window's id — the table is the comparison view.

Step 3 — Parameter perturbation (only when the user asks for depth)

Pick the 1–2 parameters that matter (a lookback, a threshold, a leverage cap — not a seed). Perturb ±20% and ±50% — four runs per parameter, stated before starting — and compare once. A Sharpe that collapses under ±20% points to a fitted parameter rather than an edge.

Step 4 — Read stability

  • Sharpe spread across windows: max − min > 2.0 with any window negative is fragile. Real edges degrade smoothly.
  • Sign of returns: one negative disjoint window is a yellow flag; two are red.
  • Parameter sensitivity: robust to ±20% or it is not an edge.

Step 5 — Verdict

  • ROBUST — stable Sharpe, positive across regimes, parameters not razor-thin.
  • MIXED — some windows weak, thesis holds in most; a candidate for further out-of-sample testing.
  • OVERFIT — variance too high, negative OOS, or razor-thin parameters.

Read the full file on GitHub · 110 lines

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. 9d ago First seen · 110 lines · 131 tokens per session scan A 72874cf8036c

Subscribe to this mod's changes

overfit-check is a skill published in the GitHub repository keel-trade/keel-trade (2 stars, last pushed 2d ago), licensed MIT. It adds 131 tokens to every session and 1,091 once invoked, about $0.0005 per session on Opus 5.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-10-07.

Related

Other skills, from other repositories

pinets

Run Pine Script indicators from the command line using pinets-cli. Use when the user asks to run, execute, test, or analyze a Pine Script indicator, calculate technical analysis values, fetch market data for crypto symbols, or work with .pine files. Also use when the user wants RSI, SMA, EMA, MACD, Bollinger Bands, or…

LuxAlgo/pinets-cli · 105 tokens

pinets

Run Pine Script indicators from the command line using pinets-cli. Use when asked to execute, test, or analyze Pine Script indicators, calculate technical analysis values (RSI, SMA, EMA, MACD, Bollinger Bands, etc.), fetch market data for crypto trading pairs. This tool can run PineScript indicators from .pine files…

LuxAlgo/pinets-cli · 81 tokens

pinets

Run Pine Script indicators from the command line using pinets-cli. Use when asked to execute, test, or analyze Pine Script indicators, calculate technical analysis values (RSI, SMA, EMA, MACD, etc.), or fetch market data for crypto trading pairs. This tool can run PineScript indicators from .pine files or stdin and…

LuxAlgo/pinets-cli · 78 tokens

tushare

A Python interface for Tushare, a financial data service that provides market and company information for stocks, funds, futures, and digital assets. It returns queried data as pandas tables.

HKUDS/Vibe-Trading · 79 tokens

social-media-intelligence

Social media intelligence: financial signal extraction from Twitter/X, Telegram, Discord, and Reddit for sentiment-driven trading strategies.

HKUDS/Vibe-Trading · 28 tokens

vibe-trading

Professional finance research toolkit — backtesting (11 engines + benchmark comparison panel), factor analysis, Alpha Zoo (478 pre-built alphas across qlib158/alpha101/gtja191/academic/fundamental), options pricing, 90 finance skills, 30 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract →…

HKUDS/Vibe-Trading · 176 tokens