0 readers reading
VeighNa (vn.py) Review 2026: The Open-Source Quant Framework Built for Chinese Markets

VeighNa (vn.py) Review 2026: The Open-Source Quant Framework Built for Chinese Markets

A hands-on 2026 review of VeighNa (vn.py), the 41.7k-star MIT-licensed Python quant trading framework. What it does, who it is for, how it compares to Backtrader, Qlib, and NautilusTrader, and how to get started safely.

Sham

Sham

AI Engineer & Founder, The Tech Archive

8 min read
0 views

Verdict: For traders and small quant shops operating in mainland Chinese markets, VeighNa (formerly vn.py) is the most complete free, open-source Python framework that connects research to live execution. It is MIT-licensed, runs on Python 3.10–3.13, and now ships with a built-in machine-learning module (vnpy.alpha) for factor strategies. If you only need backtesting for US equities, use Backtrader or vectorbt. If you only want AI research, use Microsoft Qlib. If you need live broker connectivity in China, VeighNa is the practical choice.

Last verified: 2026-06-18 · License: MIT · Latest stable version: 4.4.0 (May 14, 2026) · GitHub stars: ~41.7k · Best for: Chinese futures, A-shares, ETF options automation · Requires: Python 3.10+ (3.13 recommended)

What is VeighNa?

VeighNa is a Python-based open-source quantitative trading system development framework. It started in early 2015 as a simple Python wrapper around CTP, the C++ futures-market gateway used in China, and evolved into a multi-functional platform used by hedge funds, securities firms, futures companies, university research groups, and individual quants, according to the project’s own site and PyPI listing. Its tagline is now "By Traders, For Traders, AI-Powered" VeighNa homepage PyPI vnpy.

Two things make it stand out:

  1. Broker-to-research parity. The same strategy code you write in the research environment can be pointed at a live gateway.
  2. Chinese-market coverage. It supports CTP, CTP Mini, CTP Securities, FEMAS, Esunny, XTP, TORA, and many other domestic gateways out of the box.

This is not a backtesting toy. It is a production-adjacent framework with risk controls, paper trading, algorithmic execution, and options Greeks.

How does VeighNa compare to Backtrader, Qlib, and NautilusTrader?

The right tool depends on what phase of quant work you are in. These four projects solve different problems.

Framework Core job Best market Live execution AI/ML focus Maintenance
VeighNa (vn.py) Full-stack trading platform Chinese futures, A-shares, ETF options Yes, native broker gateways Yes — vnpy.alpha module since v4.0 Active (v4.4.0 in May 2026)
Backtrader Event-driven backtesting Global equities/futures education Limited/no native live wiring No Effectively stale (no major release since 2019)
Microsoft Qlib AI-first quant research platform Global research, official China dataset No — research only Yes — Alpha 158, LightGBM, MLP, Lasso Active
NautilusTrader High-performance live trading engine Multi-venue global Yes, via adapters Possible but not primary Active, Rust-native

The simplest rule: use Backtrader to learn, Qlib to research alpha factors, NautilusTrader if you need low-latency global multi-venue execution, and VeighNa if your real broker is a Chinese CTP member.

What is inside the box?

VeighNa is organized as a core engine plus pluggable modules. The project splits functionality across separate repositories so you install only what you need.

Trading interfaces (gateways)

The gateway layer is the reason most users install VeighNa. As of the v4.0 compatibility matrix on its README, supported domestic and overseas gateways include GitHub vnpy/vnpy:

  • Domestic: CTP, CTP Mini, CTP Securities (ETF options), FEMAS, Esunny, APEX HTS/SEC, XTP, TORA, OST, EMT, Sgit, KsGold, LStar/Rohon/Jees asset-management gateways, COMSTAR interbank, and TTS simulation.
  • Overseas: Interactive Brokers (TWS API), Esunny 9.0 Global, Direct Access futures.
  • Data/market: RQData, XtQuant, RPC service.

Strategy applications (apps)

The pre-built apps cover the most common quant use cases VeighNa homepage:

  • CtaStrategy — trend-following CTA engine with tick/K-line backtesting and parameter optimization.
  • AlgoTrading — TWAP, Sniper, Iceberg, BestLimit, Stop order algorithms for execution.
  • SpreadTrading — arbitrage across legs with auto-calculated spread order books.
  • OptionMaster — options with volatility-surface calculation, portfolio Greeks, and auto Delta hedging.
  • PortfolioStrategy — multi-contract alpha and options-arbitrage strategies.
  • RiskManager — pre-trade risk checks and limits.
  • PaperAccount — local simulation against live market data before risking capital.
  • DataRecorder — tick/K-line recording to a database of your choice.
  • WebTrader — REST/WebSocket server for browser-based control.

Databases and data feeds

