vnpy-export

Export Vibe-Trading strategies into vnpy CtaTemplate Python classes.

6.1k|1.2k|Updated Jun 9, 2022
One-click install
npx skills add https://github.com/charliedream1/ai_quant_trade --skill vnpy-export
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vnpy-export
Source: https://github.com/charliedream1/ai_quant_trade/tree/main/a_%E5%85%A8%E7%BD%91%E4%BC%98%E7%A7%80%E8%B5%84%E6%BA%90/10_%E5%A4%A7%E6%A8%A1%E5%9E%8B/07_skill%E5%8C%85/vibe_trading_skills/vnpy-export
Command: npx skills add https://github.com/charliedream1/ai_quant_trade --skill vnpy-export

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires vnpy, vnpy_ctp, and includes scripts (resource) components.

What problem does it solve?

Converts a Vibe-Trading backtest strategy into a runnable vnpy CtaTemplate subclass, enabling seamless deployment in vnpy's CTA framework.

Core Features & Use Cases

  • Export a Vibe-Trading strategy into a ready-to-run vnpy CtaTemplate class for both backtesting and live trading.
  • Supports A-share equities, futures, and crypto via BarGenerator and ArrayManager, aligning with vnpy's multi-asset capabilities.
  • Use case: take a trained backtest and instantly generate a vt_symbol-ready strategy file for vnpy, reducing manual porting effort.

Quick Start

Load this skill and run the export workflow to generate a vnpy Strategy file.

Frequently Asked Questions about vnpy-export

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I export a Vibe-Trading strategy into a vnpy CtaTemplate class?

To export a Vibe-Trading strategy into a vnpy CtaTemplate class, parse the config.json and code/signal_engine.py files to translate signal logic, generating a runnable artifacts/vnpy_strategy/<StrategyName>Strategy.py file.

Can I use vnpy strategies for both backtesting and live trading across multiple assets?

Yes, exported vnpy strategies support both backtesting and live trading across A-share equities, futures, and crypto by aligning with vnpy's multi-asset capabilities using BarGenerator and ArrayManager.

Do I need vnpy and vnpy_ctp installed to deploy an exported CTA strategy?

Yes, you need vnpy and vnpy_ctp installed to deploy an exported CTA strategy, as the generated CtaTemplate subclass relies on these frameworks for execution and market data integration.

What is the best way to port backtested signals into a runnable vnpy strategy file?

The best way to port backtested signals into a runnable vnpy strategy file is to translate the signal logic into the CtaTemplate structure, producing a vt_symbol-ready Python class for seamless VNpy integration.

What files does the export workflow parse to generate the vnpy strategy class?

The export workflow parses config.json and code/signal_engine.py to translate the trained backtest signal logic into the generated vnpy CtaTemplate Python class file.

Are there limitations when translating signal logic to the CtaTemplate structure?

A limitation when translating signal logic to the CtaTemplate structure is that the generated strategy relies strictly on vnpy's CTA framework components, requiring manual verification to ensure signal parity with the original backtest.