Skip to content

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

@winglight

Description

@winglight

🐛 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions