feat(stock): exit_rules (손절·MA이탈·익절·클라이맥스)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-31 21:48:37 +09:00
parent 116b2540c2
commit b13c088739

View File

@@ -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")