Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

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.

  • Score 91
  • 39k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

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-diagnose

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install backtest-diagnose in Claude Code

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

A

No 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 →

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.

backtest-diagnose Install

Add to stack

Loading.