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
| Metric | Value |
|---|---|
| Epic | 5.5 |
| Status | Backlog |
| Initiative | Sable Returns: Reconcile with BTIG + Configurable Methods |
Data Dependencies
Already Available:
dietz_daily.daily_return_pct- Entity-level daily returnsperf_daily_v2.daily_ror- Account-level daily returnsnav_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:
- Get last N daily returns (default: 252 trading days)
- Sort returns ascending (worst first)
- VaR = return at (1 - confidence) percentile
- CVaR = average of all returns worse than VaR
- Convert to dollar amounts using latest NAV
Parameters
| Parameter | Default | Description |
|---|---|---|
| Confidence Level | 95% | Tail threshold (95% = worst 5% of days) |
| Lookback Period | 252 days | ~1 year of trading days |
| Time Horizon | 1 day | Holding 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
| # | Title | Priority |
|---|---|---|
| 1 | Create SQL function for CVaR calculation | High |
| 2 | Create API endpoint for CVaR data | High |
| 3 | Build frontend CVaR dashboard component | High |
| 4 | Add position-level CVaR contribution (marginal CVaR) | Low |
Related
- Sable CLI Pipeline - Daily data refresh
- Returns Overview - Dietz vs BTIG reconciliation