TradeBot Check
Trading involves a risk of losing money. Nothing on this site is financial advice and past results do not guarantee future results. Risk disclosure
Backtesting

Qlib

Microsoft's open-source quantitative research platform that covers data processing, machine-learning model training and backtesting in one workflow, driven by config files or Python code.

microsoft/qlib★ 50,841 stars last commit 2026-12-04
Our take

Explore machine-learning ideas for markets end to end, from datasets to model training to backtest reports, in one open framework.

Who it is for

Researchers, students and advanced Python users who want to experiment with ML-based strategies and evaluate them with backtests, for research and education.

Strengths

  • Covers the research pipeline: data infrastructure, supervised models such as LightGBM, XGBoost, LSTM and Transformer, then backtesting and reporting.
  • Ships Alpha158 and Alpha360 datasets for the US and China markets.
  • The qrun tool runs a whole workflow from a config file, and a modular Python API lets you build your own.
  • Installs from PyPI with pip install pyqlib.

Good to know

  • A research and modelling platform, not a trading bot: it does not describe live broker connections.
  • The README says the official dataset is temporarily disabled and points to a community data source; Yahoo-derived data may not be perfect, so prepare your own quality data.
  • The README lists Python 3.8 to 3.12, and notes that some example scripts may fail and some baselines need specific Python versions.
  • Unreleased changes on the main branch restrict loading saved artifacts; check the migration guide before upgrading from source.
  • Any backtest is illustrative and never a promise of returns.

Custom bots are coming soon
We are preparing a service to build bots on tools like this one. Follow our Telegram channel to know when it opens.

Notify me

Real-life uses

Test a machine-learning stock-ranking idea from data to backtest report

Load a US equity dataset, train a gradient-boosting model to rank stocks, and run a backtest with trading costs in one config-driven workflow, then compare it with a simple index benchmark. This is a research exercise, illustrative only, never a promise of returns.

🧪 Workflow finished (example): LightGBM ranking model, backtest with costs on held-out data. Next: compare with a benchmark and paper trade before anything else.
Built with:Qlibyfinance

Compare it with others

Quick answers

How much does Qlib cost?

Free and open source (MIT). Prices change, so check the official website before you decide.

Is Qlib open source?

Yes. License: MIT.

Who is Qlib for?

Researchers, students and advanced Python users who want to experiment with ML-based strategies and evaluate them with backtests, for research and education.

What is Qlib written in?

Qlib is written in Python.

What should I know before using Qlib?

A research and modelling platform, not a trading bot: it does not describe live broker connections. The README says the official dataset is temporarily disabled and points to a community data source; Yahoo-derived data may not be perfect, so prepare your own quality data. The README lists Python 3.8 to 3.12, and notes that some example scripts may fail and some baselines need specific Python versions. Unreleased changes on the main branch restrict loading saved artifacts; check the migration guide before upgrading from source. Any backtest is illustrative and never a promise of returns.

Want a bot like this when custom bots open? Get notified · All comparisons · Guides

Sources

Every fact on this page comes from these sources, checked on 2026-11-28. If something has changed, the source wins.

  1. https://raw.githubusercontent.com/microsoft/qlib/main/README.md: purpose, features, datasets, models, qrun, install command, Python versions 3.8 to 3.12, data notes
  2. https://api.github.com/repos/microsoft/qlib: MIT, about 50,600 stars, last push 2026-11-04, not archived

Alternatives in Backtesting