1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-06 20:41:09 +08:00

release-0.5.0 (#1)

* init commit

* change the version number

* rich the docs&fix cache docs

* update index readme

* Modify cache class name

* Modify sharpe to information_ratio

* Modify Group- to Group

* add the description of graphical results & fix the backtest docs

* fix docs in details

* update docs

* Update introduction.rst

* Update README.md

* Update introduction.rst

* Update introduction.rst

* Update introduction.rst

* Update installation.rst

* Update installation.rst

* Update initialization.rst

* Update getdata.rst

* Update integration.rst

* Update initialization.rst

* Update getdata.rst

* Update estimator.rst

Modify some typos.

* Update README.md

Modify the typos.

* Update initialization.rst

* Update data.rst

* Update report.rst

* Update estimator.rst

* Update cumulative_return.py

* Update model.rst

* Update rank_label.py

* Update cumulative_return.py

* Update strategy.rst

* Update getdata.rst

* Update backtest.rst

* Update integration.rst

* Update getdata.rst

* Update introduction.rst

* Update introduction.rst

* Update README.md

* Update report.rst

* Update integration.rst

Fix typos

* Update installation.rst

Fix typos

* Update getdata.rst

* Update initialization.rst

Fix typos.

* add quick start docs&fix detials

* fix estimator docs & fix strategy docs

* fix the cahce in data.rst

* update documents

* Fix Corr && Rsquare

* fix data retrival example to csi300 & fix a data bug

* fix filter bug

* Fix data collector

* Modift model args

* add the log & fix README.md\quick.rst

* add enviroment depend & add intoduction of qlib-server online mode

* fix image center fomat & set log_only of docs is True

* fix README.md format

* update data preparation & readme logo image

* get_data support version

* Modify analysis names

* Modify analysis graph

* update report.rst & data.rst

* commmit estimator for merge

* minimal requirements

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update READEME.md

* Update READEME.md

* update estimator

* Fix doc urls

* fix get_data.py docstring

* update test_get_data.py

* Upate docs

* Upate docs

* Upate docs

Co-authored-by: bxdd <bxddream@gmail.com>
Co-authored-by: zhupr <zhu.pengrong@foxmail.com>
Co-authored-by: Wendi Li <wendili.academic@qq.com>
Co-authored-by: Dingsu Wang <dingsu.wang@gmail.com>
Co-authored-by: bxdd <45119470+bxdd@users.noreply.github.com>
Co-authored-by: cslwqxx <cslwqxx@users.noreply.github.com>
This commit is contained in:
you-n-g
2020-09-23 23:01:39 -05:00
committed by GitHub
parent 99ebd87cba
commit de9e13b171
82 changed files with 1580 additions and 1145 deletions

View File

@@ -1,45 +1,47 @@
===============================
``Qlib``: Quantitative Library
``Qlib``: Quantitative Platform
===============================
Introduction
===================
.. image:: ../_static/img/logo/white_bg_rec+word.png
:align: center
``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``, users can easily apply their favorite model to create better Quant investment strategy.
With ``Qlib``, users can easily try their ideas to create better Quant investment strategies.
Framework
==================
===================
.. image:: ../_static/img/framework.png
:alt: Framework
:align: center
At module level, ``Qlib`` is a platform that consists of the above components. Each components is loose-coupling and can be used stand-alone.
At the module level, Qlib is a platform that consists of above components. The components are designed as loose-coupled modules and each component could be used stand-alone.
====================== ========================================================================
====================== ==============================================================================
Name Description
====================== ========================================================================
`Data layer` `DataServer` focus on providing high performance infrastructure for user
to retrieve and get raw data. `DataEnhancement` will preprocess the data
and provide the best dataset to be fed in to the models.
====================== ==============================================================================
`Data layer` `DataServer` focuses on providing high-performance infrastructure for users to
manage and retrieve raw data. `DataEnhancement` will preprocess the data and
provide the best dataset to be fed into the models.
`Interday Model` `Interday model` focus on producing forecasting signals(aka. `alpha`).
Models are trained by `Model Creator` and managed by `Model Manager`.
User could choose one or multiple models for forecasting. Multiple models
could be combined with `Ensemble` module.
`Interday Model` `Interday model` focuses on producing prediction scores (aka. `alpha`). Models
are trained by `Model Creator` and managed by `Model Manager`. Users could
choose one or multiple models for prediction. Multiple models could be combined
with `Ensemble` module.
`Interday Strategy` `Portfolio Generator` will take forecasting signals as input and output
the orders based on current position to achieve target portfolio.
`Interday Strategy` `Portfolio Generator` will take prediction scores as input and output the
orders based on the current position to achieve the target portfolio.
`Intraday Trading` `Order Executor` is responsible for executing orders output by
`Interday Strategy` and returning the executed results.
`Analysis` User could get detailed analysis report of forecasting signal and portfolio
`Analysis` Users could get a detailed analysis report of forecasting signals and portfolios
in this part.
====================== ========================================================================
====================== ==============================================================================
- The modules with hand-drawn style is under development and will be released in the future.
- The modules with dashed border is highly user-customizable and extendible.
- The modules with hand-drawn style are under development and will be released in the future.
- The modules with dashed borders are highly user-customizable and extendible.

View File

@@ -0,0 +1,93 @@
===============================
Quick Start
===============================
Introduction
==============
This ``Quick Start`` guide tries to demonstrate
- It's very easy to build a complete Quant research workflow and try users' ideas with ``Qlib``.
- Though with public data and simple models, machine learning technologies work very well in practical Quant investment.
Installation
==================
Users can easily intsall ``Qlib`` according to the following steps:
- Before installing ``Qlib`` from source, users need to install some dependencies:
.. code-block::
pip install numpy
pip install --upgrade cython
- Clone the repository and install ``Qlib``
.. code-block::
git clone https://github.com/microsoft/qlib.git && cd qlib
python setup.py install
To kown more about `installation`, please refer to `Qlib Installation <../start/installation.html>`_.
Prepare Data
==============
Load and prepare data by running the following code:
.. code-block::
python scripts/get_data.py qlib_data_cn --target_dir ~/.qlib/qlib_data/cn_data
This dataset is created by public data collected by crawler scripts in ``scripts/data_collector/``, which have been released in the same repository. Users could create the same dataset with it.
To kown more about `prepare data`, please refer to `Data Preparation <../component/data.html>`_.
Auto Quant Research Workflow
====================================
``Qlib`` provides a tool named ``Estimator`` to run the whole workflow automatically (including building dataset, training models, backtest and evaluation). Users can start an auto quant research workflow and have a graphical reports analysis according to the following steps:
- Quant Research Workflow:
- Run ``Estimator`` with `estimator_config.yaml` as following.
.. code-block::
cd examples # Avoid running program under the directory contains `qlib`
estimator -c estimator/estimator_config.yaml
- Estimator result
The result of ``Estimator`` is as follows, which is also the result of ``Interday Trading``. Please refer to please refer to `Interdat Trading <../component/backtest.html>`_. for more details about the result.
.. code-block:: python
risk
excess_return_without_cost mean 0.000605
std 0.005481
annualized_return 0.152373
information_ratio 1.751319
max_drawdown -0.059055
excess_return_with_cost mean 0.000410
std 0.005478
annualized_return 0.103265
information_ratio 1.187411
max_drawdown -0.075024
To know more about `Estimator`, please refer to `Estimator <../component/estimator.html>`_.
- Graphical Reports Analysis:
- Run ``examples/estimator/analyze_from_estimator.ipynb`` with jupyter notebook
Users can have portfolio analysis or prediction score (model prediction) analysis by run ``examples/estimator/analyze_from_estimator.ipynb``.
- Graphical Reports
Users can get graphical reports about the analysis, please refer to `Aanalysis: Evaluation & Results Analysis <../component/report.html>`_ for more details.
Custom Model Integration
===============================================
``Qlib`` provides ``lightGBM`` and ``Dnn`` model as the baseline of ``Interday Model``. In addition to the default model, users can integrate their own custom models into ``Qlib``. If users are interested in the custom model, please refer to `Custom Model Integration <../start/integration.html>`_.