fix(core): 修正中国A股指数判断逻辑及更新指数配置

- 在中国A股指数判断中增加对中证指数(.CSI)的支持
- 替换创业板指配置中的红利指数代码和对应ETF信息
- 更新中证银行ETF代码为最新的华宝银行ETF编码
This commit is contained in:
2026-03-27 22:37:41 +08:00
parent 70bb69fd98
commit e7dca3fec8
2 changed files with 6 additions and 6 deletions

View File

@@ -23,14 +23,14 @@ code_list:
name: "创业板指"
etf: "159915.SZ" # 易方达创业板ETF
market: "A"
"000015.SH":
name: "证红利"
etf: "510880.SH" # 华泰柏瑞红利ETF
"000922.CSI":
name: "证红利"
etf: "515180.SH" # 红利ETF博时
market: "A"
# 金融
"399986.SZ":
name: "中证银行"
etf: "512800.SH" # 华宝银行ETF
etf: "516310.SH" # 华宝银行ETF
market: "A"
# 消费
"399997.SZ":

View File

@@ -139,8 +139,8 @@ class HybridDataSource:
self._tushare_token: Optional[str] = None
def _is_china_index(self, code: str) -> bool:
"""判断是否为中国A股指数"""
return code.endswith(".SH") or code.endswith(".SZ") or code.endswith(".SS")
"""判断是否为中国A股指数(包括中证指数.CSI"""
return code.endswith(".SH") or code.endswith(".SZ") or code.endswith(".SS") or code.endswith(".CSI")
def _is_crypto(self, code: str) -> bool:
"""判断是否为加密货币"""