1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-06-06 05:51:17 +08:00
Files
qlib/examples/benchmarks/README.md
wangwenxi-handsome 3760a18a8d Merge nested main (#597)
* MVP for Indian Stocks in qlib using yahooquery

* cleaned with black

* cleaned with black

* add YahooNormalizeIN and YahooNormalizeIN1d

* cleaned the code

* added 1min for IN and also updated readme

* update comments

* fix comments

* recorder support upload both raw file and directory

* fix comments

* Update README.md

* Fix docs of QlibRecorder

* sort index after loader (#538)

make sure the fetch method is based on a index-sorted pd.DataFrame

* refactor online serving rolling api

* refactor TRA

* format by black

* fix horizon

* fix TRA when use single head

* clean up

* improve pretrain

* update README

* fix tra when logdir is None

* fix tra when logdir is None

* Update strategy.py

* Update README.md

* Update README.md

* Conda Suggestion

* code standard docs

* Update ensemble.py (#560)

* Fix CI  Bug (#575)


Co-authored-by: yuxwang <anduinnn@foxmail.com>

* Update gen.py (#576)

* Fix multi-process loop calls (#574)

* check lexsort in the 'lazy_sort_index' function (#566)

* check lexsort

* check lexsort

* lexsort comment

* lexsort comment

* Delete .DS_Store

* Update README.md

* bug fix & use oracle transport pretrain

* mend

* Add `backend_freq_config` parameter, support multi-freq uri

* Add sample_config to QlibDataLoader, support multi-freq

* add multi-freq example

* get_cls_kwargs renamed get_callable_kwargs

* support multi-freq uri

* Add inst_processors to D.features

* Fix typo

* Fix the index type of the multi-freq example

* Fix duplicate mlflow directories in tests

* Add DataPathManager to QlibConfig && modify inst_processors to supports list only

* Modify the default value in the multi_freq example

* Modify client-server mode and dataset-cache to disable inst_processor

* Add wheel package to github CI

* fix comment

* Update FAQ.rst

* Update README.md

Fix wrong link

* Update the docs of TaskManager (#586)

* Update manage.py

* update yaml

* update run_all_model

* Modify the Feature to be case sensitive (#589)

* update README

* remove verbose

* fix spell bug

* fix typos (#592)

* Update Release Note

* fix portfolio bug

* Add calendar support for resample

* add freq kwargs

* test.yml: Remove redundant code (#595)

* Supporting shared processor (#596)

* Supporting shared processor

* fix readonly reverse bug

* remove pytests dependency

* with fit bug

* fix parameter error

* fix comments

* Fix undefined names in Python code (#599)

* Update pytorch_tabnet.py

$ `flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics`
```
./qlib/qlib/contrib/model/pytorch_tabnet.py:567:38: F821 undefined name 'inp'
            self.independ.append(GLU(inp, out_dim, vbs=vbs))
                                     ^
./qlib/examples/model_rolling/task_manager_rolling.py:75:18: F821 undefined name 'task_train'
        run_task(task_train, self.task_pool, experiment_name=self.experiment_name)
                 ^
2     F821 undefined name 'task_train'
2
```

* Fix undefined names in Python code

* from qlib.model.trainer import task_train

* update seed

* fix some docstring

* add comments

* Fix SimpleDatasetCache

* Update setup.py

updated classifiers

* Update setup.py

change to matplotlib==3.3

* Update python-publish.yml

added python 3.9

* updategrade version number

* Update model list

* fix the type of filter_pipe

* fix comment

* fix record_temp

* update cvxpy version

* Update code_standard.rst (#587)

* Update code_standard.rst

* Update docs/developer/code_standard.rst

Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>

Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>

* Add file lock for MLflowExpManager (#619)

* fix torch version

* Share version number (#620)

* Update initialization.rst (#622)

* Update initialization.rst

* Update docs/start/initialization.rst

Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>

* Update docs/start/initialization.rst

Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>

Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>

* fix bugs for running previous exmaple

* fix deal amount bug

* update change doc (#623)

* Add files via upload

* Update README.md

* Update README.md

* Update README.md

* Delete change doc.gif

* Add files via upload

* Update README.md

* Delete change doc.gif

* Add files via upload

* Delete change doc.gif

* Add files via upload

* Update README.md

Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>

Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>

* update doc

* simplify run all model

* fix run all model bug

* Fix Models (#483)

* fix gat dataset

* fix tft model

* Update tft.py

* Fix tft.py

Co-authored-by: Pengrong Zhu <zhu.pengrong@foxmail.com>

* type and skip empty exp

* fix model yaml config

* fix tft import bug

* skip empty result

* fix model and yaml bug

* fix wrong generate parameter

* Modify multi-freq example (#626)

* modify the example of multi-freq

* add Copyright

* add a comment to average_ops.py

* modify the example of multi-freq

* add comment to multi_freq_handler.py

* add the Ref expression description to multi_freq_handler.py

* add expression description to multi_freq_handler.py

* update images

* fix workflow and update framework

Co-authored-by: Gaurav <2796gaurav@gmail.com>
Co-authored-by: 2796gaurav <17353992+2796gaurav@users.noreply.github.com>
Co-authored-by: bxdd <bxd98@126.com>
Co-authored-by: Young <afe.young@gmail.com>
Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>
Co-authored-by: Dong Zhou <Zhou.Dong@microsoft.com>
Co-authored-by: ZhangTP1996 <ztp18@mails.tsinghua.edu.cn>
Co-authored-by: demon143 <59681577+demon143@users.noreply.github.com>
Co-authored-by: Wangwuyi123 <51237097+Wangwuyi123@users.noreply.github.com>
Co-authored-by: yuxwang <anduinnn@foxmail.com>
Co-authored-by: Pengrong Zhu <zhu.pengrong@foxmail.com>
Co-authored-by: Mark Zhao <50850474+markzhao98@users.noreply.github.com>
Co-authored-by: cslwqxx <cslwqxx@users.noreply.github.com>
Co-authored-by: Dong Zhou <evanzd@users.noreply.github.com>
Co-authored-by: SaintMalik <37118134+saintmalik@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Anurag Kumar <mailanu98@gmail.com>
Co-authored-by: demon143 <785696300@qq.com>
2021-10-01 02:15:30 +08:00

5.9 KiB

Benchmarks Performance

Here are the results of each benchmark model running on Qlib's Alpha360 and Alpha158 dataset with China's A shared-stock & CSI300 data respectively. The values of each metric are the mean and std calculated based on 20 runs with different random seeds.

The numbers shown below demonstrate the performance of the entire workflow of each model. We will update the workflow as well as models in the near future for better results.

If you need to reproduce the results below, please use the v1 dataset: python scripts/get_data.py qlib_data --target_dir ~/.qlib/qlib_data/qlib_cn_1d --region cn --version v1

In the new version of qlib, the default dataset is v2. Since the data is collected from the YahooFinance API (which is not very stable), the results of v2 and v1 may differ

Alpha360 dataset

Model Name Dataset IC ICIR Rank IC Rank ICIR Annualized Return Information Ratio Max Drawdown
Linear Alpha360 0.0150±0.00 0.1049±0.00 0.0284±0.00 0.1970±0.00 -0.0659±0.00 -0.7072±0.00 -0.2955±0.00
CatBoost (Liudmila Prokhorenkova, et al.) Alpha360 0.0397±0.00 0.2878±0.00 0.0470±0.00 0.3703±0.00 0.0342±0.00 0.4092±0.00 -0.1057±0.00
XGBoost (Tianqi Chen, et al.) Alpha360 0.0400±0.00 0.3031±0.00 0.0461±0.00 0.3862±0.00 0.0528±0.00 0.6307±0.00 -0.1113±0.00
LightGBM (Guolin Ke, et al.) Alpha360 0.0399±0.00 0.3075±0.00 0.0492±0.00 0.4019±0.00 0.0323±0.00 0.4370±0.00 -0.0917±0.00
MLP Alpha360 0.0285±0.00 0.1981±0.02 0.0402±0.00 0.2993±0.02 0.0073±0.02 0.0880±0.22 -0.1446±0.03
GRU (Kyunghyun Cho, et al.) Alpha360 0.0490±0.01 0.3787±0.05 0.0581±0.00 0.4664±0.04 0.0726±0.02 0.9817±0.34 -0.0902±0.03
LSTM (Sepp Hochreiter, et al.) Alpha360 0.0443±0.01 0.3401±0.05 0.0536±0.01 0.4248±0.05 0.0627±0.03 0.8441±0.48 -0.0882±0.03
ALSTM (Yao Qin, et al.) Alpha360 0.0493±0.01 0.3778±0.06 0.0585±0.00 0.4606±0.04 0.0513±0.03 0.6727±0.38 -0.1085±0.02
GATs (Petar Velickovic, et al.) Alpha360 0.0475±0.00 0.3515±0.02 0.0592±0.00 0.4585±0.01 0.0876±0.02 1.1513±0.27 -0.0795±0.02
DoubleEnsemble (Chuheng Zhang, et al.) Alpha360 0.0407±0.00 0.3053±0.00 0.0490±0.00 0.3840±0.00 0.0380±0.02 0.5000±0.21 -0.0984±0.02
TabNet (Sercan O. Arik, et al.) Alpha360 0.0192±0.00 0.1401±0.00 0.0291±0.00 0.2163±0.00 -0.0258±0.00 -0.2961±0.00 -0.1429±0.00
TCTS (Xueqing Wu, et al.) Alpha360 0.0485±0.00 0.3689±0.04 0.0586±0.00 0.4669±0.02 0.0816±0.02 1.1572±0.30 -0.0689±0.02
Transformer (Ashish Vaswani, et al.) Alpha360 0.0141±0.00 0.0917±0.02 0.0331±0.00 0.2357±0.03 -0.0259±0.03 -0.3323±0.43 -0.1763±0.07
Localformer (Juyong Jiang, et al.) Alpha360 0.0408±0.00 0.2988±0.03 0.0538±0.00 0.4105±0.02 0.0275±0.03 0.3464±0.37 -0.1182±0.03
TRA (Hengxu Lin, et al.) Alpha360 0.0491±0.01 0.3868±0.06 0.0589±0.00 0.4802±0.04 0.0898±0.02 1.2490±0.32 -0.0778±0.02

Alpha158 dataset

Model Name Dataset IC ICIR Rank IC Rank ICIR Annualized Return Information Ratio Max Drawdown
Linear Alpha158 0.0393±0.00 0.2980±0.00 0.0475±0.00 0.3546±0.00 0.0795±0.00 1.0712±0.00 -0.1449±0.00
CatBoost (Liudmila Prokhorenkova, et al.) Alpha158 0.0503±0.00 0.3586±0.00 0.0483±0.00 0.3667±0.00 0.1080±0.00 1.1561±0.00 -0.0787±0.00
XGBoost (Tianqi Chen, et al.) Alpha158 0.0481±0.00 0.3659±0.00 0.0495±0.00 0.4033±0.00 0.1111±0.00 1.2915±0.00 -0.0893±0.00
LightGBM (Guolin Ke, et al.) Alpha158 0.0475±0.00 0.3979±0.00 0.0485±0.00 0.4123±0.00 0.1143±0.00 1.2744±0.00 -0.0800±0.00
MLP Alpha158 0.0358±0.00 0.2738±0.03 0.0425±0.00 0.3221±0.01 0.0836±0.02 1.0323±0.25 -0.1127±0.02
TFT (Bryan Lim, et al.) Alpha158 (with selected 20 features) 0.0343±0.00 0.2071±0.02 0.0107±0.00 0.0660±0.02 0.0623±0.02 0.5818±0.20 -0.1762±0.01
GRU (Kyunghyun Cho, et al.) Alpha158 (with selected 20 features) 0.0311±0.00 0.2418±0.04 0.0425±0.00 0.3434±0.02 0.0330±0.02 0.4805±0.30 -0.1021±0.02
LSTM (Sepp Hochreiter, et al.) Alpha158 (with selected 20 features) 0.0312±0.00 0.2394±0.04 0.0418±0.00 0.3324±0.03 0.0298±0.02 0.4198±0.33 -0.1348±0.03
ALSTM (Yao Qin, et al.) Alpha158 (with selected 20 features) 0.0385±0.01 0.3022±0.06 0.0478±0.00 0.3874±0.04 0.0486±0.03 0.7141±0.45 -0.1088±0.03
GATs (Petar Velickovic, et al.) Alpha158 (with selected 20 features) 0.0349±0.00 0.2511±0.01 0.0457±0.00 0.3537±0.01 0.0578±0.02 0.8221±0.25 -0.0824±0.02
DoubleEnsemble (Chuheng Zhang, et al.) Alpha158 0.0544±0.00 0.4338±0.01 0.0523±0.00 0.4257±0.01 0.1253±0.01 1.4105±0.14 -0.0902±0.01
TabNet (Sercan O. Arik, et al.) Alpha158 0.0383±0.00 0.3414±0.00 0.0388±0.00 0.3460±0.00 0.0226±0.00 0.2652±0.00 -0.1072±0.00
Transformer (Ashish Vaswani, et al.) Alpha158 0.0274±0.00 0.2166±0.04 0.0409±0.00 0.3342±0.04 0.0204±0.03 0.2888±0.40 -0.1216±0.04
Localformer (Juyong Jiang, et al.) Alpha158 0.0355±0.00 0.2747±0.04 0.0466±0.00 0.3762±0.03 0.0506±0.02 0.7447±0.34 -0.0875±0.02
TRA (Hengxu Lin, et al.) Alpha158 (with selected 20 features) 0.0409±0.00 0.3253±0.04 0.0488±0.00 0.4045±0.02 0.0673±0.02 1.0389±0.39 -0.0830±0.02
TRA (Hengxu Lin, et al.) Alpha158 0.0442±0.00 0.3426±0.03 0.0555±0.00 0.4395±0.03 0.0833±0.03 1.2064±0.36 -0.0849±0.02
  • The selected 20 features are based on the feature importance of a lightgbm-based model.
  • The base model of DoubleEnsemble is LGBM.