Sentinel
Continuous portfolio risk surveillance that runs insidehz.run() or standalone. Monitors correlations, manages drawdowns with graduated responses, detects regime changes, and suggests hedges.
Drawdown Management
4-level graduated response: alert → reduce → pause → exit.
Regime Detection
Classifies volatility regime and adjusts risk budget multiplier.
Correlation Alerts
Ledoit-Wolf shrinkage detects correlation spikes across positions.
Hedge Suggestions
Delta-based hedge recommendations from prediction Greeks.
Standalone Report
Hedge Suggestions
Pipeline Mode
ctx.params["sentinel_report"] every N cycles.
Graduated Drawdown Response
| Threshold | Action | Behaviour |
|---|---|---|
-5% | alert | Log warning only |
-10% | reduce | Cancel 50% of open orders (largest first) |
-20% | pause | Cancel all open orders |
-30% | exit | Cancel all + submit exit orders for all positions |
Regime Detection
Portfolio volatility determines the regime and risk budget multiplier:| Regime | Volatility | Multiplier |
|---|---|---|
low_vol | < 5% | 1.5× (take more risk) |
normal | 5-15% | 1.0× |
high_vol | 15-30% | 0.5× (reduce risk) |
crisis | > 30% | 0.25× (minimal risk) |
SentinelConfig
| Parameter | Default | Description |
|---|---|---|
drawdown_thresholds | [(-0.05,"alert"), ...] | Graduated response levels |
correlation_spike_threshold | 0.3 | Flag when correlation jumps by this |
auto_hedge | False | Automatically execute hedge suggestions |
auto_deleverage | True | Automatically reduce positions on drawdown |
regime_sensitivity | 1.0 | Scaling factor for regime thresholds |
var_confidence | 0.95 | VaR confidence level |
lookback_returns | 100 | Rolling window for return calculations |
risk_budget_total | 10000.0 | Total risk budget in USDC |