Sorry, we don't support your browser.  Install a modern browser

#idea7.barra Multi-Dimensional Risk Surfaces#554

Risk is not drawdown alone.
Grid systems must operate on a multidimensional risk surface including:

  • tail risk
  • time-underwater
  • liquidation proximity (even in spot via synthetic exposure)
  • correlation clustering
  • volatility-of-volatility
  • funding and fee drag

Risk must be modeled as geometry, not thresholds.

6 months ago

Core definitions
E_t = equity at time t
HWM_t = max_{u<=t}(E_u) (high-water mark)
Drawdown fraction: b_t = 1 - (E_t / HWM_t)
Real drawdown (your transform): B_t = b_t / (1 - b_t)
Inverse transform (useful if needed): b_t = B_t / (1 + B_t)
If you want a safe clamp: b_t = min(max(b_t, 0), 1 - eps) B_t = b_t / (1 - b_t)

6 months ago

1) Risk coordinates (vector r_t)
Define a risk coordinate vector r_t with components:
r_t = [ r_tail_t, r_TUW_t, r_liq_t, r_corr_t, r_VoV_t, r_drag_t, r_DD_t ]
We add r_DD_t explicitly using B_t.
1A) Tail risk (ES-like, regime-conditional)
Portfolio loss over horizon h: L_{t,h} = -(E_{t+h} - E_t)
Empirical VaR at level alpha (alpha close to 0.99): VaR_alpha = quantile_alpha( L_{t,h} )
Empirical Expected Shortfall: ES_alpha = mean( L_{t,h} | L_{t,h} >= VaR_alpha )
Tail-risk coordinate (nonnegative): r_tail_t = max(0, ES_alpha / E_t)
(If you include liquidity/slippage haircuts:) L_{t,h} = L_mark_{t,h} + L_slip_{t,h} + L_gap_{t,h}
1B) Time-underwater (TUW) as occupation time + hazard proxy
Underwater indicator: U_t = 1 if E_t < HWM_t else 0
Time-underwater over window T (discrete bars of size dt): TUW_T = sum_{k=0..N-1}( U_{t-k} dt ) where N = T/dt
Normalized TUW coordinate: r_TUW_t = TUW_T / T
Optional smoother (EWMA underwater): Ubar_t = (1 - a)U_t + aUbar_{t-1} with a in (0,1) r_TUW_t = Ubar_t
1C) Liquidation proximity (works for “synthetic” leverage too)
Define a conservative equity buffer: Buffer_t = E_t - MarginReq_t - Haircut_t
Define effective risk scale over horizon h: RiskScale_t = sigma_eff_t
sqrt(h)
Distance-to-ruin (dimensionless): d_liq_t = Buffer_t / (E_t RiskScale_t)
Turn it into a risk coordinate (higher = worse). Two common forms:
(1) Inverse distance: r_liq_t = 1 / max(d_liq_t, eps)
(2) Soft barrier centered at d_min: r_liq_t = -log( max(d_liq_t - d_min, eps) )
1D) Correlation clustering (factor crowding)
Let Sigma_t be the covariance matrix of returns (estimated rolling).
Largest eigenvalue (crowding / “one trade” indicator): lambda_max_t = max_eigenvalue(Sigma_t)
Normalize vs baseline (e.g., long-run median): r_corr_t = lambda_max_t / lambda_max_baseline
Alternative: average absolute off-diagonals: avg_corr_t = mean_{i<j}( abs(corr_{i,j,t}) ) r_corr_t = avg_corr_t
1E) Volatility-of-volatility (regime instability)
Realized volatility estimate over window W: RV_t = sqrt( sum_{k=1..W}( r_{t-k}^2 ) )
Vol-of-vol (variance of RV over window M): VoV_t = variance_{k=1..M}( RV_{t-k} )
Normalize: r_VoV_t = VoV_t / VoV_baseline
1F) Funding + fee drag (continuous dissipation)
Total drag rate per unit time: DragRate_t = FeesRate_t + FundingRate_t + SpreadCostRate_t
Drag over horizon h: Drag_h_t = sum_{k=1..h/dt}( DragRate_{t-k}
dt )
Coordinate (scaled by equity): r_drag_t = Drag_h_t / E_t
1G) Drawdown coordinate using REAL drawdown B = b/(1-b)
Drawdown fraction: b_t = 1 - (E_t / HWM_t)
Real drawdown: B_t = b_t / (1 - b_t)
Use it directly as a coordinate: r_DD_t = B_t
(Optionally smooth it:) Bbar_t = (1 - a)B_t + aBbar_{t-1} r_DD_t = Bbar_t
Why this helps: B_t grows ~linearly for small b, but explodes as b -> 1, matching “cliff risk”.

