agentleFS
MrMaca11anMrMaca11an/claude-skills-for-crypto-quant/skills/backtesting-discipline/SKILL.md

backtesting-discipline

Skill0 starsChanged 4 months agoMITView on GitHub

Enforces rigorous, bias-free backtesting for crypto trading strategies — no lookahead, realistic fees/slippage, regime validation, proper metrics. Use when writing, reviewing, or evaluating any backtest, strategy simulation, or performance report.

The file

Files
SKILL.md

Backtesting Discipline

Core rules (non-negotiable)

  1. No lookahead bias. A signal at bar t may only use data available at close of t (or earlier). Never use t+1 close, future highs/lows, or full-series indicators recomputed on the whole dataset. Shift signals by one bar before applying to returns.
  2. No survivorship bias. Include delisted/dead pairs in the universe for the period tested.
  3. Realistic costs. Binance spot taker fee = 0.10% per side (0.075% with BNB). Futures taker ≈ 0.04%. Always model slippage (≥ 1 tick, more for low-liquidity alts / large size). A strategy that only works at zero cost is not a strategy.
  4. Point-in-time data. Funding rates, OI, on-chain metrics must be as-reported at the time, not revised.

Validation

  • Out-of-sample / walk-forward — never report only in-sample. See [[strategy-optimization]].
  • Regime split — report performance separately across bull / bear / chop. A strategy profitable only in one regime must say so.
  • Multiple-testing awareness — if you tried N parameter sets, the best one's Sharpe is inflated. Deflate or hold out.

Metrics to report (always together)

  • Sharpe, Sortino, Calmar
  • Max drawdown (% and duration) — see [[risk-management]]
  • Win rate, profit factor, avg win/loss, expectancy
  • Trade count (low N → not significant)
  • Equity curve + per-regime breakdown

Red flags (reject the result)

  • Sharpe > 3 on daily data → almost always a bug or leak.
  • Smooth equity curve with no drawdowns → lookahead.
  • Performance collapses out-of-sample → overfit.
  • Results depend on a single trade or single month.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.