What is VeighNa (vn.py)?
VeighNa, still published as vn.py, is an open-source Python framework for building and running quantitative trading systems. It started in 2015 and is used mainly with Chinese futures, options and A-share brokers. It bundles an event engine, a PySide6 desktop trader, strategy engines for CTA, spread, options, portfolio and algorithmic execution, and adapters for 15 domestic gateways plus three overseas ones, including Interactive Brokers.
Version 4.0, released in March 2025, added vnpy.alpha: a factor-engineering, model-training and backtesting module for machine-learning strategies. It ships Lasso, LightGBM and MLP models and the Alpha158 factor set taken from Microsoft's Qlib.
The repo has about 46,400 stars and an MIT licence. Version 4.5.0 was released on GitHub and PyPI in October 2026 and supports Python 3.10 or above, with 3.13 recommended.
Is VeighNa (vn.py) worth it?
vn.py matters for what Qlib lacks: it connects to brokers and places orders. CTP, the standard Chinese futures interface, XTP and TORA for A-shares, and Interactive Brokers for overseas markets all sit behind one event-driven API, with a risk manager that caps order flow, order size and cancellations before anything reaches the exchange. Version 4.0 marked the project's tenth anniversary, and the breadth of gateways reflects a decade of use by private funds, securities firms and futures brokers.
The AI part is vnpy.alpha, added in 4.0. It turns price data into training features with an expression engine, trains Lasso, LightGBM or MLP models through one template, and backtests cross-sectional or time-series strategies on the signals. Release 4.5.0 reworked its factor and signal analysis, added VWAP fills to the backtest and fixed indicators that were mixing data across contracts. It is deliberately smaller than Qlib, and the README credits Qlib for both the design and the Alpha158 features.
The catch is reach. The main README, documentation and forum are in Chinese, the English README is a translation, and most gateways only make sense with an account at a Chinese broker. Supported systems are Windows 11, Windows Server 2022 and Ubuntu 22.04 or later, and the desktop UI assumes a workstation rather than a headless server. VeighNa Fusion, an assisted research product that turns strategy descriptions into code, is offered only through partner futures brokers with no published price.
Maintenance is steady: five releases since 4.0 and only about 20 open issues and pull requests. For a trader in Chinese markets who wants ML signals wired to live execution it is the natural open-source base; elsewhere, a Western broker API with Qlib for research is the more obvious pairing.
Where it earns its place
A two-trader CTA desk at a Chinese private fund
Run futures strategies live with hard risk limits
Connect the CTP gateway, load strategies into the CTA engine and set the risk manager's order-flow and cancellation caps; the desktop trader shows positions and daily P&L. The software is free; the costs are the broker account and data.
A quant researcher at a Chinese securities firm
Train an ML stock-selection signal and trade it from the same code
Download A-share data through RQData or XtQuant, build Alpha158 features and train LightGBM in vnpy.alpha's lab, then hand the signal to the portfolio strategy engine and paper-trade it before going live.
A developer at a small overseas prop firm
Prototype an event-driven strategy against Interactive Brokers
Use the ib gateway with the script trader for a REPL-style session, while paper_account matches orders locally on live quotes so nothing reaches the market until the logic is proven.
Before you commit
- Setup
- Windows users can install VeighNa Studio, a bundled Python distribution; otherwise unzip the release and run install.bat, install.sh or install_osx.sh on Python 3.10+. vnpy.alpha needs the alpha extras: polars, scikit-learn, LightGBM and PyTorch.
- Integrations
- 15 Chinese broker gateways plus Interactive Brokers, Esunny 9.0 and Direct Futures; RQData and XtQuant data feeds; SQLite, MySQL, PostgreSQL, QuestDB, DolphinDB, TDengine and MongoDB; a REST and WebSocket web trader; Excel RTD.
- Data and privacy
- Runs locally, holds broker credentials and can place real orders, so set up the risk manager and paper account before live use. The web_trader module opens REST and WebSocket endpoints that need securing if enabled.
- Cost at scale
- The framework is free under MIT. Real costs are broker accounts and data subscriptions such as RQData; Fusion's terms are set by the partner broker and not published.
- Limits
- English documentation is thin; gateways that wrap C++ APIs must be upgraded before use with 4.x; macOS has an install script but is not among the listed supported systems; script_trader cannot backtest.
What’s good
- Live trading through 15 Chinese gateways plus Interactive Brokers
- Front-end risk manager caps order flow, size and cancellations
- vnpy.alpha adds ML factor research and backtests in the same framework
- MIT licence and regular releases
What’s not
- Documentation and community mostly in Chinese
- ML module offers three model types; deeper research needs Qlib or your own code
- Desktop-first PySide6 interface
- Fusion's AI-assisted research is broker-gated and unpriced
Best for
Quant traders in Chinese futures and equity markets who want ML-driven strategies connected to real brokers in one Python codebase.
VeighNa (vn.py) alternatives
VeighNa (vn.py): common questions
- Is VeighNa (vn.py) worth it?
- A mature, broker-connected trading framework whose machine-learning module is a sensible but modest add-on, with documentation and community mostly in Chinese. We rate it 3.8 out of 5.
- How much does VeighNa (vn.py) cost?
- Free and open source under MIT. VeighNa Fusion, the assisted research product, is offered only through partner futures brokers; no price published.
- What are the downsides of VeighNa (vn.py)?
- Documentation and community mostly in Chinese; mL module offers three model types; deeper research needs Qlib or your own code; desktop-first PySide6 interface; fusion's AI-assisted research is broker-gated and unpriced.
- Who is VeighNa (vn.py) best for?
- Quant traders in Chinese futures and equity markets who want ML-driven strategies connected to real brokers in one Python codebase.
- How much does VeighNa (vn.py) cost for a team or in production?
- The framework is free under MIT. Real costs are broker accounts and data subscriptions such as RQData; Fusion's terms are set by the partner broker and not published.
- Is VeighNa (vn.py) safe for company data?
- Runs locally, holds broker credentials and can place real orders, so set up the risk manager and paper account before live use. The web_trader module opens REST and WebSocket endpoints that need securing if enabled.
- What are the best VeighNa (vn.py) alternatives?
- The closest alternatives we have reviewed are Qlib, Vibe-Trading and Fincept Terminal.
Answers checked Nov 16, 2026.