Skip to main content

Module risk

Module risk 

Source
Expand description

Options sleeve risk: drawdown halt from high-water mark.

Structs§

DrawdownStatus

Functions§

compute_sleeve_equity
credit_spread_pnl_usd
Credit-spread realized PnL in USD.
drawdown_to_json
realized_pnl_usd
record_live_realized_pnl
Record live (non-sim) realized PnL when a position closes.
sleeve_base_usd
Sleeve base for HWM: explicit drawdown_sleeve_usd, else sim budget, else portfolio risk cap.
unrealized_pnl_from_monitors
Unrealized $ from monitor snapshots (profit_pct × credit × 100 × contracts).
update_drawdown
Update HWM / drawdown halt. Clears only prior drawdown-sourced halt reasons.