
Backtest Diagnosis
Diagnoses failed or odd trading backtests, finds the root cause, and proposes or applies code fixes.
- Repository
- HKUDS/Vibe-Trading
- Stars
- 37,433
- Licence
- MIT
- Files
- 1 file
What it does
When a trading strategy backtest crashes, produces no trades, or gives strange results, this skill tells the AI agent how to investigate: it reads the result files and strategy code, sorts the problem into known categories (such as missing dependencies, column-name mismatches, zero trades, late first trades, or open positions at the end), makes a targeted code edit, and reruns the test. It also checks a fixed set of pass/fail gates so only valid runs count as evidence.
Great for
- Quant researchers whose backtest errored or returned suspicious numbers
- Developers debugging a signal_engine.py strategy file
- Users of the Vibe-Trading platform who want an agent to iterate on a failing strategy
Skip it if
- Real-money trading decisions: the skill fixes code and checks structure, it does not validate that a strategy will make money
- Cases where the problem is a data provider limit or invalid API token: the skill says not to change code for these and the user must fix the account or source instead
Try asking
- “My backtest exited with an error, can you find out why and fix it?”
- “My backtest produced zero trades, check whether the entry conditions are too strict.”
- “The first trade happens three years after my start date, find the data filtering problem.”
- “Diagnose why my strategy ends with an open position and suggest action items.”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 1 original files, the MIT licence and an attribution note.
backtest-diagnose.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip backtest-diagnose.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip backtest-diagnose.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Give the agent the full error output or exit code so it can match the right row in the error table.
- Ask for one fix at a time; the skill limits itself to three repair iterations and expects a rerun after each change.
- Review the edit_file diff before accepting, since the skill changes strategy code and reruns it, and the fix should only touch the bug, not the strategy logic.
What's inside
- SKILL.md
Redistributed unmodified from HKUDS/Vibe-Trading under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.