6 months ago

2) The risk surface / risk potential Phi_t
You want “geometry, not thresholds”. Define Phi_t as a scalar field over the state:
Option A) Quadratic form with state-dependent metric tensor G_t Phi_t = r_t^T G_t r_t
Where:
r_t is the risk vector above
G_t is a positive semi-definite matrix (weights + interactions)
If you don’t want full matrix math, use explicit interactions:
Phi_t = sum_i( w_i r_i_t^2 ) + sum_{i<j}( w_{ij} r_i_t r_j_t )
Example interaction terms that matter for grids:
tail
corr (systemic tail)
VoV DD (regime shift while underwater)
drag
TUW (bleed while stuck)
Option B) Barrier + smooth costs (good when liquidation distance is “hard”) Phi_t = ( sum_i w_i r_i_t^2 ) + k_liq r_liq_t
If r_liq_t is already a barrier form: r_liq_t = -log(max(d_liq_t - d_min, eps)) then Phi_t inherits the “cliff”.
Option C) Use REAL drawdown B_t as the central geometry driver Phi_t = w_DD B_t + sum_{i != DD}( w_i r_i_t^2 ) + sum_{i}( w_{i,DD} r_i_t B_t )
This makes all other risks “tilt” more aggressively as drawdown grows.

6 months ago

3) Geometry-driven controls (grid knobs respond to Phi derivatives)
Let the grid control vector be: u_t = [ spacing_t, width_t, skew_t, Qmax_t, recenter_gain_t, hedge_ratio_t ]
Gradient rule (generic): u_t = u_{t-1} - eta Grad_u( Phi_t ) - eta_tc Grad_u( TC(u_t) )
If you need simple copy-paste control laws without calculus:
(1) Spacing increases with curvature proxy (use VoV + tail + DD): spacing_t = spacing_base (1 + a1r_VoV_t + a2r_tail_t + a3B_t)
(2) Inventory cap shrinks with drawdown + corr clustering + liquidation risk: Qmax_t = Qmax_base / (1 + c1B_t + c2r_corr_t + c3r_liq_t)
(3) Recenter gain drops when VoV high (avoid whipsaw): recenter_gain_t = recenter_base / (1 + d1
r_VoV_t)
(4) Hedge ratio increases when systemic crowding rises (if hedging is allowed): hedge_ratio_t = clamp( hedge_base + e1r_corr_t + e2r_tail_t, 0, 1 )
(5) “Reduce-only intensity” as a smooth function (not binary): reduce_only_intensity_t = sigmoid( s0 + s1B_t + s2r_liq_t + s3*r_tail_t )
sigmoid(x) = 1 / (1 + exp(-x))

6 months ago

4) Minimal “plug-and-play” Phi_t (with Real Drawdown)
Here’s a concrete Phi_t you can paste and implement:
b_t = 1 - (E_t / HWM_t) B_t = b_t / (1 - b_t)
Phi_t = w1(ES_alpha/E_t)^2 + w2(TUW_T/T)^2 + w3(1/max(d_liq_t,eps))^2 + w4(lambda_max_t/lambda_max_baseline)^2 + w5(VoV_t/VoV_baseline)^2 + w6(Drag_h_t/E_t)^2 + w7(B_t)^2 + w8(B_t)(VoV_t/VoV_baseline) + w9(B_t)*(lambda_max_t/lambda_max_baseline)
(That last line builds the “surface coupling” you want: drawdown amplifies regime and crowding risk.)

6 months ago