Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why dataset can't load alpha168/360 data since 2020-09-26? #1189

Closed
winglight opened this issue Jul 8, 2022 · 2 comments
Closed

Why dataset can't load alpha168/360 data since 2020-09-26? #1189

winglight opened this issue Jul 8, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@winglight
Copy link

🐛 Bug Description

To Reproduce

Steps to reproduce the behavior:

  1. dump_bin latest daily trading data(cn)
  2. test loading data by D, here's code:
fields = ['$adjClose', '$open', '$high', '$low', '$close', '$volume', 'Ref($close, 1)', 'Mean($close, 3)', '$high-$low']
D.features(['SH000300'], fields, start_time='2000-01-01', end_time='2022-12-31', freq='day').tail(300)

output:
image

That should say qlib can get the latest data, but here's dataset loading result:

import qlib
from qlib.contrib.data.handler import Alpha158

data_handler_config = {
    "start_time": "2008-01-01",
    "end_time": "2023-08-01",
    "fit_start_time": "2008-01-01",
    "fit_end_time": "2014-12-31",
    "instruments": "csi300",
}

if __name__ == "__main__":
    qlib.init()
    h = Alpha158(**data_handler_config)

    # get all the columns of the data
    print(h.get_cols())

    # fetch all the labels
    print(h.fetch(col_set="label"))

    # fetch all the features
    print(h.fetch(col_set="feature"))

image

Expected Behavior

Dataset load data just like D did.

Screenshot

Environment

Note: User could run cd scripts && python collect_info.py all under project directory to get system information
and paste them here directly.

  • Qlib version: 0.8.6
  • Python version: 3.7/3.8
  • OS (Windows, Linux, MacOS): Linux
  • Commit number (optional, please provide it if you are using the dev version):

Additional Notes

@winglight winglight added the bug Something isn't working label Jul 8, 2022
@winglight
Copy link
Author

system information:
Linux
x86_64
Linux-5.4.188+-x86_64-with-Ubuntu-18.04-bionic
#1 SMP Sun Apr 24 10:03:06 PDT 2022

Python version: 3.7.13 (default, Apr 24 2022, 01:04:09) [GCC 7.5.0]

Qlib version: 0.8.5.99
numpy==1.21.6
pandas==1.3.5
scipy==1.4.1
requests==2.23.0
sacred==0.8.2
python-socketio==5.7.0
redis==4.3.4
python-redis-lock==3.7.0
schedule==1.1.0
cvxpy==1.0.31
hyperopt==0.1.2
fire==0.4.0
statsmodels==0.10.2
xlrd==1.1.0
plotly==5.5.0
matplotlib==3.5.2
tables==3.7.0
pyyaml==5.4.1
mlflow==1.27.0
tqdm==4.64.0
loguru==0.6.0
lightgbm==3.3.2
tornado==5.1.1
joblib==1.1.0
fire==0.4.0
ruamel.yaml==0.17.21

@winglight
Copy link
Author

I found it caused by csi300 problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant