用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/HKUDS/Vibe-Trading --skill backtest-diagnose命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | backtest-diagnose |
| description | Diagnose failed or underperforming backtests, locate the root cause, and fix the issue |
| category | tool |
Use this skill when a user reports that a backtest failed, raised an error, or produced poor results.
read_file to inspect artifacts/metrics.csv, equity.csv, and trades.csvread_file to inspect code/signal_engine.py and config.jsonedit_file to modify the code, then rerun the backtestread_file to inspect the new metrics.csvexit_code != 0)| Error Type | Common Cause | Fix |
|---|---|---|
| ImportError | Missing dependency | bash("pip install xxx") |
| KeyError | DataFrame column-name mismatch | Check the actual column names in data_map |
| IndexError | Empty data or insufficient length | Add length checks |
| TypeError | Incorrect signal type | Ensure the return value is pd.Series |
trade_count=0): signal-logic bug. Conditions are too strict, so the signal stays at 0. Check whether entry and exit logic is reasonable, and inspect the signal series to confirm it is not all zeros.dropna is too aggressive.| Symptom | Root Cause | Fix |
|---|---|---|
| No data fetched | Invalid API token or code issue | Check config.json |
| Too little data | Date range too narrow | Expand the date range |
If you encounter the following keywords, do not modify the code. The problem is on the data-provider side:
rate limitAPI limitdaily limitInformation (common in Tushare API responses)These issues require the user to check the API token, switch data sources, or wait for the quota to reset.
artifacts/metrics.csv exists and is non-emptyartifacts/equity.csv exists and is non-emptytrade_count > 0 (0 trades means a signal bug)NaNexit_code == 0This Hard-Gate Checklist is also the evidence ingestion gate for Strategy Discovery: a run failing any gate produces no evidence rows — never partial rows — and is skipped with a stable machine-readable token (hard-gate:exit-nonzero, hard-gate:metrics-missing, hard-gate:zero-trades, hard-gate:equity-empty, hard-gate:equity-nan). Diagnose and fix the failing gate as usual, rerun the backtest, then repopulate the evidence cache with refresh_strategy_evidence (agent tool / MCP tool, or vibe-trading strategy-evidence refresh --manifest <path>) so the fixed run becomes queryable evidence. See the strategy-discovery skill for the manifest format and the full gate list.
write_file, unless the structure is fundamentally brokenAfter modifying signal_engine.py, you must confirm:
bash("python -c \"import ast; ast.parse(open('code/signal_engine.py').read()); print('OK')\"")class SignalEngine: the file must define class SignalEnginedef generate: the class must contain a def generate methodaction_items Writing RulesAfter diagnosis, output actionable improvement suggestions:
"Change X from A to B" or "Add X logic in signal_engine.py""Change RSI threshold from 30 to 25 in signal_engine.py line 42""Add signals = signals.fillna(0) after signal calculation to prevent NaN propagation""Add a volume filter: skip buy signals when volume is below the 20-day average"Professional finance research toolkit — backtesting (10 engines + benchmark comparison panel), factor analysis, Alpha Zoo (462 pre-built alphas across qlib158/alpha101/gtja191/academic/fundamental), options pricing, 90 finance skills, 30 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract → backtest → render) across 25 market-data sources (tushare, yfinance, okx, binance, akshare, baostock, tencent, mootdx, ccxt, futu, mt5, tickerall, local, eastmoney, sina, stooq, yahoo, pykrx, india_broker, qveris, longbridge, plus optional-key finnhub/alphavantage/tiingo/fmp).
yfinance global market data interface — retrieve OHLCV and research data for US, HK, and Canadian stocks, ETFs, and indices via Yahoo Finance. Free, no API key required.
A 股 ST/*ST 风险预测框架 — 基于最新中报/三季报或业绩预告/快报,预测下一财年是否会因营收、利润、净资产、分红不达标而被风险警示,并将新浪监管处罚记录作为独立证据面纳入风险等级。仅适用于 A 股,不预测财务造假。
基于 SOC 职业分类