From e7dca3fec80aba1e86469df2ee0d3849cfe48474 Mon Sep 17 00:00:00 2001 From: aszerW Date: Fri, 27 Mar 2026 22:37:41 +0800 Subject: [PATCH] =?UTF-8?q?fix(core):=20=E4=BF=AE=E6=AD=A3=E4=B8=AD?= =?UTF-8?q?=E5=9B=BDA=E8=82=A1=E6=8C=87=E6=95=B0=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E5=8F=8A=E6=9B=B4=E6=96=B0=E6=8C=87=E6=95=B0?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在中国A股指数判断中增加对中证指数(.CSI)的支持 - 替换创业板指配置中的红利指数代码和对应ETF信息 - 更新中证银行ETF代码为最新的华宝银行ETF编码 --- config/strategies/rotation.yaml | 8 ++++---- core/datasource/hybrid_source.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config/strategies/rotation.yaml b/config/strategies/rotation.yaml index 36a237a..2a8ca03 100644 --- a/config/strategies/rotation.yaml +++ b/config/strategies/rotation.yaml @@ -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": diff --git a/core/datasource/hybrid_source.py b/core/datasource/hybrid_source.py index 4d298f8..ba6741a 100644 --- a/core/datasource/hybrid_source.py +++ b/core/datasource/hybrid_source.py @@ -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: """判断是否为加密货币"""