Open-source project
yutiansut/QUANTAXIS avatar
yutiansut/QUANTAXIS

QUANTAXIS: a local-first Python stack for Chinese market data, backtesting and live trading

QUANTAXIS 支持任务调度 分布式部署的 股票/期货/期权 数据/回测/模拟/交易/可视化/多账户 纯本地量化解决方案

11,249 stars3,478 forksPythonMIT

At a glance

What is it?
QUANTAXIS bundles data storage, a QIFI account model, backtesting, scheduling and a Tornado web layer into one Python framework. The 2.1.0 alpha adds an optional Rust bridge, and the README says Python 3.9 to 3.12 is required.
Who is it for?
Adopt QUANTAXIS if you trade Chinese futures or A-shares and want the data layer, QIFI account model and backtest engine in one Python process you control. Skip it if you only need a single-market vectorised backtester, or if you cannot run MongoDB and RabbitMQ, since the data modules and QAPubSub assume them.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 12 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What QUANTAXIS is for, and who it fits

QUANTAXIS is a pure-local quantitative framework for Chinese markets: stocks, futures and options. The README describes it as a data, backtest, simulation, trading and visualisation solution with multi-account support, and the module list backs that up. QASU and QAFetch handle market data; QIFI and QAMarket define a unified account; QAStrategy covers CTA and arbitrage backtests; QAWebServer, QASchedule and QAPubSub cover services and message passing. The intended user is an engineer or quant who wants the whole chain in one repository rather than stitching a data vendor, a backtester and an order gateway together. The README also lists CTP for futures and options and QMT for stocks under live and simulated trading, which tells you the target is mainland brokerage connectivity. If you trade US equities or crypto, most of this framework is aimed somewhere else.

How the pieces fit: QIFI accounts, QASU storage and the Rust bridge

The account layer is the spine. QIFI is described as a cross-language account protocol covering account state, positions, orders and fills, with incremental diff updates and MongoDB-friendly storage. qifiaccount is the standard implementation, qifimanager handles multiple accounts, and qaposition manages a single instrument for arbitrage, CTA or stock use. Around it sit storage and compute: QASU and QAFetch write to MongoDB or ClickHouse, QAData is an in-memory structure for multi-instrument access, and QAEngine provides thread and process bases plus a LAN distributed agent. QAPubSub sits on RabbitMQ for one-to-one, one-to-many and many-to-many dispatch, including order flow. In 2.1 the README adds QARSBridge, a Python wrapper over the separate qa-rs Rust project, and QADataBridge over qadataswap for zero-copy conversion between pandas, Polars and Arrow, plus shared-memory transport between processes. Both bridges fall back to pure Python when the optional package is absent, which is the design decision that keeps the framework usable without a Rust toolchain.

Installing QUANTAXIS and running a first account

The README gives editable installs from a checkout rather than a plain pip package name, and setup.py enforces the interpreter range. The extras select how much optional machinery you pull in: rust for the QARS2 bridge, performance for the optimisation packages, full for both. The README states QUANTAXIS 2.1 requires Python 3.9 to 3.12 and that 3.11 or later gives the best performance, so check the interpreter before anything else.

bash
pip install -e .
pip install -e .[rust]
pip install -e .[performance]
pip install -e .[full]

The first real use in the README is a QIFI account through the bridge. has_qars_support() reports whether the Rust core loaded; if it did not, the same calls run against the Python implementation. Account creation takes an initial cash value, and the buy and buy_open methods take a symbol, a price, a date string and a quantity.

python
from QUANTAXIS.QARSBridge import QARSAccount, has_qars_support

if has_qars_support():
    print("using QARS2 Rust version")
account = QARSAccount("my_account", init_cash=1000000)
account.buy("000001", 10.5, "2025-01-15", 1000)
account.buy_open("IF2512", 4500.0, "2025-01-15", 2)
positions = account.get_positions()

What you should see is a populated positions structure for the stock and the futures contract. The repository also carries runnable examples under examples/, including qarsbridge_example.py, qifiaccountexample.py and qadatabridge_example.py, which is where to look when the README snippet is not enough.

Where QUANTAXIS gets in your way

