From 861c5a4a61bb47825c5acc2df95e99d3099902a5 Mon Sep 17 00:00:00 2001 From: xxm Date: Sun, 16 Aug 2026 07:43:14 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B0=83=E5=BA=A6=E5=B1=82strategy=5Fr?= =?UTF-8?q?outer=20matched=E6=94=B9=E6=A0=87=E5=87=86A=E2=80=94=E2=80=94?= =?UTF-8?q?=E4=B8=89=E9=A1=B9=E8=BE=BE=E6=A0=87(=E9=95=BF=E6=9C=9F/?= =?UTF-8?q?=E8=BF=91=E6=9C=9F/=E5=BD=93=E4=B8=8B=E9=80=82=E5=BA=94?= =?UTF-8?q?=E6=B8=A9=E5=8C=BA=E5=B9=B4=E5=8C=96>=E5=A4=A7=E7=9B=98)+?= =?UTF-8?q?=E6=89=8B=E5=8A=A8=E5=8F=AF=E7=94=A8,=E6=9B=BF=E4=BB=A3?= =?UTF-8?q?=E5=8F=AA=E7=9C=8B=E8=83=9C=E7=8E=8750%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/profile-scripts/strategy_router.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/deploy/profile-scripts/strategy_router.py b/deploy/profile-scripts/strategy_router.py index 93518407..2abb7e24 100644 --- a/deploy/profile-scripts/strategy_router.py +++ b/deploy/profile-scripts/strategy_router.py @@ -131,7 +131,17 @@ def route(regime, temp, perf): best = max(regs.items(), key=lambda x: x[1].get("win_rate", 0)) best_wr = best[1].get("win_rate", 0) cur_wr = cur.get("win_rate") if cur else None - matched = (best_wr >= 50) and (cur_wr is not None and cur_wr >= 50) + # 2026-08-16 资格标准A(老莫):长期10y/近期2y/当下1y 适应温区年化>大盘 三项达标 + 手动可用 + # (替代只看胜率≥50%的旧判定——旧标准会让年化-41%但胜率51%的策略激活) + try: + from strategy_qualify import evaluate_strategy, is_available, get_benchmarks + _qbench = get_benchmarks('a') + _qev = evaluate_strategy(name, 'a', best_regime=best[0], bench=_qbench) + _qual_ok = bool(_qev and _qev.get("long_ok") and _qev.get("mid_ok") and _qev.get("short_ok")) + _manual_ok = is_available(name) + matched = _qual_ok and _manual_ok + except Exception: + matched = (best_wr >= 50) and (cur_wr is not None and cur_wr >= 50) # 兜底旧标准 family = FAMILY_MAP.get(name, DEFAULT_FAMILY) base = 1.0 if matched else 0.3 try: