strategy-generate
Installation
SKILL.md
Workflow
- Requirements parsing: parse user intent, extract instrument codes, time range, and strategy logic, then write
config.json - Strategy design: think through the 5 questions of data / signal / position sizing / backtest / validation
- Strategy coding: write
code/signal_engine.py(following theSignalEnginecontract) - Syntax check:
bash("python -c \"import ast; ast.parse(open('code/signal_engine.py').read()); print('OK')\"") - Run backtest: call the
backtesttool (built into the engine; no need to writerun_backtest.py) - Evaluate results: read
artifacts/metrics.csvand judge by the review criteria - Iterative fixing: if results are poor, modify with
edit_file→ runbacktest→ re-evaluate
You only need to write signal_engine.py and config.json. The backtest tool automatically handles data loading and backtest execution.
Requirements Parsing
Extract the following from the user's description:
- Instrument codes: process them according to the normalization rules below
- Time range: if the user does not specify dates, default to 10 years back from today (for example, if today is
2026-03-18, thenstart_date=2016-03-18,end_date=2026-03-18) - Strategy logic: entry / exit conditions and indicator parameters