Add capital efficiency risk simulation

This commit is contained in:
defiQUG
2026-04-27 11:26:55 -07:00
parent 1cf845cb3a
commit 818e864d2b
15 changed files with 1111 additions and 13 deletions

View File

@@ -36,6 +36,15 @@ Every run (hub-only, full-quote, bridge shock) should produce a scorecard with a
| `micro_trade_gas_cost_total` | number | Abstract gas budget consumed by support trades |
| `scenario` | string | e.g. `hub_only_11`, `full_quote_1_56_137`, `bridge_shock_137_56` |
| `runId` | string | Optional run identifier |
| `roi_mean` | number | Mean capital-efficiency ROI when Monte Carlo is enabled |
| `roi_p05` / `roi_p95` | number | 5th/95th percentile ROI band |
| `pnl_distribution` | object | PnL percentiles `{p05,p50,p95}` |
| `max_drawdown_p95` | number | 95th percentile max drawdown |
| `liquidation_probability` | number | Fraction of Monte Carlo paths that liquidated |
| `peg_deviation_frequency` | number | Fraction of path-epochs above peg circuit-break threshold |
| `external_liquidity_floor_violations` | integer | Count of path-epochs below minimum external liquidity before clamp |
| `volatility_throttle_events` | integer | Count of sigma-triggered deleverage/allocation throttle events |
| `spread_adjustment_events` | integer | Count of volatility/liquidity/peg-driven spread adjustments |
**Example (minimal):**
@@ -79,6 +88,17 @@ From [10-behavioral-stability-analysis.md](10-behavioral-stability-analysis.md):
**Pass:** All gates satisfied for the scenario.
**Fail:** Any gate violated; do not treat scenario as deployable without parameter change or topology reduction.
Capital-efficiency scenarios also use `config/capital-efficiency-policy.json` gates:
| Gate | Default |
|------|---------|
| Liquidation probability | `<= 0.02` |
| p95 max drawdown | `<= 0.25` |
| Peg deviation frequency | `<= 0.05` |
| External liquidity floor violations | `0` |
| Deployable leverage | `<= 3x` |
| Hard leverage ceiling | `<= 4x` |
---
## 3. Phase 0 comparison (three scenarios)