backtest-diagnose
Skill by HKUDS
Diagnoses failed or underperforming backtests by reading run artifacts and code, classifying the root cause, and applying a targeted fix. It is for users whose backtests error out or produce abnormal results.
Install backtest-diagnose
Built from the published package, never by AI.
git clone --depth 1 https://github.com/HKUDS/Vibe-Trading /tmp/Vibe-Trading && mkdir -p ~/.claude/skills && cp -r /tmp/Vibe-Trading/agent/src/skills/backtest-diagnose ~/.claude/skills/backtest-diagnoseRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/HKUDS/Vibe-Trading /tmp/Vibe-Trading && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/Vibe-Trading/agent/src/skills/backtest-diagnose ~/.gemini/antigravity-cli/skills/backtest-diagnoseAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The backtest-diagnose skill helps an AI assistant investigate a backtest that failed, raised an error, or produced poor results. It reads the run artifacts (metrics.csv, equity.csv and trades.csv) and the code (signal_engine.py and config.json), classifies the root cause with an error taxonomy, and applies a fix with edit_file before rerunning the backtest.
The skill covers runtime errors, logic bugs such as zero trades or late first trades, and data-provider errors. It checks a hard-gate list before a run counts as valid, and it can feed fixed runs into the Strategy Discovery evidence cache. It is aimed at users whose backtests fail or underperform.
Written from the project's SKILL.md and checked against it.
What it can do
- Artifact reviewUses read_file to inspect metrics.csv, equity.csv, trades.csv, signal_engine.py and config.json.
- Root cause classificationSorts runtime errors, logic bugs and data errors using a built-in error taxonomy.
- Targeted code fixesUses edit_file to make precise changes, then reruns the backtest.
- Post-fix validationChecks that signal_engine.py parses, defines class SignalEngine and contains def generate.
- Hard-gate checklistVerifies metrics, equity output, trade count, NaN values and exit code before a run is valid.
- Evidence refreshUses refresh_strategy_evidence to add fixed runs to the Strategy Discovery evidence cache.
- Improvement suggestionsWrites specific action_items such as parameter changes or added filters.
What you need
- Python runtime, as the diagnostic commands run Python
- A data-provider API token in config.json, where data fetch fails
- Access to the backtest run artifacts and code files
Try asking
- My backtest failed with a KeyError. Diagnose it and fix the code.
- My backtest shows zero trades. Find out why and suggest fixes.
- Review my backtest results and give me at least two action items.
Good to know
- Makes at most 3 repair iterations.
- Fixes only the bug and does not change strategy logic unless asked.
- Does not modify code for data-provider errors such as rate limits.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: agent/src/skills/backtest-diagnose/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md6 KB
Alternatives to backtest-diagnose
All alternatives →Lists live launchpad token feeds and AI-detected hot topics for meme tokens on BSC, Solana and Base. Covers new, finalizing and just-migrated tokens on launchpads such as Pump.fun and Four.meme.
The okx-market skill lets an AI assistant retrieve cryptocurrency market data from the OKX V5 REST API. It is aimed at users who want spot, derivatives and index data in Python without an account.
Calculates key SaaS health metrics such as ARR, churn, LTV and CAC from raw business numbers, then gives prioritized advice. Built for founders and finance leads who share revenue or customer figures.
Fetches U.S. SEC EDGAR data for research. It resolves a ticker to its CIK, lists recent filings with primary-document URLs, and pulls XBRL financial series. Built for analysts who need free, U.S.-only filing data.
Provides free, no-auth access to Eastmoney market data for A-shares, Hong Kong stocks and US stocks. It covers fund flows, dragon-tiger lists, financial statements and stock screening.
Reads and manages a user's QuickBooks business through Intuit's official MCP server. It answers finance questions from reports, invoices, customers, products and benchmarks, and completes approved actions.
Compare with meme-rush, okx-market or saas-metrics-coach
backtest-diagnose: common questions
What does backtest-diagnose do when a backtest has zero trades?
It treats zero trades as a signal-logic bug, checks whether entry and exit conditions are too strict, and inspects the signal series for all zeros.
Will the skill change my strategy logic?
No. The skill says to fix the bug only and not change strategy logic unless the user explicitly asks for it.
What happens if a run fails the hard-gate checks?
A run that fails any gate produces no evidence rows and is skipped with a machine-readable token, so it must be fixed and rerun first.
How do I install backtest-diagnose?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is backtest-diagnose free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is backtest-diagnose safe to use?
It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to backtest-diagnose?
Similar skills: meme-rush, okx-market, saas-metrics-coach, sec-edgar.
