qlib icon indicating copy to clipboard operation
qlib copied to clipboard

请问数据下载下来之后数据如何在已下载的基础上增量更新?

Open caijynb opened this issue 2 years ago • 4 comments

python scripts/get_data.py qlib_data --target_dir ~/.qlib/qlib_data/cn_data --region cn 直接运行该命令获取到的数据到2020-09-25为止,存放的目录是~/.qlib/qlib_data/cn_data

如何在之前的数据基础上更新至2022-07-20 https://qlib.readthedocs.io/en/latest/component/data.html#data-preparation 该章节给出的命令是: python scripts/data_collector/yahoo/collector.py update_data_to_bin --qlib_data_1d_dir --trading_date --end_date 替换掉参数后命令为: python scripts/data_collector/yahoo/collector.py update_data_to_bin --qlib_data_1d_dir ~/.qlib/qlib_data/cn_data --trading_date 2020-09-25 --end_date 2022-07-20

运行报错: get_simple: 1 :name 'start' is not defined

caijynb avatar Jul 21 '22 08:07 caijynb

如果更换命令的保存路径:python scripts/data_collector/yahoo/collector.py update_data_to_bin --qlib_data_1d_dir ~/test/cn_data --trading_date 2020-09-25 --end_date 2022-07-20

会下载数据再报错get_simple: 1 :name 'start' is not defined

且下载下来的数据依然是到2020-09-25为止

caijynb avatar Jul 21 '22 08:07 caijynb

Hello,I'm having the same problem you had before,have you solved it?

Lay-du avatar Aug 15 '22 04:08 Lay-du

Can this PR help you?

SunsetWolf avatar Aug 19 '22 12:08 SunsetWolf

Maybe your qlib_data_1d_dir should be ~/.qlib/qlib_data/cn_data/, you lost the symbol "/" at the last.

Alsac avatar Sep 12 '22 09:09 Alsac

This issue is stale because it has been open for three months with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

github-actions[bot] avatar Dec 11 '22 12:12 github-actions[bot]

Thanks to Alsac. This works for me:

python scripts/data_collector/yahoo/collector.py update_data_to_bin --qlib_data_1d_dir ~/.qlib/qlib_data/cn_data/ --trading_date 2020-09-26 --end_date 2023-04-08

jeremy-feng avatar Apr 08 '23 12:04 jeremy-feng