explaingit

yutiansut/quantaxis

10,479PythonAudience · dataComplexity · 4/5Setup · hard

TLDR

A Python framework for quantitative finance and algorithmic trading in Chinese financial markets, combining market data retrieval, backtesting, live trading connections, factor research, and multi-account management in one self-hosted package.

Mindmap

mindmap
  root((quantaxis))
    What it does
      Backtesting engine
      Live trading
      Factor research
    Data layer
      QAFetch downloads
      MongoDB storage
      ClickHouse storage
    Tech stack
      Python core
      Rust performance
      RabbitMQ messaging
    Audience
      Quant researchers
      Algo traders
    Setup
      pip install
      Rust optional
      Broker adapters
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Run backtests of stock or futures trading strategies against 10 years of historical Chinese market data

USE CASE 2

Stream live market data and execute trades through CTP futures or QMT equities broker interfaces

USE CASE 3

Research price-prediction signals such as momentum or valuation ratios using the built-in factor framework

Tech stack

PythonRustMongoDBClickHouseRabbitMQ

Getting it running

Difficulty · hard Time to first run · 1day+

Requires a running MongoDB or ClickHouse database and RabbitMQ, live trading also needs a compatible Chinese broker account and CTP or QMT credentials.

License not specified in the explanation.

In plain English

QUANTAXIS is a Python framework for quantitative finance, designed for trading and researching Chinese financial markets: stocks, futures, and options. The README is written in Chinese. It packages together market data retrieval, backtesting, paper trading simulation, live trading connections, visualization, and multi-account management in one codebase, meant to run entirely on your own machine rather than through a cloud service. The framework is organized into about a dozen modules. The data layer (QAFetch and QASU) downloads and stores historical and real-time market data, supporting MongoDB and ClickHouse as storage backends. QAData provides an in-memory data structure for fast access during calculations. QAStrategy handles backtesting: you write a strategy that describes when to buy and sell, and the backtesting engine replays historical data through it and reports performance. QAFactor supports factor research, which is an approach where you define measurable signals (like momentum or valuation ratios) and test whether they predict price movements. QAPubSub handles messaging between components using RabbitMQ, useful for distributing calculations or streaming live order flow between processes. Version 2.1 added a significant performance upgrade through a component called QARSBridge, which wraps a Rust-based core called QARS2. This changes account operations from taking around 50 milliseconds down to around half a millisecond, and reduces the time to backtest ten years of daily data from roughly 30 seconds to about 3 seconds. It also cuts memory usage for large portfolios by around 90 percent. If the Rust component is not installed, the library falls back to a pure Python implementation automatically without breaking the API. The framework also includes a web server component for building internal tools, a scheduler for running automated tasks at specified times, and connection adapters for real-world trading systems including the CTP interface common in Chinese futures trading and the QMT interface for equities. Installation is via pip with optional extras for the Rust components, performance libraries, or the full package.

Copy-paste prompts

Prompt 1
Write a QUANTAXIS strategy class that buys when the 5-day moving average crosses above the 20-day moving average and runs a backtest on Chinese A-share stocks for the past 5 years
Prompt 2
Show me how to fetch daily OHLCV data for a list of Chinese stock tickers using QAFetch and store it in MongoDB with QUANTAXIS
Prompt 3
Generate a QUANTAXIS factor definition that ranks stocks by their 3-month price momentum and explain how to evaluate its predictive power with QAFactor
Prompt 4
Write a scheduler task in QUANTAXIS that downloads end-of-day market data every weekday at 5 PM and saves it to ClickHouse
Open on GitHub → Explain another repo

← yutiansut on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.