-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Description
Description:
I encountered a JSONDecodeError when running the data collector script to initialize CN data. After debugging, I found that the _get_calendar_from_month function in qlib/scripts/data_collector/utils.py fails to retrieve trading calendar data from the Shenzhen Stock Exchange (SZSE) API for the years 2000 to 2004.
It seems the SZSE official API no longer returns valid data for these historical dates, while data from 2005 onwards works fine.
To Reproduce:
Run the data collector script that triggers get_calendar_list("ALL").
The script calls _get_calendar_from_month for historical months.
The process crashes when requesting data for months between 2000 and 2004.
Evidence / API Analysis:
I verified the specific API endpoints used by the collector:
❌ Failed Request (Year 2004):
URL: https://www.szse.cn/api/report/exchange/onepersistenthour/monthList?month=2004-01
Result: Returns invalid data (or empty response), causing JSONDecodeError.
✅ Successful Request (Year 2005):
URL: https://www.szse.cn/api/report/exchange/onepersistenthour/monthList?month=2005-01
Result: Returns valid JSON data properly.
log
