strategy-generate

Installation
SKILL.md

Workflow

  1. Requirements parsing: parse user intent, extract instrument codes, time range, and strategy logic, then write config.json
  2. Strategy design: think through the 5 questions of data / signal / position sizing / backtest / validation
  3. Strategy coding: write code/signal_engine.py (following the SignalEngine contract)
  4. Syntax check: bash("python -c \"import ast; ast.parse(open('code/signal_engine.py').read()); print('OK')\"")
  5. Run backtest: call the backtest tool (built into the engine; no need to write run_backtest.py)
  6. Evaluate results: read artifacts/metrics.csv and judge by the review criteria
  7. Iterative fixing: if results are poor, modify with edit_file → run backtest → 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, then start_date=2016-03-18, end_date=2026-03-18)
  • Indicator warm-up: a long lookback (MA200, a 252-day z-score) needs bars from before the requested period. Move start_date back to load them and declare the boundary with warmup_bars — the requested period is what gets graded, and undeclared warm-up bars are graded too. Silently backdating start_date by a year turns a 10-year backtest into an 11-year one that still calls itself 10 years: the extra year's trades, CAGR and benchmark all enter the report, the run succeeds, and the numbers look internally consistent
  • Strategy logic: entry / exit conditions and indicator parameters
Installs
4
GitHub Stars
34.5K
First Seen
Jul 14, 2026
strategy-generate — hkuds/vibe-trading