بنقرة واحدة
backtest-diagnose
Diagnose failed or underperforming backtests, locate the root cause, and fix the issue
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Diagnose failed or underperforming backtests, locate the root cause, and fix the issue
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Professional finance research toolkit — backtesting (7 engines + benchmark comparison panel), factor analysis, Alpha Zoo (452 pre-built alphas across qlib158/alpha101/gtja191/academic), options pricing, 79 finance skills, 29 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract → backtest → render) across 18 market-data sources (tushare, yfinance, okx, akshare, baostock, tencent, mootdx, ccxt, futu, local, eastmoney, sina, stooq, yahoo, plus optional-key finnhub/alphavantage/tiingo/fmp).
Correlation and cointegration analysis — co-movement discovery, deep return-correlation analysis, sector clustering, realized correlation, Engle-Granger / Johansen cointegration, half-life, Kalman dynamic hedge ratio, cross-market linkage analysis, and pair-trading signal generation
The single ROUTER for every data need. Load this skill BEFORE any backtest, data-fetch, or research task to pick the best available source/tool, honour auth (env) requirements, and avoid ban-risk providers.
东方财富(Eastmoney)免费免鉴权数据接口,覆盖资金流向、龙虎榜、融资融券、大宗交易、股东户数、限售解禁、行业概念板块、券商研报、财经新闻、美股/港股三大报表+主要指标、全市场选股与代码搜索。所有请求经共享 IP 限速层节流(东财按源 IP 限流并临时封禁突发请求),通过 Vibe-Trading 工具直接调用,无需 token。
OKX cryptocurrency market data interface. Uses the OKX V5 REST API to retrieve spot, derivatives, index, and other crypto market data, including real-time prices, candlesticks, funding rates, open interest, and more. No authentication required, free to use.
U.S. SEC EDGAR fetch interface — resolve a ticker to its CIK, list recent filings (10-K / 10-Q / 8-K and friends) with primary-document URLs, and pull XBRL companyfacts financial series. Free, no API key; rate-limited by IP so every request is throttled and carries a contact User-Agent. United States only.
| 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 == 0write_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"