Quant Strategy Backtester
Paste the following prompt into your AI chat to install this skill:
Please install @user_d83d7c97/wm-backtest according to https://skillhub.cn/install/skillhub.md.
About this skill
Problem to solve
The hard part of quant backtesting is not only running a strategy, but separating selection, rebalancing, and risk logic into auditable stages. wm-backtest treats this as two subsystems: an execution library for historical simulation and a management layer for creating, previewing, publishing, and reading custom units. It is not a paper-trading app or a live intraday loop; it targets single-market A-share historical backtesting.
How it works
The main workflow is custom unit + staged scripts + stage testing:
- Selector: filter→bool or list→[]symbol controls the candidate universe and ranking.
- Trading / risk: emits OrderProposal; the third element is a weight ratio, not cash. Rebalancing belongs in trading; selector_freq only refreshes selection.
- Verification: after changing a stage script, run the stage harness, then lint, preview_custom, and run_custom.
- Evidence: instrument runs with simulation.trace, factor, and risk_*, then pull paginated deep / trace logs and inspect metrics.rule_counts to confirm rule triggers.
Boundaries and cautions
Use it for historical validation of a stock pool plus holding rules, strategy iteration, and result review such as equity, fills, and status. Avoid using it for live intraday trading, paper trading, screening-only workflows, or watchlist-only cleanup; it is not a substitute for Python or third-party backtest platforms. Business parameters must go under args, unconfirmed runs should not set confirm=true, and an existing unit_id will return UNIT_EXISTS.
Use Cases
- Run a PE filter and take-profit rule over a watchlist or universe across recent A-share history, then review equity and fills.
- Draft selector, trading, and risk stages, run stage harness checks, then lint, preview, and start the backtest.
- After a run, pull paginated execution and trace logs to confirm rule triggers, reject reasons, and next changes.
- Start an equal-weight buy-and-hold backtest from the watchlist template, then check status, summary, and risk rejects.
Best For
- Quant researchers who validate PE and take-profit rules over historical A-share pools and attribute outcomes
- Research operations people who turn watchlists into equal-weight buy-and-hold backtests and inspect fills
- Strategy engineers who write custom trading and risk stages and need stage-harness testing
- Risk analysts who review rejects, rule triggers, and equity changes after backtest runs
Related Skills
Covers literature review, data analysis, visualization, drug discovery, paper writing, and grant writing workflows.
A retrieval assistant for Chinese laws and regulations, supporting semantic queries, validity checks, clause location, and regulation comparison with CLI-based output.
Run questionnaire-based tax risk scans that generate red/orange/yellow alerts with industry templates, policy references, remediation actions, and local trend tracking.
A contract review assistant for legal and business teams that extracts clauses, flags risks, compares versions, and generates opinion reports with a built-in legal knowledge base.