From b13c088739c6fa6630589b3e2a9a6cdaf7d8c461 Mon Sep 17 00:00:00 2001 From: gahusb Date: Sun, 31 May 2026 21:48:37 +0900 Subject: [PATCH] =?UTF-8?q?feat(stock):=20exit=5Frules=20(=EC=86=90?= =?UTF-8?q?=EC=A0=88=C2=B7MA=EC=9D=B4=ED=83=88=C2=B7=EC=9D=B5=EC=A0=88?= =?UTF-8?q?=C2=B7=ED=81=B4=EB=9D=BC=EC=9D=B4=EB=A7=A5=EC=8A=A4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- stock/app/holdings_intel.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stock/app/holdings_intel.py b/stock/app/holdings_intel.py index 5cc43ee..c79745d 100644 --- a/stock/app/holdings_intel.py +++ b/stock/app/holdings_intel.py @@ -72,7 +72,10 @@ def _ma(closes: "pd.Series", window: int) -> Optional[float]: def exit_rules(holding: dict, ticker_prices: "pd.DataFrame", params: dict) -> dict: - """가격 기반 청산/리스크 flag. (momentum_loss는 compute 단계에서 합산.)""" + """가격 기반 청산/리스크 flag (stop_loss/ma50_break/ma200_break/take_profit/climax). + + Note: momentum_loss는 compute_and_store 단계에서 집계하므로 여기서 설정하지 않는다. + """ flags = {"stop_loss": False, "ma50_break": False, "ma200_break": False, "take_profit": False, "climax": False} avg = holding.get("avg_price")