# microsoft/qlib

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/microsoft-qlib).**

37,586 stars · 5,840 forks · Python · mit

## Links

- GitHub: https://github.com/microsoft/qlib
- Homepage: https://qlib.readthedocs.io/en/latest/
- awesome-repositories: https://awesome-repositories.com/repository/microsoft-qlib.md

## Topics

`algorithmic-trading` `auto-quant` `deep-learning` `finance` `fintech` `investment` `machine-learning` `paper` `platform` `python` `quant` `quant-dataset` `quant-models` `quantitative-finance` `quantitative-trading` `research` `research-paper` `stock-data`

## Description

This project is a comprehensive platform for quantitative investment research, machine learning, and algorithmic trading. It provides an end-to-end environment for developing, testing, and executing financial strategies, supporting the entire lifecycle from data ingestion and feature engineering to model training and backtesting.

The system is distinguished by its configuration-driven workflow orchestration, which allows researchers to automate complex pipelines and manage experiments through declarative files. It features a high-performance data infrastructure that utilizes custom binary formats to optimize throughput for large-scale market datasets, while a dedicated temporal management layer enforces strict point-in-time data integrity to prevent information leakage during simulations. Furthermore, the platform includes a hierarchical simulation framework that coordinates multi-level trading interactions, such as the relationship between daily portfolio management and intraday order execution.

Beyond its core research capabilities, the platform offers a specialized toolkit for financial machine learning, including support for reinforcement learning agents and meta-learning algorithms. Users can integrate custom models and trading strategies through standardized interfaces, ensuring flexibility in how predictive signals are generated and applied. The environment also provides robust utilities for experiment tracking, containerized deployment management, and performance reporting to facilitate reproducible research and strategy verification.

## Tags

### Business & Productivity Software

