diff --git a/deploy/profile-scripts/strategy_router.py b/deploy/profile-scripts/strategy_router.py index 753565d5..12fa6d6f 100644 --- a/deploy/profile-scripts/strategy_router.py +++ b/deploy/profile-scripts/strategy_router.py @@ -157,20 +157,18 @@ def main(): "updated_at": datetime.now().strftime("%Y-%m-%d %H:%M:%S"), "note": "温区(平滑K=5)选策略类型 + 温度(rsi)乘数;策略全温区发信号,适用温区由实测动态决定", } - # 港股路由(2026-08-14 新增,不影响A股)——港股策略按港股温区激活 + # 港股路由(2026-08-14 新增,不影响A股)——港股组合按温区调度(hk_strategies 定义) try: hk_regime = load_regime('hk') hk_temp = load_temp('hk') - hk_perf = load_regime_perf('hk') - if hk_perf: - hk_weights = route(hk_regime, hk_temp, hk_perf) - out["markets"] = {"hk": { - "state": hk_regime.get("regime", "unknown"), - "state_date": hk_regime.get("date", ""), - "temp_band": hk_temp.get("band", "unknown"), - "weights": hk_weights, - "active": [k for k, v in hk_weights.items() if v["matched"]], - }} + from hk_strategies import strategies_for_regime + hk_active = strategies_for_regime(hk_regime.get("regime", "unknown")) + out["markets"] = {"hk": { + "state": hk_regime.get("regime", "unknown"), + "state_date": hk_regime.get("date", ""), + "temp_band": hk_temp.get("band", "unknown"), + "active": hk_active, + }} except Exception as e: print(f"港股路由失败(不影响A股): {e}", flush=True) OUT.write_text(json.dumps(out, ensure_ascii=False, indent=1), encoding="utf-8")