From 37d27684095e137a86be75ec32f3f13158961a45 Mon Sep 17 00:00:00 2001 From: xxm Date: Wed, 26 Aug 2026 21:42:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20divergence=5Fdetector=E6=81=A2=E5=A4=8Dh?= =?UTF-8?q?kHSI=E6=81=92=E6=8C=87(=E8=AF=BBstock=5Fdaily,=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E7=A7=91=E5=88=9B50vs=E6=81=92=E6=8C=87=E8=83=8C?= =?UTF-8?q?=E7=A6=BB=E4=BF=A1=E5=8F=B7=E9=9D=99=E9=BB=98)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/profile-scripts/divergence_detector.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/deploy/profile-scripts/divergence_detector.py b/deploy/profile-scripts/divergence_detector.py index a07f7f18..77fd2006 100644 --- a/deploy/profile-scripts/divergence_detector.py +++ b/deploy/profile-scripts/divergence_detector.py @@ -49,7 +49,8 @@ STREAK_DAYS = 3 # 连涨/连跌3天 → 信号 def fetch_indices(): """获取所有指数数据(读 DB stock_daily 收盘价,2026-08-26 分层铁律:消费层不直连新浪API)""" import sqlite3 - # 指数代码 → 中文名(stock_daily 表已有 sh000001/sz399001/sz399006/sh000688) + # 指数代码 → 中文名(stock_daily 已有 sh000001/sz399001/sz399006/sh000688/hkHSI; + # sh000016/sh000300/hkHSCEI 无数据则跳过——2026-08-26 补充:hkHSI 在 stock_daily 有数据,需保留恒指背离监测) index_map = { "sh000001": "上证指数", "sz399001": "深证成指", @@ -57,6 +58,7 @@ def fetch_indices(): "sh000688": "科创50", "sh000016": "上证50", "sh000300": "沪深300", + "hkHSI": "恒生指数", } indices = {} try: @@ -85,7 +87,7 @@ def fetch_indices(): except Exception as e: print(f"[DIVERGE] 采集失败: {e}", file=sys.stderr) return {} - # 港股指数 hkHSI/hkHSCEI 不在 stock_daily,读不到则不返回(中性值,由调用方跳过低检测) + # 港股指数 hkHSCEI 不在 stock_daily,读不到则不返回(中性值,由调用方跳过低检测) return indices def load_history():