-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
🐛 Bug Description
To Reproduce
Steps to reproduce the behavior:
- dump_bin latest daily trading data(cn)
- 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)
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"))
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working