- [Algorithmic Trading Frameworks](https://awesome-repositories.com/f/business-productivity-software/algorithmic-trading-frameworks.md) — Provides a modular architecture for building and simulating automated investment logic from portfolio management to order execution.
- [Algorithmic Trading Platforms](https://awesome-repositories.com/f/business-productivity-software/algorithmic-trading-platforms.md) — Coordinates multiple trading strategies and monitors their performance through historical simulation and real-time execution. ([source](https://qlib.readthedocs.io/en/latest/component/online.html))
- [Algorithmic Trading Simulators](https://awesome-repositories.com/f/business-productivity-software/algorithmic-trading-simulators.md) — Simulates historical market performance to evaluate the effectiveness of investment strategies before deployment.
- [Trading Strategy Definitions](https://awesome-repositories.com/f/business-productivity-software/trading-strategy-definitions.md) — Enables the definition of custom logic for market predictions and automated trading decisions. ([source](https://qlib.readthedocs.io/en/latest/component/online.html))
- [Automated Trading Execution](https://awesome-repositories.com/f/business-productivity-software/automated-trading-execution.md) — Executes pre-built investment strategies to manage stock holdings and generate order lists. ([source](https://qlib.readthedocs.io/en/latest/component/strategy.html))

### Scientific & Mathematical Computing

- [Quantitative Investment Platforms](https://awesome-repositories.com/f/scientific-mathematical-computing/quantitative-investment-platforms.md) — Provides a comprehensive environment for developing, testing, and executing financial trading strategies through data-driven research and machine learning pipelines.
- [Quantitative Finance Frameworks](https://awesome-repositories.com/f/scientific-mathematical-computing/quantitative-finance-frameworks.md) — Facilitates the development of data-driven investment models through specialized financial data processing and predictive algorithm training. ([source](https://qlib.readthedocs.io/en/latest/introduction/introduction.html))
- [Quantitative Research Platforms](https://awesome-repositories.com/f/scientific-mathematical-computing/quantitative-research-platforms.md) — Provides an end-to-end pipeline for developing and testing financial trading strategies through data ingestion and model training.
- [Trading Strategy Implementations](https://awesome-repositories.com/f/scientific-mathematical-computing/trading-strategy-implementations.md) — Defines custom portfolio management logic by extending base classes to generate specific trade decisions. ([source](https://qlib.readthedocs.io/en/latest/component/strategy.html))
- [Simulation Frameworks](https://awesome-repositories.com/f/scientific-mathematical-computing/simulation-frameworks.md) — Coordinates daily portfolio management and intraday order execution through a hierarchical simulation model.
- [Quantitative Indicators](https://awesome-repositories.com/f/scientific-mathematical-computing/quantitative-indicators.md) — Provides tools for building mathematical expressions using historical market data to predict future asset returns. ([source](https://qlib.readthedocs.io/en/latest/advanced/alpha.html))

### Testing & Quality Assurance

- [Portfolio Backtesting Engines](https://awesome-repositories.com/f/testing-quality-assurance/portfolio-backtesting-engines.md) — Evaluates investment logic by running historical simulations on portfolio strategies using model-generated prediction scores. ([source](https://qlib.readthedocs.io/en/latest/component/strategy.html))
- [Backtesting Integrity Tools](https://awesome-repositories.com/f/testing-quality-assurance/backtesting-integrity-tools.md) — Prevents data leakage during backtesting by ensuring models only access information available at specific historical timestamps. ([source](https://qlib.readthedocs.io/en/latest/advanced/PIT.html))
- [Joint Trading Simulations](https://awesome-repositories.com/f/testing-quality-assurance/joint-trading-simulations.md) — Simulates the interaction between daily portfolio management and intraday order execution. ([source](https://qlib.readthedocs.io/en/latest/component/highfreq.html))
- [Performance Reporting Tools](https://awesome-repositories.com/f/testing-quality-assurance/performance-reporting-tools.md) — Generates visual summaries and performance metrics for investment portfolios to evaluate strategy effectiveness. ([source](https://qlib.readthedocs.io/en/latest/component/report.html))

### Artificial Intelligence & ML

- [Financial Machine Learning Models](https://awesome-repositories.com/f/artificial-intelligence-ml/financial-machine-learning-models.md) — Applies predictive modeling and reinforcement learning to large-scale market datasets to automate investment decisions.
- [Financial Machine Learning Toolkits](https://awesome-repositories.com/f/artificial-intelligence-ml/financial-machine-learning-toolkits.md) — Provides a specialized collection of tools for training predictive models and reinforcement learning agents on historical market data.
- [Financial Forecasting Models](https://awesome-repositories.com/f/artificial-intelligence-ml/financial-forecasting-models.md) — Calculates stock scores using a modular interface that integrates with automated workflows. ([source](https://qlib.readthedocs.io/en/latest/component/model.html))
- [Reinforcement Learning Algorithms](https://awesome-repositories.com/f/artificial-intelligence-ml/reinforcement-learning-algorithms.md) — Optimizes long-term trading performance by defining agents, environments, policies, and reward signals. ([source](https://qlib.readthedocs.io/en/latest/component/rl/overall.html))
- [Machine Learning Experiment Trackers](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning-experiment-trackers.md) — Tracks metrics, parameters, and tags for machine learning runs using a hierarchical system. ([source](https://qlib.readthedocs.io/en/latest/component/recorder.html))
- [Meta Learning Frameworks](https://awesome-repositories.com/f/artificial-intelligence-ml/meta-learning-frameworks.md) — Learns patterns across multiple forecasting tasks to apply acquired knowledge toward guiding future model training. ([source](https://qlib.readthedocs.io/en/latest/component/meta.html))
- [Reinforcement Learning Environments](https://awesome-repositories.com/f/artificial-intelligence-ml/reinforcement-learning-environments.md) — Implements simulator, state interpreter, action interpreter, and reward function components for reinforcement learning. ([source](https://qlib.readthedocs.io/en/latest/component/rl/framework.html))
- [Reinforcement Learning Training Pipelines](https://awesome-repositories.com/f/artificial-intelligence-ml/reinforcement-learning-training-pipelines.md) — Coordinates the reinforcement learning lifecycle by managing environment creation, policy updates, and runtime execution. ([source](https://qlib.readthedocs.io/en/latest/component/rl/framework.html))
- [Automated Experimentation Tools](https://awesome-repositories.com/f/artificial-intelligence-ml/automated-experimentation-tools.md) — Generates multiple research tasks from templates by varying parameters to facilitate automated model testing. ([source](https://qlib.readthedocs.io/en/latest/advanced/task_management.html))
- [Model Integration Interfaces](https://awesome-repositories.com/f/artificial-intelligence-ml/model-integration-interfaces.md) — Connects custom forecasting models by extending base classes and configuring parameters via external files. ([source](https://qlib.readthedocs.io/en/latest/start/integration.html))
- [Reinforcement Learning Strategies](https://awesome-repositories.com/f/artificial-intelligence-ml/reinforcement-learning-strategies.md) — Develops quantitative trading strategies using reinforcement learning by following structured learning paths. ([source](https://qlib.readthedocs.io/en/latest/component/rl/guidance.html))

### Data & Databases

- [High-Performance Data Infrastructures](https://awesome-repositories.com/f/data-databases/high-performance-data-infrastructures.md) — Maximizes throughput for large-scale financial datasets while ensuring point-in-time data integrity.
- [Centralized Data Management Systems](https://awesome-repositories.com/f/data-databases/centralized-data-management-systems.md) — Stores and accesses information from a central server that uses advanced caching techniques to speed up calculations. ([source](https://qlib.readthedocs.io/en/latest/advanced/server.html))
- [Temporal Data Management](https://awesome-repositories.com/f/data-databases/temporal-data-management.md) — Enforces strict historical boundaries to prevent future information leakage during backtesting and model training.
- [Binary Data Formats](https://awesome-repositories.com/f/data-databases/binary-data-formats.md) — Provides custom binary file structures to optimize disk I/O and memory throughput for large-scale market datasets.

### Development Tools & Productivity

- [Quantitative Workflow Orchestrators](https://awesome-repositories.com/f/development-tools-productivity/quantitative-workflow-orchestrators.md) — Manages complex research pipelines through configuration-driven automation to ensure reproducible experiments.
- [Workflow Orchestrators](https://awesome-repositories.com/f/development-tools-productivity/workflow-orchestrators.md) — Automates complex research pipelines including data processing, model training, and backtesting via a centralized configuration interface. ([source](https://qlib.readthedocs.io/en/latest/component/workflow.html))
- [Configuration-Driven Orchestrators](https://awesome-repositories.com/f/development-tools-productivity/configuration-driven-orchestrators.md) — Automates complex research pipelines and experiment tracking through declarative configuration files and standardized interfaces.
- [Pipeline Execution Engines](https://awesome-repositories.com/f/development-tools-productivity/pipeline-execution-engines.md) — Runs complete analytical workflows including data preparation and model training via single-command execution. ([source](https://qlib.readthedocs.io/en/latest/introduction/quick.html))
- [Experiment Tracking Systems](https://awesome-repositories.com/f/development-tools-productivity/experiment-tracking-systems.md) — Organizes research projects by tracking individual experiment records and comparing configurations to evaluate progress. ([source](https://qlib.readthedocs.io/en/latest/reference/api.html))

### Software Engineering & Architecture

- [Configuration Management Systems](https://awesome-repositories.com/f/software-engineering-architecture/configuration-management-systems.md) — Instantiates research components like models and data handlers using external configuration files to reduce boilerplate code. ([source](https://qlib.readthedocs.io/en/latest/component/workflow.html))
