8000 GitHub - FairyWorld/money_qlib: Qlib is an AI-oriented quantitative investment platform, which aims to realize the potential, empower the research, and create the value of AI technologies in quantitative investment. With Qlib, you can easily try your ideas to create better Quant investment strategies. An increasing number of SOTA Quant research works/papers are released in Qlib.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Qlib is an AI-oriented quantitative investment platform, which aims to realize the potential, empower the research, and create the value of AI technologies in quantitative investment. With Qlib, you can easily try your ideas to create better Quant investment strategies. An increasing number of SOTA Quant research works/papers are released in Qlib.

License

Notifications You must be signed in to change notification settings

FairyWorld/money_qlib

 
 

Repository files navigation

Python Versions Platform PypI Versions Upload Python Package Github Actions Test Status Documentation Status License Join the chat at https://gitter.im/Microsoft/qlib

📰 What's NEW!   💖

Recent released features

Feature Status
KRNN and Sandwich models 📈 Released on May 26, 2023
Release Qlib v0.9.0 :octocat: Released on Dec 9, 2022
RL Learning Framework 🔨 📈 Released on Nov 10, 2022. #1332, #1322, #1316,#1299,#1263, #1244, #1169, #1125, #1076
HIST and IGMTF models 📈 Released on Apr 10, 2022
Qlib notebook tutorial 📖 Released on Apr 7, 2022
Ibovespa index data 🍚 Released on Apr 6, 2022
Point-in-Time database 🔨 Released on Mar 10, 2022
Arctic Provider Backend & Orderbook data example 🔨 Released on Jan 17, 2022
Meta-Learning-based framework & DDG-DA 📈 🔨 Released on Jan 10, 2022
Planning-based portfolio optimization 🔨 Released on Dec 28, 2021
Release Qlib v0.8.0 :octocat: Released on Dec 8, 2021
ADD model 📈 Released on Nov 22, 2021
ADARNN model 📈 Released on Nov 14, 2021
TCN model 📈 Released on Nov 4, 2021
Nested Decision Framework 🔨 Released on Oct 1, 2021. Example and Doc
Temporal Routing Adaptor (TRA) 📈 Released on July 30, 2021
Transformer & Localformer 📈 Released on July 22, 2021
Release Qlib v0.7.0 :octocat: Released on July 12, 2021
TCTS Model 📈 Released on July 1, 2021
Online serving and automatic model rolling 🔨 Released on May 17, 2021
DoubleEnsemble Model 📈 Released on Mar 2, 2021
High-frequency data processing example 🔨 Released on Feb 5, 2021
High-frequency trading example 📈 Part of code released on Jan 28, 2021
High-frequency data(1min) 🍚 Released on Jan 27, 2021
Tabnet Model 📈 Released on Jan 22, 2021

Features released before 2021 are not listed here.

Qlib is an open-source, AI-oriented quantitative investment platform that aims to realize the potential, empower research, and create value using AI technologies in quantitative investment, from exploring ideas to implementing productions. Qlib supports diverse machine learning modeling paradigms, including supervised learning, market dynamics modeling, and reinforcement learning.

An increasing number of SOTA Quant research works/papers in diverse paradigms are being released in Qlib to collaboratively solve key challenges in quantitative investment. For example, 1) using supervised learning to mine the market's complex non-linear patterns from rich and heterogeneous financial data, 2) modeling the dynamic nature of the financial market using adaptive concept drift technology, and 3) using reinforcement learning to model continuous investment decisions and assist investors in optimizing their trading strategies.

It contains the full ML pipeline of data processing, model training, back-testing; and covers the entire chain of quantitative investment: alpha seeking, risk modeling, portfolio optimization, and order execution. For more details, please refer to our paper "Qlib: An AI-oriented Quantitative Investment Platform".

