trading-backtest
Skill1 starsChanged 8 days agoMITView on GitHub
Backtest and walk-forward test trading strategies honestly with fees, slippage, funding and leverage, then apply the promotion gate. Use when the user says "backtest this", "run the tournament", "which strategy is best", "is this profitable", "test my strategy", or "what are the odds".
1 other project uses a version of this.
Adopted by
Most recently taken up by
- reddygopalkrishna/trading-skillstheir own version, first seen Nov 15, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- reddygopalkrishna/trading-skills★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- llms.txtllms.txt
- trading-deskSkill
- trading-go-liveSkill
- trading-learnSkill
- trading-paper-deskSkill
- trading-risk-rulesSkill
- trading-rotationSkill
- trading-strategy-labSkill
- trading-venuesSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
All strategies, all coins: python -m tradedesk tournament
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Backtest and tournament
Run
- Preferred (corrected engine):
python research/corrected_tournament.py && python research/summarize_corrected.py. It uses the shared mark-to-market ledger, leak-free 3-year/6-month walk-forward, block bootstrap and a deflated Sharpe across all registered trials. Output:reports/corrected/summary.md. - Legacy engine (below) writes
reports/tournament-latest.md; old copies live inreports/legacy/. - All strategies, all coins:
python -m tradedesk tournament - Some of them:
python -m tradedesk tournament --symbols ETH,SOL --strategies donchian_1h,mtf_trend - Output:
reports/tournament-latest.md,reports/tournament-latest.json,state/ladder.json.
How it scores (tell the user this)
- Walk-forward: parameters are picked on 180 days, then scored on the next 60 days the strategy has not seen, stepping forward each time. Only these out-of-sample (OOS) trades count.
- Costs on every trade: 0.06% fee and 0.02% slippage each side, plus funding of 0.001% per hour.
- Fills: at the next bar's open. If the stop and the target are both inside one bar, the stop wins. A gap past the stop fills at the open.
- Leverage: capped at the overnight limits the live desk uses on Coinbase (BTC 3.9x, ETH 3.3x, SOL 1.8x). Liquidation is modeled.
- Bootstrap: 2,000 random resamples of the OOS trades give a 5th-percentile return.
- Gate to move to forward testing (all must pass):
- at least 100 OOS trades
- profit factor of 1.20 or more
- max drawdown of 20% or less at 1% risk
- at least 60% of windows profitable
- bootstrap 5th-percentile return above 0
Reporting
- Lead with whether anything passed.
- For each near miss, say which check failed and by how much.
- Compare in-sample to OOS results. A big gap means the parameters were curve-fit.
- The backtest uses spot candles because perp history only starts in mid-2025. Say so.
Never
Edit gates, costs or windows to make a result pass. If the user asks you to, explain why that defeats the test. Record any change they still want in docs/DECISIONS.md.
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.

