
VeighNa
Python framework for building quant trading systems, with market gateways, backtesting and ML research tools.vnpy/vnpy
- Stars
- 46.2k
- Forks
- 12.6k
- Licence
- MIT
- Language
- Python
- Last update
- 10 days ago
- Type
- Framework
What it is
VeighNa is an open-source Python framework for building quantitative trading software. It bundles connections to many trading interfaces, a set of ready-made trading apps such as strategy backtesting, risk management and data management, and a newer vnpy.alpha module for machine-learning-based strategy research. People use it to build and run automated trading systems in their own setup.
- Connect to a supported broker or market gateway and run a CTA strategy
- Backtest a strategy and optimize parameters using the cta_backtester app
- Build multi-factor machine learning strategies with the vnpy.alpha dataset, model and lab modules
- Record tick or bar market data into a database for later backtesting
- Run a risk manager that enforces order and cancel limits
Great for
- Python developers who want to build custom quant trading systems
- Quant traders working with the Chinese futures and securities markets the README lists
- Researchers who want a workflow covering data, model training, signals and backtests
- Users who want a modular framework with reusable trading apps and database adapters
Not ideal for
- Complete beginners with no Python or trading background, since it requires setup and coding and the README has no beginner walkthrough
- People who need a plug-and-play trading product with no configuration, since many gateways require broker accounts and vendor-specific setup
- Anyone needing guaranteed returns or a turnkey strategy, since the README describes tooling, not performance
How to get it
- 1
See the README
You'll need: Python 3.10 or newer (README badge lists 3.10 to 3.13)
Clone the repository
git clone https://github.com/vnpy/vnpy.git - 2
Run it
- Install Python 3.10 to 3.13 and confirm it runs
- Clone the repository and follow the installation steps in the project documentation
- Start the VeighNa trader with a database configured, such as the default SQLite option
- Try a sample notebook from examples/alpha_research to see the research workflow
- 3
Get the most out of it
- Use the cta_backtester app to test and optimize strategies without writing a notebook
- Start with SQLite, the default database, before moving to MySQL, PostgreSQL or a time-series database
- Use data_recorder to collect market data for backtests or live initialization
- Add the risk_manager app to limit order flow before live trading
Downloads
Strengths
- Modular design: trading gateways, apps and database adapters can be combined as needed
- Wide coverage of the listed Chinese and overseas trading interfaces and databases
- Active project with a documented ecosystem of separate plugin repositories and a community forum
Trade-offs
- Many gateways depend on third-party broker or data vendor access, which the user must arrange separately
- The README is partly in Chinese and the primary documentation is Chinese-language, which may be a barrier for some readers
- Trading with real money carries risk, and the README gives no performance or safety guarantees
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| vnpy (this) | 46.2k | Framework | advanced | 10 days ago | Python developers who want to build custom quant trading systems |
| qlib | 49.9k | Library | advanced | 7 days ago | Quant researchers who want a structured ML workflow for stock data |
| machine-learning-for-trading | 21.7k | Learning resource | intermediate | 7 days ago | Readers of the Machine Learning for Trading book who want to run its code |
| Vibe-Trading | 37.4k | AI model / agent | intermediate | 4 days ago | Developers who want an AI agent for quantitative trading research |
| FinGPT | 21.5k | AI model / agent | advanced | 11 days ago | Developers who want to experiment with finance-tuned LLMs for sentiment analysis |
| ai-berkshire | 17k | AI model / agent | intermediate | 4 days ago | Chinese-speaking investors who want a structured value investing checklist applied to specific companies |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.