From c2ddb62c453ced5321fad28f1c5133a985a31275 Mon Sep 17 00:00:00 2001 From: xxm Date: Tue, 18 Aug 2026 12:25:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20entry=5Flow/high=E7=94=A8holding?= =?UTF-8?q?=E4=B8=BA=E5=9F=BA=E7=A1=80,LLM=E7=AE=97=E5=87=BA=E6=89=8D?= =?UTF-8?q?=E8=A6=86=E7=9B=96=E2=80=94=E2=80=94LLM=E7=BB=990=E6=97=B6?= =?UTF-8?q?=E7=94=A8holding=E5=90=88=E7=90=86=E5=80=BC=E4=B8=8D=E6=B8=85?= =?UTF-8?q?=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/profile-scripts/per_stock_reassess.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/deploy/profile-scripts/per_stock_reassess.py b/deploy/profile-scripts/per_stock_reassess.py index 51f431a7..6a1480b5 100644 --- a/deploy/profile-scripts/per_stock_reassess.py +++ b/deploy/profile-scripts/per_stock_reassess.py @@ -56,8 +56,14 @@ def _build_full_analysis(code, entry, result): # 2026-08-18 修复:entry_low/high 不用 or 短路——LLM 显式给(含0空区间)就用 LLM 值 # 否则 `0 or 95.0` 会把 LLM 的"清空区间"误判为"取旧脏值"(600262 教训:95/99 残留) - el = result.get("entry_low") if result.get("entry_low") is not None else entry.get("entry_low", 0) - eh = result.get("entry_high") if result.get("entry_high") is not None else entry.get("entry_high", 0) + # 2026-08-18 修复:entry_low/high 用 holding 值作为基础,LLM 算出区间(>0)才覆盖 + # LLM 给 0(没算出)时用 holding 的合理值(不清空);holding 是脏值时已被 promote 可执行性检查拦住 + el = entry.get("entry_low", 0) + if result.get("entry_low") and result.get("entry_low") > 0: + el = result.get("entry_low") + eh = entry.get("entry_high", 0) + if result.get("entry_high") and result.get("entry_high") > 0: + eh = result.get("entry_high") sl = result.get("stop_loss") or entry.get("stop_loss", 0) tp = result.get("take_profit") or entry.get("take_profit", 0) # 2026-08-18 修复 rr_ratio=0 bug:strategy_lifecycle 的 rr_ratio 可能为 0,