
Qlib
Open-source Python platform for quant investment research using machine learning.
- Stars
- 49.9k
- Forks
- 7.9k
- Licence
- MIT
- Language
- Python
- Last update
- 7 days ago
- Type
- Library
What it is
Qlib is a Python platform for quantitative investment research, where analysts build models that try to predict market behavior from historical data. It covers the workflow from exploring ideas to running models, and supports supervised learning, market dynamics modeling, and reinforcement learning. The README also says it now connects to RD-Agent, a separate Microsoft project for automating factor mining and model optimization.
- Load and prepare historical market data for model training
- Train and compare supervised learning models on stock datasets
- Run reinforcement learning experiments for trading decisions
- Use the notebook tutorials in examples/tutorial to learn the workflow
Great for
- Quant researchers who want a structured ML workflow for stock data
- Python developers experimenting with financial machine learning models
- Students learning how quantitative investment research is organized
- Teams that want to reuse published quant models such as those listed in the README
Not ideal for
- People looking for a ready-made trading bot, since the README describes a research platform rather than a turnkey strategy
- Anyone who needs guaranteed returns or investment advice; the project does not provide this
- Users who are not comfortable with Python and command-line setup
How to get it
- 1
Install with a package manager
You'll need: Python (version range shown on PyPI; check the README for the exact supported versions)
Install from PyPI
pip install pyqlib - 2
Run it
- Install the package with pip install pyqlib
- Open the notebook tutorials in examples/tutorial in the repository
- Follow the tutorial to prepare a dataset and run a first model workflow
- Read the documentation at qlib.readthedocs.io before changing configurations
- 3
Get the most out of it
- Read the artifact loading migration guide before reloading saved models or datasets
- Use RD-Agent to automate factor mining and model optimization, as described in the README
- Explore the model implementations listed in the README, such as HIST, TRA, and DoubleEnsemble
- Use the configuration migration guide if you run configuration-driven workflows
Downloads
Strengths
- Open source under the MIT license with a large community (about 49,800 stars at time of analysis)
- Covers multiple modeling approaches in one framework
- Includes documentation, tutorials, and an active CI test badge in the README
Trade-offs
- The README warns of an unreleased breaking change to how saved models and datasets are loaded, which requires reading a migration guide before upgrading
- Recent source builds restrict loading artifacts unless users opt in with trusted=True, so careful review is needed
- Requires a working understanding of quant finance and machine learning to use meaningfully
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| qlib (this) | 49.9k | Library | advanced | 7 days ago | Quant researchers who want a structured ML workflow for stock data |
| FinRL | 17k | Library | intermediate | 12 days ago | Students learning how reinforcement learning is applied to financial markets |
| daily_stock_analysis | 67.4k | App | intermediate | 4 days ago | Individual investors who follow a personal watchlist of A-shares, HK, US, or other listed stocks and want a daily summary |
| machine-learning-for-trading | 21.7k | Learning resource | intermediate | 8 days ago | Readers of the Machine Learning for Trading book who want to run its code |
| vnpy | 46.2k | Framework | advanced | 10 days ago | Python developers who want to build custom quant trading systems |
| Qbot | 18.8k | App | advanced | 8 months ago | Python users who want to research quantitative trading strategies |
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.