"""Risk guardrails. Generous-but-present defaults for a paper account. These are enforced programmatically in ``execution/guardrails.py`` — the LLM's requested sizing and stop/take levels are inputs that get clamped here, never trusted. """ from __future__ import annotations from pydantic import BaseModel class RiskConfig(BaseModel): max_position_pct: float = 0.10 # cap per single position, % of equity max_symbol_exposure_pct: float = 0.15 # aggregate cap per ticker across all agents max_trades_per_agent: int = 3 max_trades_per_day: int = 8 allow_shorts: bool = True # shorts enabled; persona prompts decide when to use them default_stop_pct: float = 0.07 default_take_pct: float = 0.15 min_price: float = 3.0 # skip sub-$3 names max_price: float | None = None DEFAULT_RISK = RiskConfig()