From e3cb8460dff733dad4a0f210d1730639c20511b7 Mon Sep 17 00:00:00 2001 From: xxm Date: Tue, 18 Aug 2026 22:21:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20collect=5Fdata=E6=8C=81=E4=BB=93?= =?UTF-8?q?=E5=A4=84=E7=BD=AE=E4=B8=8A=E4=B8=8B=E6=96=87=E2=80=94=E2=80=94?= =?UTF-8?q?switched=E7=94=A8attributed=E5=AE=9A=E4=B9=89+=E6=B7=B1?= =?UTF-8?q?=E5=A5=97=E5=88=A4=E5=AE=9A+=E6=97=A0=E7=AD=96=E7=95=A5/?= =?UTF-8?q?=E5=A4=B1=E6=95=88=E6=8C=81=E4=BB=93=E7=94=A8position=5Fmanagem?= =?UTF-8?q?ent=E6=A1=86=E6=9E=B6+=E5=BD=93=E5=89=8D=E6=B8=A9=E5=8C=BA?= =?UTF-8?q?=E5=90=88=E6=A0=BC=E7=AD=96=E7=95=A5(=E8=80=81=E8=8E=AB:?= =?UTF-8?q?=E5=A4=84=E7=BD=AE=E5=86=B3=E7=AD=96=E8=A6=81=E6=9C=89=E6=98=8E?= =?UTF-8?q?=E7=A1=AE=E7=AD=96=E7=95=A5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/profile-scripts/batch_reassess.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/deploy/profile-scripts/batch_reassess.py b/deploy/profile-scripts/batch_reassess.py index 68ce78ac..bd733515 100644 --- a/deploy/profile-scripts/batch_reassess.py +++ b/deploy/profile-scripts/batch_reassess.py @@ -224,6 +224,17 @@ def collect_data(code): except Exception as _te: print(f" ⚠️ 技术位计算失败({code}): {_te}", flush=True) + # 深套重算(价格已拉取,与 strategy_lifecycle is_deep_loss 同口径 -20%) + _cost3 = data.get("held_cost") or 0 + _px3 = data.get("price") or 0 + if data.get("held") and _cost3 > 0 and _px3 > 0: + _pnl3 = (_px3 - _cost3) / _cost3 * 100 + data["deep_loss"] = _pnl3 < -20 + data["pnl_pct"] = round(_pnl3, 1) + else: + data["deep_loss"] = False + data["pnl_pct"] = None + return data def build_prompt(data):