# Tail-budgeted levered shape — Design

**Status:** draft for review
**Date:** 2026-07-07

## Goal

Re-tune the levered shadow book's per-sleeve leverage shape from the Sharpe-maximal fixed shape (carry ≈53% of gross) to a **tail-budgeted** shape (carry ≈40% of gross) that bounds a plausible carry dislocation to an acceptable book loss, at a small Sharpe cost. The shadow track then observes the more robust deployable candidate OOS instead of the fat-tailed Sharpe-max one.

## Why (the tail-budget analysis)

The current `_LEVERED_SLEEVE_SHAPE = {crypto_tstrend 1.0, unlock 1.5, xsfunding 5.0, positioning 2.0}` gives effective weights (gross 1.5×) carry 0.79 (53%). Carry is 53% of the WEIGHT but only ~4% of the daily variance — it is low-vol ballast whose real risk is a rare DISLOCATION (funding spike / stablecoin depeg / exchange halt), a fat tail the 5.5-yr backtest (worst carry day −1.5%) cannot rule out. The frontier (carry weight vs risk, gross 1.5×, non-carry split inverse-vol):

| −20% carry stress → book | carry% | Sharpe | CAGR | normal maxDD | P(−35%/yr, $35k) |
|---|---|---|---|---|---|
| −5.0% | 25% | 2.42 | +50% | −20.6% | 0% |
| **−8.0%** | **40%** | **2.70** | **+44%** | **−11.3%** | 0% |
| −10.5% (current) | 52% | 3.05 | +40% | −6.8% | 0% |

Key findings: (1) P(−35%/yr) is 0% for ALL shapes — no ruin risk in normal times. (2) Capping carry is NOT a free lunch — it shrinks the rare dislocation tail but RAISES the common normal drawdown (freed weight → volatile sleeves). It is a risk SWAP (rare-severe ↔ common-moderate), not a strict improvement. (3) The **carry ≈40% / −8% budget** is the balance point: Sharpe 2.70 (still well above naive 2.26), CAGR +44%, normal maxDD −11.3% (survivable), and the dislocation black-swan **halved** to −8% vs the Sharpe-max shape's −10.5%.

For a real-money pilot facing an UNMODELED carry tail, bounding the black-swan to −8% while keeping most of the return/Sharpe advantage is the prudent default.

## Design

Change ONE constant. Because the whole levered chain (`levered_eqwt_daily_returns`, `BybitFourEdgeStrategy`, `bybit_4edge_backtest_summary`, `_bybit_measured_net`/precompute, the sim pill, the replay toggle) reads `_LEVERED_SLEEVE_SHAPE`, re-tuning it re-tunes everything.

New shape (chosen so the gross-cap transform `effective[s] = shape[s]·1.5/Σshape` yields carry 0.60 / unlock 0.44 / positioning 0.26 / trend 0.20, i.e. carry 40% of gross, non-carry inverse-vol):

```
_LEVERED_SLEEVE_SHAPE = {crypto_tstrend: 1.0, unlock: 2.2, xsfunding: 3.0, positioning: 1.3}
```
(Σ = 7.5; /4 = {0.25, 0.55, 0.75, 0.325}; gross 1.875 > 1.5 → scale 0.8 → effective {0.20, 0.44, 0.60, 0.26}.)

A new invariant test PINS the tail budget: the levered book's effective carry weight ≈ 40% of gross (±2pp), so a −20% carry day is bounded to ≈ −8% of the book. This makes the tail budget a permanent, checked property — not a number that silently drifts on a future edit.

## Data flow / deploy
Constant change → push → build. Then re-run the two own-memory Jobs so prod reflects the new shape: `bybit-persist-sleeve-ret` (levered backtest reference) and `compare-measured-precompute` (levered measured curve). The levered shadow track has only ~1 old-shape day (observe-only, just started); RESTART it with a fresh T0 (delete its state + .bak so the next nightly re-inceptions) so it observes the new shape cleanly from day 0.

## Testing
- Invariant: effective carry weight of `_LEVERED_SLEEVE_SHAPE` (via `levered_eqwt` weight math or a small helper) is 40% ± 2pp of gross; the shape's non-carry ratios match inverse-vol.
- The existing levered-vs-naive tests still hold (they assert relative difference, not absolute values).
- Full suite green.
- Local browser (per feedback_verify_cockpit_locally_not_prod): the Backtest levered curve still renders (new shape → new metrics ~Sharpe 2.7 / CAGR 44% measured); the Replay toggle unchanged.

## Non-goals
- No adaptive/CVaR-optimizing overlay yet (that is the fuller Phase-2 — this is a static tail-budgeted shape, the robust default the shadow observes now). No capital.

## Risks
- The −20% carry stress is a modeling assumption (worst historical was −1.5%); the tail budget is a prudent guard against an unmodeled event, not a measured one. The shadow track must still observe a real carry stress OOS before capital.
- Restarting the shadow track resets its (1-day) OOS record — acceptable because the book definition changed; the old day observed a different book.
