MyClawMyClaw
HomeUse CasesPricingSkillsResourcesCompany
HomeUse CasesPricingSkills
Sign In
HomeUse CasesPricingSkills
ResourcesCompareBlogCommunity
CompanyAboutSupport
Sign In
MyClawMyClaw

Your AI agent, already running.

Product

OpenClaw HostingHermes Agent HostingSlackUse CasesPricingAlibaba Cloud

Tools

Passport Photo GeneratorTattoo DesignVirtual Background GeneratorLinkedIn Headshot GeneratorParty Invitation GeneratorAlbum Cover GeneratorDating Photo Generator

Compre

vs dotsvs Claudevs ChatGPTvs OpenClawvs Hermes Agentvs Grok Botvs Hostinger

Resources

BlogUpdatesSkillsModelsSupportCommunityCapybara

© 2023 Cubo World Inc. All rights reserved.

TermsPrivacyCookieGDPRContact
← Back to Skills
Design & Media
📸

Vnpy Export

Export a Vibe-Trading backtest strategy to a runnable vnpy CtaTemplate Python class — supports A-share equities, futures, and crypto via BarGenerator + Array…

by HKUDSv1.0.0
Connecting to VM...
Connecting to VM...
npx clawhub@latest install vnpy-export
2.7kStars
3.4kDownloads
2Current Installs
9.3kAll-time Installs
📦
v1.0.0Version
📅
Apr 21, 2026Updated
View Source(ClawHub)

Vnpy Export Skill Overview

Vnpy Export translates a Vibe-Trading backtest strategy into a runnable vnpy CtaTemplate subclass .py file, ready to load into vnpy's CTA Strategy App for live trading or backtesting. It supports A-share equities, futures, and crypto via vnpy's BarGenerator and ArrayManager primitives. Install this skill when you want to move a strategy from Vibe-Trading into vnpy — the most widely-used open-source quant framework in mainland China (39k+ GitHub stars) — without hand-writing boilerplate.

How to Use It

Step 1: Run in your terminal or install this skill on MyClaw

npx clawhub@latest install vnpy-export
or

Click the Install button at the top of this page for one-click setup

When to Use Vnpy Export

Best Fit

  • You have completed a Vibe-Trading backtest run and want to export the strategy as a .py file loadable in the vnpy CTA Strategy App.
  • You want to run a strategy in vnpy's CTA backtesting engine using BacktestingEngine with proper parameter and variable declarations.
  • You are trading A-share equities (*.SZSE / *.SSE), Chinese futures (*.CFFEX, *.SHFE, etc.), or crypto (*.BINANCE) and need the correct vnpy conventions for each asset class.
  • You have a strategy description (no existing backtest run) and want the skill to generate a compliant CtaTemplate subclass from scratch.

When Not to Use

  • You are targeting a non-CTA vnpy app (e.g., vnpy's Spread Trading or Option Master apps) — this skill only generates CtaTemplate subclasses.
  • Your strategy relies on order-book or Level-2 tick logic that cannot be represented in an on_bar / on_tick flow without significant manual rework.

Key Features

Backtest-Run Export

Reads config.json and code/signal_engine.py from an existing Vibe-Trading run, then translates the full signal logic into a CtaTemplate subclass saved to artifacts/vnpy_strategy/<StrategyName>Strategy.py.

Description-to-CtaTemplate Generation

When no backtest run exists, generates a compliant CtaTemplate class directly from a plain-language strategy description and writes it to the same output path.

Asset-Class-Aware Conventions

Automatically applies the correct vt_symbol format, position units, and order direction rules for A-share stocks (buy/sell only), futures (all four directions), and crypto — no manual adjustment needed.

ArrayManager Indicator Mapping

Maps common pandas and TA-Lib indicator calls (rolling mean, EWM, RSI, MACD, Bollinger Bands, ATR, Donchian, and more) to their ArrayManager equivalents, avoiding look-ahead bias and improving runtime performance.

Multi-Timeframe Support

Handles strategies that combine multiple timeframes (e.g., daily trend filter + intraday entry) by wiring multiple BarGenerator and ArrayManager instances with the correct callback chain.

Quality-Checklist Enforcement

Before saving, validates the output against a built-in checklist: correct class naming, matching parameter/variable declarations, cancel_all() and put_event() placement, early-return on not am.inited, and adequate load_bar warmup depth.

Use Cases

Export Existing Vibe-Trading Backtest to vnpy

A quant has finished backtesting a momentum strategy in Vibe-Trading and wants to run it live in vnpy. The skill reads the run's config and signal engine, then emits a ready-to-load CtaTemplate .py file with all parameters and indicators correctly wired.

Generate a vnpy Strategy from a Description

A user describes a dual-MA crossover strategy for CSI 300 futures in plain language. The skill writes a complete, compliant CtaTemplate subclass — including BarGenerator, ArrayManager indicator calls, and proper long/short order logic — without requiring an existing codebase.

Backtesting Inside vnpy's BacktestingEngine

After export, the generated file can be dropped into a vnpy project and run immediately with BacktestingEngine, using the provided boilerplate for setting commission, slippage, capital, and date range.

Multi-Timeframe Strategy Conversion

A strategy that uses a daily trend filter combined with 5-minute entries is exported with correctly structured nested BarGenerator callbacks and separate ArrayManager instances for each timeframe.

Requirements

  • A Vibe-Trading backtest run directory (containing config.json and code/signal_engine.py) or a plain-language strategy description — at least one is required.
  • A working vnpy installation in the target environment to load or backtest the exported file (vnpy is not bundled with this skill).
  • No external API keys are required for the export process itself.
Connecting to VM...
npx clawhub@latest install vnpy-export
2.7kStars
3.4kDownloads
2Current Installs
9.3kAll-time Installs
📦
v1.0.0Version
📅
Apr 21, 2026Updated
View Source(ClawHub)

FAQ

Reviews

0 reviews

Log in to write a review

No reviews yet. Be the first to share your experience!