Frameworks, Tutorial, Data & DevOps Main Challenges & Solutions in Quant Research
  • Plans
  • Framework of Qlib
  • Quick Start
  • Quant Dataset Zoo
  • Learning Framework
  • More About Qlib
  • Offline Mode and Online Mode
  • Related Reports
  • Contact Us
  • Contributing
  • Main Challenges & Solutions in Quant Research
  • Plans

    New features under development(order by estimated release time). Your feedbacks about the features are very important.

    Framework of Qlib

    The high-level framework of Qlib can be found above(users can find the detailed framework of Qlib's design when getting into nitty gritty). The components are designed as loose-coupled modules, and each component could be used stand-alone.

    Qlib provides a strong infrastructure to support Quant research. Data is always an important part. A strong learning framework is designed to support diverse learning paradigms (e.g. reinforcement learning, supervised learning) and patterns at different levels(e.g. market dynamic modeling). By modeling the market, trading strategies will generate trade decisions that will be executed. Multiple trading strategies and executors in different levels or granularities can be nested to be optimized and run together. At last, a comprehensive analysis will be provided and the model can be served online in a low cost.

    Quick Start

    This quick start guide tries to demonstrate

    1. It's very easy to build a complete Quant research workflow and try your ideas with Qlib.
    2. Though with public data and simple models, machine learning technologies work very well in practical Quant investment.

    Here is a quick demo shows how to install Qlib, and run LightGBM with qrun. But, please make sure you have already prepared the data following the instruction.

    Installation

    This table demonstrates the supported Python version of Qlib:

    install with pip install from source plot
    Python 3.7 ✔️ ✔️ ✔️
    Python 3.8 ✔️ ✔️ ✔️
    Python 3.9 ✔️

    Note:

    1. Conda is suggested for managing your Python environment. In some cases, using Python outside of a conda environment may result in missing header files, causing the installation failure of certain packages.
    2. Please pay attention that installing cython in Python 3.6 will raise some error when installing Qlib from source. If users use Python 3.6 on their machines, it is recommended to upgrade Python to version 3.7 or use conda's Python to install Qlib from source.
    3. For Python 3.9, Qlib supports running workflows such as training models, doing backtest and plot most of the related figures (those included in notebook). However, plotting for the model performance is not supported for now and we will fix this when the dependent packages are upgraded in the future.
    4. QlibRequires tables package, hdf5 in tables does not support python3.9.

    Install with pip

    Users can easily install Qlib by pip according to the following command.

      pip install pyqlib

    Note: pip will install the latest stable qlib. However, the main branch of qlib is in active development. If you want to test the latest scripts or functions in the main branch. Please install qlib with the methods below.

    Install from source

    Also, users can install the latest dev version Qlib by the source code according to the following steps:

    • Before installing Qlib from source, users need to install some dependencies:

      pip install numpy
      pip install --upgrade  cython
    • Clone the repository and install Qlib as follows.

      git clone https://github.com/microsoft/qlib.git && cd qlib
      pip install .

      Note: You can install Qlib with python setup.py install as well. But it is not the recommended approach. It will skip pip and cause obscure problems. For example, only the command pip install . can overwrite the stable version installed by pip install pyqlib, while the command python setup.py install can't.

    Tips: If you fail to install Qlib or run the examples in your environment, comparing your steps and the CI workflow may help you find the problem.

    Tips for Mac: If you are using Mac with M1, you might encounter issues in building the wheel for LightGBM, which is due to missing dependencies from OpenMP. To solve the problem, install openmp first with brew install libomp and then run pip install . to build it successfully.

    Data Preparation

    Load and prepare data by running the following code:

    Get with module

    # get 1d data
    python -m qlib.run.get_data qlib_data --target_dir ~/.qlib/qlib_data/cn_data --region cn
    
    # get 1min data
    python -m qlib.run.get_data qlib_data --target_dir ~/.qlib/qlib_data/cn_data_1min --region cn --interval 1min
    

    Get from source