Free, open source Python crypto trading bot supporting major exchanges, with backtesting, dry-run, FreqAI and Telegram/web UI control.
microsoft/qlib
AI-oriented quantitative investment platform from Microsoft covering data, model training, backtesting and order execution for quant research.
Open-source alternative to:Bloomberg Terminal
- Stars
- 49,546
- Forks
- 7,828
- Open issues
- 501
- Last commit
- 6 days ago
What is it?
Qlib is a Python platform for quantitative investment research that aims to take ideas from exploration through to production. It provides a full ML pipeline covering data processing, model training and backtesting, and spans alpha seeking, risk modeling, portfolio optimization and order execution.
The platform supports several learning paradigms: supervised learning for forecasting signals, adaptive methods for market dynamics such as concept drift, and reinforcement learning for continuous trading decisions. It ships with a model zoo of implemented papers (LightGBM, XGBoost, LSTM, GRU, Transformer and others), benchmark configs on the Alpha158 and Alpha360 datasets, and the `qrun` command for running workflows from YAML config files.
Qlib includes a data layer with its own compact storage format and a data server that can run locally or as a shared service. Its components are loosely coupled, so each can be used on its own. The project also links to RD-Agent, a companion project that automates factor mining and model optimization.
Key features
- 01Full quant research pipeline from data processing to model training and backtesting.
- 02Supervised, market dynamics and reinforcement learning paradigms supported.
- 03Model zoo with many published quant models and Alpha158/Alpha360 benchmarks.
- 04Order execution scenarios with RL methods such as PPO and TWAP baselines.
- 05Workflow runner `qrun` driven by YAML configs, plus a code-based workflow API.
- 06Local or shared online data server with a compact data format.
Use cases
- Quant researchers testing alpha factors and predictive models on historical stock data.
- Teams building backtests for portfolio strategies and comparing published models on common benchmarks.
- Researchers studying reinforcement learning for optimal trade execution.
- Engineers creating reproducible, config-driven quant research workflows.
Things to know
- The README warns of an unreleased breaking change: recorder loads of saved models and datasets are restricted by default and need trusted=True.
- Source builds from main may differ from PyPI releases, and the artifact loading change is not yet in a tagged release.
Topics
FAQ
- What is qlib?
- AI-oriented quantitative investment platform from Microsoft covering data, model training, backtesting and order execution for quant research. Qlib is a Python platform for quantitative investment research that aims to take ideas from exploration through to production. It provides a full ML pipeline covering data processing, model training and backtesting, and spans alpha seeking, risk modeling, portfolio optimization and order execution.
- Is qlib free to use? What license does it have?
- qlib is open source under the MIT license. Check the license terms before using it in commercial products.
- Is qlib still maintained?
- Actively maintained. The last commit to qlib was on Oct 14, 2026.
- What can I use qlib for?
- Quant researchers testing alpha factors and predictive models on historical stock data. Teams building backtests for portfolio strategies and comparing published models on common benchmarks. Researchers studying reinforcement learning for optimal trade execution. Engineers creating reproducible, config-driven quant research workflows.
- Where can I get qlib?
- The source code and installation instructions are on GitHub: https://github.com/microsoft/qlib
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Ray is a unified framework for scaling Python and AI applications from a laptop to a cluster, with a distributed runtime and AI libraries.
An open-source Python framework for applying deep reinforcement learning to automated stock trading and portfolio tasks.
Native C++20 desktop terminal for financial research, with Qt6 UI, embedded Python analytics, AI agents and 100+ market data connectors.
Rust-native, event-driven trading engine with Python control plane for backtesting and live trading across crypto, FX, equities, futures, options and betting venues.
A curated, categorized list of open-source libraries, packages and resources for quantitative finance, spanning pricing, backtesting, data and more.