Skills

Strategy Generate

Create, modify, and optimize quantitative trading strategies, then backtest and...

Install

npx skills add HKUDS/Vibe-Trading --skill strategy-generate -g -a claude-code -y
Repository
HKUDS/Vibe-Trading37.4k
Category
Engineering
Updated
3d ago
License
MIT
Context cost
Mediumabout 3,000 tokens
Runs scripts
No, instructions only

What it does

Create, modify, and optimize quantitative trading strategies, then backtest and evaluate them.

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: use the backtest tool's structured metrics, validation and artifact summary. Read artifacts/metrics.csv or targeted rows with read_run_artifact only when the requested evidence is missing from that summary. Judge by the review criteria and report failures honestly.
  7. Fix implementation errors: repair code/contract errors and rerun to verify. Poor returns in a correctly implemented strategy are a valid result: report them and stop. Change the strategy or test additional candidates only when the user requested optimization or comparison, within their specified scope. Deeper attribution and robustness research are performed when requested, not added to every backtest.

You only need to write signal_engine.py and config.json. The backtest tool automatically handles data loading and backtest execution.

Adapting a registered strategy

Read the whole SKILL.md on GitHub

More in Engineering