ai_quant_trade Bundles RL Agents and LLMs Into One Open-Source Trading Toolkit
An open-source Python toolkit bundles reinforcement learning, LLM forecasting, factor mining, and live trading into a single stock trading platform.
Takeaways
- Open-source monorepo ai_quant_trade bundles RL, LLM, and factor-mining strategies for stock trading.
- Reproduces FinRL's Dow Jones 30 benchmark with 53.1% annualized return and 2.17 Sharpe in backtest.
- Includes Unsloth-based reasoning LLM for stock forecasting with claimed 20% accuracy gain.
- tsfresh-driven pipeline auto-generates around 5,000 candidate factors for trend prediction.
- Unified data layer covers US stocks, Chinese A-shares, ETFs, crypto, and forex providers.
- Apache 2.0, primarily Chinese docs, Python and C++ deployment on CPU or GPU.
A Chinese open-source project called ai_quant_trade has quietly crossed 6,000 stars on GitHub by attacking a problem most trading toolkits ignore: the gap between learning a technique and running it against real markets. The repo bundles reinforcement learning agents, LLM-based stock forecasters, factor mining pipelines, and paper-trading simulators into one Apache-2.0 licensed monorepo.
Instead of stitching together FinRL, Qlib, ta-lib, and a dozen data adapters yourself, you clone one repo and work through folders prefixed egs_ for each technique. The FinRL NeurIPS 2018 tutorial sits next to a StructBERT sentiment classifier, an Unsloth fine-tuning recipe, and a spreadsheet-based market monitor.
What ships in the box
The repo is organized around example directories, each with its own tutorial and runnable code. The headline pieces:
- Reinforcement learning agents reproducing the FinRL Dow Jones 30 benchmark, reporting 53.1% annualized return, a 10.4% max drawdown, and a 2.17 Sharpe ratio in backtest.
- Reasoning LLM for stock prediction fine-tuned with Unsloth, a library that speeds up LoRA-style training and cuts memory use. The maintainers claim a 20% accuracy improvement over baseline with explainable outputs.