qlib icon indicating copy to clipboard operation
qlib copied to clipboard

manual update seems don't work

Open gaoshanlee193 opened this issue 10 months ago • 2 comments

❓ Questions and Help

double confirm if manual daily update don't works. If yes, when it will go back to normal? and warnings frequently pop up when running "collector.py".

logs of warning: "FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method. The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.

For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object. "

error logs:"r.utils:wrapper:517 - _get_simple: 1 :get data error: 000003.sz--2020-09-24 00:00:00+08:00--2025-02-12 00:00:00+08:00The stock may be delisted, please check 2025-02-12 08:16:54.421 | WARNING | data_collector.utils:wrapper:517 - _get_simple: 2 :get data error: 000003.sz--2020-09-24 00:00:00+08:00--2025-02-12 00:00:00+08:00The stock may be delisted, please check 2025-02-12 08:16:59.701 | WARNING | data_collector.utils:wrapper:517 - _get_simple: 3 :get data error: 000003.sz--2020-09-24 00:00:00+08:00--2025-02-12 00:00:00+08:00The stock may be delisted, please check 2025-02-12 08:17:05.112 | WARNING | data_collector.utils:wrapper:517 - _get_simple: 4 :get data error: 000003.sz--2020-09-24 00:00:00+08:00--2025-02-12 00:00:00+08:00The stock may be delisted, please check 2025-02-12 08:17:10.313 | WARNING | data_collector.utils:wrapper:517 - _get_simple: 5 :get data error: 000003.sz--2020-09-24 00:00:00+08:00--2025-02-12 00:00:00+08:00The stock may be delisted, please check 2025-02-12 08:17:10.314 | WARNING | data_collector.base:save_instrument:163 - 000003.sz is empty"

We sincerely suggest you to carefully read the documentation of our library as well as the official paper. After that, if you still feel puzzled, please describe the question clearly under this issue.

gaoshanlee193 avatar Feb 12 '25 00:02 gaoshanlee193

it has to use other data source?

gaoshanlee193 avatar Feb 12 '25 08:02 gaoshanlee193

Hi, @gaoshanlee193 After trying, the qlib.scripts.data_collector.yahoo.collector.run.update_data_to_bin() method works. Download the data, normalise it, and convert it to a bin file. Everything works fine. You do see a lot of warnings during this process, but they don't all come from qlib, for example the first warning you mention, it comes from yahooquery, which is not currently updated, so there is no way to remove this warning. In the process of updating, qlib in order to ensure the integrity of the data, get all the list of stocks, may contain the delisted stocks, delisted stocks can not get the data, there is the second warning you mentioned, this is normal. If you want to get the data from other sources, you can write your own script to get the data.

Image

SunsetWolf avatar Mar 12 '25 09:03 SunsetWolf