Skip to main content

CVaR (Conditional Value at Risk)

Overview

CVaR (Conditional Value at Risk), also called Expected Shortfall, measures the average loss in tail scenarios. Unlike VaR which gives a threshold ("we won't lose more than X with 95% confidence"), CVaR answers: "Given we're in the worst 5% of scenarios, what's our expected loss?"

Status

MetricValue
Epic5.5
StatusBacklog
InitiativeSable Returns: Reconcile with BTIG + Configurable Methods

Data Dependencies

Already Available:

  • dietz_daily.daily_return_pct - Entity-level daily returns
  • perf_daily_v2.daily_ror - Account-level daily returns
  • nav_daily_v2.nav - Daily NAV for dollar-value conversion

To Be Built:

  • SQL function gold.fn_calculate_cvar() for historical simulation
  • API endpoint /api/risk/cvar
  • Frontend component on Risk Control tab

Calculation Method

Uses Historical Simulation:

  1. Get last N daily returns (default: 252 trading days)
  2. Sort returns ascending (worst first)
  3. VaR = return at (1 - confidence) percentile
  4. CVaR = average of all returns worse than VaR
  5. Convert to dollar amounts using latest NAV

Parameters

ParameterDefaultDescription
Confidence Level95%Tail threshold (95% = worst 5% of days)
Lookback Period252 days~1 year of trading days
Time Horizon1 dayHolding period for risk estimate

Example

For a portfolio with 252 days of returns at 95% confidence:

  • Sort all 252 returns from worst to best
  • VaR (95%) = 13th worst day (252 × 0.05 ≈ 12.6)
  • CVaR (95%) = Average of the 12 worst days

If worst 12 days averaged -3.5% and NAV is $10M:

  • CVaR = -3.5% = -$350,000

Child Issues

#TitlePriority
1Create SQL function for CVaR calculationHigh
2Create API endpoint for CVaR dataHigh
3Build frontend CVaR dashboard componentHigh
4Add position-level CVaR contribution (marginal CVaR)Low