Draft
Conversation
- 删除 push2his 东财 K 线 URL 与 QLIB_HS_SYMBOLS_SOURCE 的 Baostock 标的回退逻辑 - CSI300/500/100 等非海外 bench 统一走 Baostock query_trade_dates - CALENDAR_BENCH_URL_MAP 中 A 股指数改为 Yahoo 代码供 yahooquery 使用 - 更新中国区增量脚本网络说明(标的列表不再依赖 Baostock) Co-authored-by: YYGe01 <YYGe01@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
microsoft/qlib的main最近一次相关更新为2c21b808(PR fix: use baostock to fetch trading calendar instead of Eastmoney API microsoft/qlib#2193):用 Baostock 获取交易日历,替代东方财富 API。main在scripts/data_collector/utils.py中仍保留东财push2his的CALENDAR_URL_BASE/CALENDAR_BENCH_URL_MAP映射,并额外加入了QLIB_HS_SYMBOLS_SOURCE与 Baostock 标的列表回退逻辑。本 PR 变更
CSI300/CSI500/CSI100等非海外bench_code与ALL分支并列,统一通过 Baostockquery_trade_dates拉取沪深交易日历。CALENDAR_BENCH_URL_MAP:A 股指数项改为 Yahoo 代码(如000300.ss),供yahooquery拉海外/指数日线时不再依赖东财 URL;海外项仍为^GSPC等。get_hs_stock_symbols:恢复为与上游一致的「东财分页 + 重试」循环,并移除import os及 Baostock 全市场列表辅助函数。run_cn_incremental_update.sh:更新网络说明,标的列表不再写「Baostock」依赖。验证
python3 -m py_compile scripts/data_collector/utils.py通过。