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,