MCP 차단관련 로직 추가

This commit is contained in:
2026-02-26 13:33:24 +09:00
parent cc236d3dac
commit 92a1c81ef1
3 changed files with 18 additions and 1 deletions

View File

@@ -494,9 +494,11 @@ def is_daily_loss_exceeded(
total_assets: float,
realized_pnl_today: float,
) -> bool:
"""일일 손실 한도 초과 여부 (전체 자본 -3%)"""
if total_assets <= 0:
return False
# realized_pnl_today가 0이면 손실 없음 → 한도 미초과
if realized_pnl_today >= 0:
return False
return (realized_pnl_today / total_assets) <= DAILY_LOSS_LIMIT