
💬 Want to read this in chinese ? Go here
<img src ="https://img.shields.io/badge/version-4.4.0-blueviolet.svg"/>
<img src ="https://img.shields.io/badge/platform-windows|linux|macos-yellow.svg"/>
<img src ="https://img.shields.io/badge/python-3.10|3.11|3.12|3.13-blue.svg" />
<img src ="https://img.shields.io/github/actions/workflow/status/vnpy/vnpy/pythonapp.yml?branch=master"/>
<img src ="https://img.shields.io/github/license/vnpy/vnpy.svg?color=orange"/>
VeighNa is a Python-based open source quantitative trading system development framework that has grown step by step into a fully-featured quantitative trading platform with continuous contributions from the open source community. It currently has many users from domestic and international financial institutions, including hedge funds, investment banks, futures brokers, university research institutions, proprietary trading companies, etc.
If you have any questions about using VeighNa for secondary development (strategies, modules, etc.), please check the VeighNa Project Documentation. If you can't solve it, please go to the [Questions and Help] section of the Official Community Forum for help, or share your experience in the [Experience Sharing] section!
Want to get more information about VeighNa? Please scan the QR code below to add the assistant and join the [VeighNa Community Exchange WeChat Group]:

On the tenth anniversary of VeighNa's release, version 4.0 officially introduces the vnpy.alpha module targeting AI quantitative strategies, providing professional quantitative traders with an all-in-one multi-factor machine learning (ML) strategy development, research, and live trading solution:

:bar_chart: dataset: Factor Feature Engineering
:bulb: model: Prediction Model Training
:robot: strategy: Strategy Research and Development
:microscope: lab: Research Process Management
:book: notebook: Quantitative Research Demo
The design concept of the vnpy.alpha module was inspired by the Qlib project, providing powerful AI quantitative capabilities while maintaining ease of use. We would like to express our sincere gratitude to the Qlib development team!
Modules marked with :arrow_up: have completed the upgrade compatibility testing for version 4.0. Additionally, the 4.0 core framework uses an upgrade approach that prioritizes compatibility, so most modules can also be used directly (interfaces involving C++ API encapsulation must be upgraded before use).
:arrow_up: Multi-functional quantitative trading platform (vnpy.trader) that integrates various trading interfaces and provides simple and easy-to-use APIs for specific strategy algorithm and function development, for quickly building quantitative trading applications required by traders.
Trading interfaces (vnpy.gateway) covering all domestic and international trading varieties:
Domestic market
:arrow_up: CTP (ctp): Domestic futures and options
:arrow_up: CTP Mini (mini): Domestic futures, options
:arrow_up: CTP Securities (sopt): ETF options
:arrow_up: FEMAS (femas): Domestic futures
:arrow_up: Esunny (esunny): Domestic futures, Gold TD
:arrow_up: APEX HTS (hts): ETF options
:arrow_up: XTP (xtp): Domestic securities (A shares), ETF options
:arrow_up: TORA (tora): Domestic securities (A shares), ETF options
OST (ost): Domestic securities (A shares)
EMT (emt): Domestic securities (A shares)
SGIT (sgit): Gold TD, domestic futures
:arrow_up: KsGold (ksgold): Gold TD
:arrow_up: LStar (lstar): Futures asset management
:arrow_up: Rohon (rohon): Futures asset management
:arrow_up: Jees (jees): Futures asset management
ComStar (comstar): Interbank market
:arrow_up: TTS (tts): Domestic futures (simulation)
Overseas market
Special Applications
:arrow_up: RQData Market Data (rqdata): Cross-market (stocks, indices, ETFs, futures) real-time market data
:arrow_up: XtQuant Market Data (xt): Cross-market (stocks, indices, convertible bonds, ETFs, futures, options) real-time market data
:arrow_up: RPC service (rpc): Inter-process communication interface for distributed architecture
Out-of-the-box trading applications for various quantitative strategies (vnpy.app):
:arrow_up: cta_strategy: CTA strategy engine module, which allows users to perform fine-grained control over the order management during the operation of CTA-type strategies while maintaining ease of use (reducing trading slippage, implementing high-frequency strategies)
:arrow_up: cta_backtester: CTA strategy backtester module, no need to use Jupyter Notebook, directly use the graphical interface to carry out strategy backtesting analysis, parameter optimization and other related work
:arrow_up: spread_trading: Spread trading module, supports custom spreads, real-time calculation of spread quotes and positions, supports semi-automatic spread algorithm trading and fully automatic spread strategy trading modes
:arrow_up: option_master: Option trading module, designed for the domestic options market, supports various option pricing models, implied volatility surface calculation, Greek value risk tracking and other functions
:arrow_up: portfolio_strategy: Portfolio strategy module, designed for trading multi-contract quantitative strategies (Alpha, option arbitrage, etc.) simultaneously, providing historical data backtesting and live automatic trading functions
:arrow_up: algo_trading: Algorithm trading module, providing various commonly used intelligent trading algorithms: TWAP, Sniper, Iceberg, BestLimit, etc.
:arrow_up: script_trader: Script strategy module, designed for multi-asset portfolio trading strategies and computational tasks, also can directly achieve REPL instruction trading in the command line, does not support backtesting functions
:arrow_up: paper_account: Simulation trading module, pure localized implementation of simulation trading functions, based on real-time quotes obtained from the trading interface for order matching, providing order execution pushing and position records
:arrow_up: chart_wizard: K-line chart module, based on RQData data service (futures) or trading interface to obtain historical data, and combined with Tick push to display real-time market changes
:arrow_up: portfolio_manager: Portfolio module, for various fundamental trading strategies, based on separate strategy sub-accounts, providing automatic tracking of trading positions and real-time profit and loss statistics
:arrow_up: rpc_service: RPC service module, allowing a VeighNa Trader process to be started as a server, serving as a unified routing channel for quotes and trades, allowing multiple clients to connect simultaneously, realizing a multi-process distributed system
:arrow_up: data_manager: Historical data management module, view existing data in the database through a tree directory, select any time period data to view field details, supports CSV file data import and export
:arrow_up: data_recorder: Market data recording module, based on the graphical interface for configuration, records Tick or K-line data to the database in real-time according to demand, for strategy backtesting or live initialization
:arrow_up: excel_rtd: Excel RTD (Real Time Data) real-time data service, based on pyxll module to achieve real-time push updates of various data (quotes, contracts, positions, etc.) in Excel
:arrow_up: risk_manager: Risk management module, providing statistics and restrictions on rules including trade flow control, number of orders placed, active orders, total number of cancelled orders, etc., effectively implementing front-end risk control functions
:arrow_up: web_trader: Web service module, designed according to the requirements of B-S architecture, implementing a web server that provides active function calls (REST) and passive data push (WebSocket)
Python trading API interface package (vnpy.api), providing the underlying implementation of the above trading interfaces: