
vnpy Strategy Exporter
Turns a Vibe-Trading backtest strategy into a vnpy CTA trading class file ready to load.
- Repository
- HKUDS/Vibe-Trading
- Stars
- 37,433
- Licence
- MIT
- Files
- 2 files
What it does
When installed, the agent can take a trading strategy that was built and backtested in Vibe-Trading and rewrite it as a Python class that follows the vnpy CtaTemplate format, a common structure used by the open-source vnpy quant trading framework. The agent saves that file so a user can load it into vnpy's strategy app for backtesting or live trading. It also includes a reference MA crossover example and a guide for mapping common indicators (moving averages, RSI, MACD, Bollinger Bands) to vnpy's built-in ArrayManager functions.
Great for
- Quant developers who prototype strategies in Vibe-Trading and want to run them in vnpy
- Traders in mainland China or elsewhere who use vnpy for A-share, futures, or crypto strategies
- Anyone who wants a starting template for a vnpy CTA strategy from a plain-language description
Skip it if
- People with no trading or Python background: the output is code that can place real orders, and it needs review before use with real money
- Live trading without testing: the skill generates code but does not verify that signals are correct or that orders behave as intended, so backtest and paper-trade first
- Non-vnpy platforms: the output is specific to vnpy's CtaTemplate API
Try asking
- “Export my last Vibe-Trading backtest run to a vnpy strategy file for IF2406 futures”
- “Write a vnpy CtaTemplate class for a dual moving-average crossover on 000001.SZSE, long only”
- “Convert the signal logic in this run's signal_engine.py into a vnpy strategy with setup instructions”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 2 original files, the MIT licence and an attribution note.
vnpy-export.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip vnpy-export.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip vnpy-export.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Review every generated order rule before running, especially the position logic that uses cover and short, since a mistake can open unintended positions.
- Start with paper trading (vnpy_tts) or vnpy's backtester before connecting any live account.
- For A-share stocks, set trade_long_only to True so the strategy does not attempt short selling.
What's inside
- scripts/cta_template.py
- SKILL.md
Redistributed unmodified from HKUDS/Vibe-Trading under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.