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.
In this repository11 other files it gives its agents.
- advanced-sql-timescaleSkill
- crypto-liquidity-flowSkill
- fastapi-best-practicesSkill
- llm-integrationSkill
- market-microstructureSkill
- qdrant-vector-dbSkill
- redis-patternsSkill
- risk-managementSkill
- senior-prompt-engineerSkill
- strategy-optimizationSkill
- websocket-realtimeSkill
The file
Files
Backtesting Discipline
Core rules (non-negotiable)
- No lookahead bias. A signal at bar
tmay only use data available at close oft(or earlier). Never uset+1close, future highs/lows, or full-series indicators recomputed on the whole dataset. Shift signals by one bar before applying to returns. - No survivorship bias. Include delisted/dead pairs in the universe for the period tested.
- 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.
- 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.
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
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.