The 2.1.0 line is labelled alpha2 in the README, while the newest release entry in the repository is tagged latest and dated 2022-05-18, and the last push to master was on 2026-09-18. That gap matters: the version the README advertises is not the version a release page hands you. Treat the alpha as the thing under test, not the thing you pin in production. The dependency floor is also steep. requirements.txt moves pymongo to 4.10.0 and above, pandas to 2.0.0 and above, numpy to 1.24.0 and above, and pyarrow to 15.0.0 and above, so QUANTAXIS cannot share an environment with older code that is still on pandas 1.x. Several modules assume infrastructure: QASU and QAFetch want MongoDB or ClickHouse, QAPubSub wants RabbitMQ, and QAWebServer is Tornado-based. None of that is optional if you use those modules. Finally, the README marks options support as in development in the QIFI section, so do not read the options mention in the project description as a finished surface.

How it differs from WonderTrader and other C++ engines

WonderTrader, which shows up in the related searches, is a C++ trading engine with its own data and strategy tooling. QUANTAXIS takes the opposite route: Python is the primary language, and the Rust core is an optional accelerator behind QARSBridge that falls back to Python when missing. The practical difference is what you can modify. In QUANTAXIS you subclass QARSStrategy or write against the QIFI account API in Python and keep the same code path whether or not the Rust core is present. In a C++ engine the strategy boundary is usually a compiled plugin. The trade is speed and deployment weight against how much of the stack you can read and change. QUANTAXIS also ships its own account protocol, QIFI, which the README says is kept identical across the Python, Rust and C++ implementations, so account state can move between languages. If you need the lowest possible latency at the matching layer, a C++ engine is the more direct answer; if you want the data, account and backtest logic in one editable Python tree, QUANTAXIS is the more direct answer.

Maintenance, licence and what an upgrade costs you

The repository is not archived and the last push was on 2026-09-18, so there is current activity on master. That does not make the release history current: the 1.10.2 release is dated 2020-12-21 and the latest-tagged release is 2022-05-18. Anyone upgrading from the 1.x line should read the README's own warning that v2.0.0 was a breaking architectural change, and expect the same again between 2.0 and the 2.1 alpha, where the Python floor moved to 3.9 and 60-plus dependencies were modernised. The licence is MIT, stated in the README and carried in the setup.py header. MIT permits commercial use and modification provided the copyright notice and permission notice are retained, but the setup.py header still reads Copyright (c) 2016-2017 while the README footer says 2016-2025, so if you redistribute, confirm which notice applies to the files you ship. That is a question for your own counsel, not something this page can settle.

Editorial conclusion

Adopt QUANTAXIS if you trade Chinese futures or A-shares and want the data layer, QIFI account model and backtest engine in one Python process you control. Skip it if you only need a single-market vectorised backtester, or if you cannot run MongoDB and RabbitMQ, since the data modules and QAPubSub assume them. Before committing, check that the Python version in your environment is inside 3.9 to 3.12, that pip install -e .[rust] actually builds the qapro-rs workspace on your platform, and that the last push date on master still matches the release you plan to pin.

Frequently asked questions

Which Python version does QUANTAXIS 2.1 need?

The README states QUANTAXIS 2.1 requires Python 3.9 to 3.12, and setup.py refuses to continue outside that range. The README adds that Python 3.11 or later gives the best performance.

How do I install QUANTAXIS with the Rust components?

The README gives editable installs from a checkout: pip install -e . for the base package, pip install -e .[rust] for the QARS2 bridge, pip install -e .[performance] for the optimisation packages, and pip install -e .[full] for both. If the Rust core is not installed, the bridge falls back to the pure Python implementation.

Does QUANTAXIS need MongoDB or RabbitMQ to run?

Not for the account and backtest modules, but the README ties QASU and QAFetch to MongoDB or ClickHouse storage, and QAPubSub to RabbitMQ for message dispatch and order flow. Those dependencies apply when you use those modules.

What is the QIFI account protocol in QUANTAXIS?

QIFI is described in the README as a cross-language account protocol holding account state, positions, orders and fills, with incremental diff updates and MongoDB-friendly storage. qifiaccount is the standard implementation, qifimanager handles multiple accounts, and the README says the Python version stays consistent with the Rust and C++ ones.

Official sources

  1. License: MIT
  2. Project website
  3. README
  4. Releases
  5. yutiansut/QUANTAXIS on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/yutiansut-quantaxis.svg)](https://hysenlabs.com/projects/yutiansut-quantaxis)