RQAlpha is an extensible Python framework for quantitative backtesting, paper trading, and live trading across stocks, futures, and related markets. It is intended for non-commercial programmatic trading workflows.
Overview
RQAlpha covers the path from market data through strategy logic, backtesting, simulated live runs, and optional live trading, aimed at users who automate trading in Python. Configuration is flexible, and the design favors customization of a personal programmatic trading stack.
Strategies can be run with a simple command so attention stays on strategy code. Built-in mod hooks cover accounts and orders, simulation and backtest event sources, risk checks before orders, scheduling, transaction costs, progress reporting, and portfolio analysis with risk metrics exported to CSV or plots.
Mods extend the core via a hook interface; mods can be listed, enabled, and disabled from the command line. Optional RQData integration lets strategies import market data locally, spanning Chinese equities, indices, funds, futures, options, bonds, fundamentals, and related datasets when that data stack is used.
The Ricequant community offers hosted backtest and paper-trading environments, and strategies can be exercised there. Trade signals can be pushed via WeChat and email when configured. Commercial use requires contacting the vendor; non-commercial use is the stated default.
Key features
- Multi-asset backtest and trading pipeline
- Mod hook extension system
- Built-in simulation and matching engine
- Pre-trade risk validation mod
- Portfolio and risk analyser output
- Scheduler and transaction cost mods
- Optional RQData API integration
- Simple CLI strategy execution
Use cases
- Developing quantitative trading strategies
- Backtesting stocks and futures
- Paper trading with signal alerts
- Customizing mods for third-party libraries