VeighNa lets you choose your storage back end GitHub vnpy/vnpy:

  • SQL: SQLite (default), MySQL/TiDB, PostgreSQL.
  • Time-series/NoSQL: QuestDB, DolphinDB, TDengine, MongoDB.
  • Data feeds: XtQuant, RQData, TuShare, Wind, iFinD, TQSDK, Polygon, MultiCharts.

The vnpy.alpha machine-learning module

Version 4.0, released for the project’s tenth anniversary, added vnpy.alpha. The module is explicitly modeled on Microsoft Qlib and includes PyPI vnpy:

  • dataset — feature engineering with an expression engine, missing-value handling, and the Alpha 158 factor set from Qlib.
  • model — standardized templates for Lasso, LightGBM, and MLP.
  • strategy — cross-sectional multi-asset and time-series single-asset strategy construction.
  • lab — integrated workflow from data management through model training, signal generation, backtesting, and visualization.

This moves VeighNa from “execution framework” to “research-to-live” platform — though researchers doing pure ML work may still prefer Qlib’s broader model zoo.

How do you install and run it?

There are two paths.

Beginner path: VeighNa Studio

Download the bundled installer. As of June 2026, the community edition is VeighNa Studio 4.4.0 and includes the framework plus the VeighNa Station launcher VeighNa homepage. This avoids manual dependency setup, including the C++ broker-API bindings.

Developer path: pip install from source

pip install vnpy

Then install the gateways you need, e.g.:

pip install vnpy_ctp
pip install vnpy_ctastrategy
pip install vnpy_ctabacktester

The project recommends Python 3.13, supports 3.10–3.13, and ships platform install scripts (install.bat, install.sh, install_osx.sh) for source installs GitHub vnpy/vnpy PyPI vnpy.

First safe test: SimNow paper account

Before live trading, register a free CTP simulation account with SimNow (simnow.com.cn). It gives live market data and fake money to test against. Then launch VeighNa Trader, connect the CTP gateway in simulation mode, and run strategies under PaperAccount first.

What are the real limitations?

VeighNa is powerful, but it is not universal.

  • Documentation is mostly Chinese. The primary docs and community forum are in Chinese. English speakers can use the English README, but deep troubleshooting is harder.
  • Chinese-market first. If you mostly trade crypto or US equities, many gateways will not apply. The Interactive Brokers adapter exists, but the ecosystem is optimized for mainland venues.
  • Desktop app is heavy. The GUI runs on Qt, and the full install includes many compiled extensions.
  • Not ultra-high-frequency. Pure Python plus C++ bindings will not compete with Rust/C++ engines like NautilusTrader for microsecond strategies. For typical intraday or daily quant strategies it is fast enough.

What this means for you

If you are a solo quant, a small prop shop, or a researcher who needs to go from signal research to real orders in Chinese markets, VeighNa gives you a production-tested stack without a vendor lock-in fee.

If you are building an AI-powered small business around quant signals, the vnpy.alpha module means you can train a LightGBM or MLP factor model and deploy it through the same event engine that talks to your broker — no separate research-to-production rewrite. That is the same “own your AI infrastructure” principle we cover in our guide to building a Founder OS with AI, but applied specifically to trading operations.

FAQ

Q: Is VeighNa really free for commercial use? A: Yes. The project is released under the MIT license, which permits commercial use, modification, and distribution. The source code is on GitHub and the PyPI package is also MIT-licensed GitHub vnpy/vnpy PyPI vnpy.

Q: Can I trade US stocks or crypto with VeighNa? A: Indirectly. There is an Interactive Brokers gateway for global securities/futures/forex, and third-party crypto modules exist (e.g., vnpy_binance from the community). But the core project is designed around Chinese futures and A-shares first GitHub vnpy/vnpy README_ENG.md.

Q: Is VeighNa suitable for complete beginners? A: Not without effort. VeighNa Studio lowers the install barrier, but you still need to understand futures markets, broker account setup, strategy lifecycle, and risk management. Beginners should start with the SimNow simulation account and paper trading.

Q: How does it handle risk management? A: It includes a RiskManager app that can block orders violating predefined limits before they reach the exchange, plus portfolio-level checks in strategy modules.

Q: Does VeighNa require writing C++? A: No. The broker APIs are wrapped in Python bindings, so strategies are written in Python. You only need a C++ compiler if you are building custom gateway bindings from scratch.

Q: How does it compare to paid quant platforms? A: VeighNa gives you code-level control and no per-trade platform fees, but you pay with engineering time and infrastructure. Paid platforms handle data, compliance, and support for you. For small shops with in-house Python talent, VeighNa is usually cheaper long-term.

Sources
Updates & Corrections
  • 2026-06-18 — Article created. Verified latest stable version 4.4.0 (May 14, 2026), ~41.7k GitHub stars, MIT license, Python 3.13 recommendation, and vnpy.alpha module capabilities against primary sources.

Get the practical AI brief

Verified, no-hype AI tips you can actually use - in your inbox. Free.

No spam. We verify what we send. Unsubscribe anytime.

Discussion

0 comments