DeepQuant Strategy Backtesting Assistant
Paste the following prompt into your AI chat to install this skill:
Please install @org-0ueytgdu/deepquant-backtest according to https://skillhub.cn/install/skillhub.md.
About this skill
Problem
Quant strategy workflows often split strategy design, DeepQuant code generation, data preparation, and result interpretation across separate steps. The DeepQuant Strategy Backtesting Assistant focuses on the DeepQuant quest framework and connects describing a strategy, generating code, running a backtest, and producing reports into one executable workflow.
How It Works
The skill expects initialization at the start of each session: login-state detection, SDK checks, shared module merging, and data-pack validation. It then generates strategies/xxx_strategy.py from the user's description, presents it for confirmation, and runs scripts/run_backtest.py. Key outputs include:
- Return metrics: total return, annualized return, benchmark return, Alpha, Beta
- Risk metrics: max drawdown, annualized volatility, Sharpe ratio
- Files: orders.csv, trades.csv, summary files, and backtest_analysis.png
It also follows DeepQuant conventions: init and handle_bar are required for standard bar backtests, orders are not allowed in before_trading or after_trading, and gid calls should be treated as (data, code, msg) tuples.
Boundaries
It supports A-share stocks, index-constituent strategies, and ETF/fund backtests, with benchmark codes available from indexes.h5. Futures, options, and convertible bonds are not supported and should be rejected clearly. First use requires base data download; minute-bar backtests need --minbar; generated strategy code should be reviewed before execution.
Use Cases
- Convert an RSI overbought sell rule into DeepQuant strategy code and run a daily backtest for 000001.SZ over a chosen range.
- Generate handle_bar code for a dual moving-average strategy, download base data, and output Sharpe ratio, max drawdown, and trades.csv.
- Backtest an ETF/fund rotation strategy against the CSI 300 benchmark and generate a return-curve PNG with metric interpretation.
- Check minute-bar parameters, specify contracts with --minbar, run the strategy, and deliver orders.csv and trades.csv.
Best For
- Quant researchers: turn factor or timing ideas into executable DeepQuant strategies and run interval backtests.
- Securities strategy analysts: produce return, risk, turnover, and drawdown interpretation for A-share or ETF strategies.
- Investment research engineers: validate SDK, data packs, and minute-bar parameters, then deliver orders, trades, and position files.
- Model developers: follow init, handle_bar, and gid tuple conventions while reusing the backtest template.
Related Skills
Systematically scans national strategy, technology trends, capital flows, and regional capacity to identify future industries, priority tracks, and actionable deployment pathways.
Recognizes plant growth stages from images or videos and outputs structured agronomic analysis, risk notes, suggestions, and cloud report history.
Analyzes child images or videos for ASD-related social, behavioral, and stereotyped traits, then produces a structured report with early intervention suggestions.
Prepare, submit, and verify enterprise tax filings through Qixiangyun MCP, including roster checks, initialization, PDF download, and missing-declaration checks.