Drawdown Protection
Drawdown protection is one of the most important risk controls in TRADEOS.tech. It operates at both the portfolio level and the individual position level, with multiple mechanisms working in parallel.
Portfolio-level drawdown breaker
The drawdown breaker tracks peak portfolio value and current portfolio value continuously. When the drawdown from peak exceeds the active profile's threshold, the breaker activates.
Calculation:
drawdown = (peak_portfolio_value - current_portfolio_value) / peak_portfolio_value
Peak portfolio value is tracked in the state store and updated whenever the portfolio reaches a new high. It persists across restarts.
Breaker states:
| Drawdown | State | Effect |
|---|---|---|
| < profile threshold | Normal | Full trading activity |
| ≥ profile threshold | Breaker active | New long intents rejected |
| ≥ 2× profile threshold | Critical | All new intents rejected |
When the breaker is active, the feasibility service rejects trade intents with a DRAWDOWN_LIMIT_EXCEEDED rejection reason. Existing positions are not forcibly closed — the exit manager continues to manage them with their configured stops.
Per-position stop loss
Every position has an associated stop loss set at entry time by the exit manager. Two mechanisms work together:
Fixed stop loss — set as a dollar amount (max_trade_loss_usd from the active profile). If the position's unrealized loss exceeds this amount, the position is closed immediately at market.
ATR-based trailing stop — the Average True Range over the past N bars is computed for the instrument. The trailing stop is set at entry_price - (ATR_multiplier × ATR) for long positions, and tightens as the position becomes profitable. This allows winning trades room to breathe while protecting against sharp reversals.
The tighter of the two stops at any given moment is the effective stop.
Dynamic strategy stops
Beyond the fixed and trailing stops, TRADEOS.tech uses dynamic strategy stops that adjust based on realized volatility:
- High volatility regime — stops widen to avoid being stopped out by normal price noise
- Low volatility regime — stops tighten to capture gains more efficiently
- Trending regime — trailing stop multiplier increases, allowing more room for continuation
- Mean-reverting regime — stops are tighter and profit targets are closer (mean-reversion trades have shorter expected durations)
These adjustments are computed by the dynamic_strategy_stops module and applied at position entry, then updated as regime classification changes.
Signal-level drawdown gate
A separate signal gate monitors per-signal-type win rates. If a signal type experiences an extended losing streak (configurable threshold), its confidence multiplier is set to zero — signals of that type are effectively disabled until the win rate recovers.
This prevents a temporarily miscalibrated signal type from continuing to generate losing trades while the drawdown breaker at the portfolio level has not yet activated.
Recovery behavior
After a drawdown event:
- The drawdown breaker remains active until portfolio value recovers above the threshold
- New position sizes are reduced during the recovery period — Kelly fraction caps are tightened until the portfolio recovers
- The autonomous agent logs the drawdown event and schedules a re-evaluation of current parameter settings
- If the drawdown was significant enough, the agent may propose a profile downgrade (e.g., from Aggressive to Balanced) pending operator review