VaR / CVaR Methodology
Multi-asset risk engine: 3-day 99% Conditional Value at Risk with GFC stress augmentation.
Overview
PrimeRisk computes Conditional Value at Risk (CVaR), also known as Expected Shortfall (ES), for portfolios spanning four asset classes:
- Equities (stocks, ETFs)
- US Treasuries (on-the-run and off-the-run)
- Corporate Bonds (investment grade and high yield)
- Convertible Bonds (hybrid equity + credit)
CVaR answers the question: "Given that we are in the worst 1% of outcomes, what is the average loss?" This is more conservative than VaR alone, which only identifies the threshold.
Default Parameters
| Parameter | Value | Rationale |
|---|---|---|
| Holding period | 3 trading days | FICC GSD standard liquidation horizon |
| Confidence level | 99% | Regulatory standard (Basel III, FRTB) |
| Lookback window | 10 years (~2,520 trading days) | Captures multiple market regimes |
| GFC stub | 18 months (Jan 2008 – Jun 2009) | Ensures GFC stress is always in sample |
| Stub stress multiplier | 2.0x volatility | Empirical GFC vol was 2-3x normal |
| Scaling method | sqrt(T) parametric | Standard for short holding periods |
Methodology by Asset Class
Equities
Risk factor: Individual stock return volatility.
dailyVol = annualVol / sqrt(252)
3-day VaR = |MV| × dailyVol × sqrt(3) × z_0.99
Where z_0.99 = 2.326 (99th percentile of standard normal).
| Input | Source | Default |
|---|---|---|
| Annual volatility | User-supplied or implied vol from market data | 25% |
| Correlation (intra-class) | Between different stocks | 0.50 |
US Treasuries
Risk factor: Yield volatility by maturity bucket, translated to dollar P&L via DV01.
dailyYieldVol = bucketYieldVol / sqrt(252) [in basis points]
dailyDollarVol = DV01 × dailyYieldVol
dailyReturnVol = dailyDollarVol / |MV|
3-day VaR = |MV| × dailyReturnVol × sqrt(3) × z_0.99
Yield Volatility by Maturity Bucket (annualized, basis points):
| Bucket | Yield Vol (bps/yr) | Rationale |
|---|---|---|
| < 1 year | 45 | Short-end anchored by Fed policy |
| 1-3 years | 70 | Sensitive to rate expectations |
| 3-5 years | 75 | Peak sensitivity zone |
| 5-7 years | 72 | Moderate duration |
| 7-10 years | 68 | Benchmark sector |
| 10-20 years | 65 | Long-end mean reversion |
| 20-30 years | 62 | Ultra-long convexity dampens vol |
DV01 (Dollar Value of a Basis Point):
DV01 = MV × ModifiedDuration × 0.0001
If modified duration is not supplied, it is approximated from years to maturity and coupon using a semi-annual compounding model with a 4.25% yield proxy.
| Input | Source | Default |
|---|---|---|
| Modified duration | User-supplied or approximated | 0.9 × years to maturity |
| DV01 | User-supplied or computed | MV × modDur × 0.0001 |
| Correlation (intra-class) | Between Treasury buckets | 0.85 |
Corporate Bonds
Risk factor: Combined rate risk + credit spread risk.
totalYieldVol = sqrt(rateVol² + spreadVol²)
Rate risk uses the same Treasury yield volatility table. Spread risk uses a rating-dependent spread volatility.
Credit Spread Volatility by Rating (annualized, basis points):
| Rating | Spread Vol (bps/yr) | Rationale |
|---|---|---|
| AAA | 15 | Minimal spread movement |
| AA | 20 | Very low credit risk |
| A | 30 | Investment grade |
| BBB | 50 | Lower IG, more spread sensitivity |
| BB | 90 | High yield threshold |
| B | 140 | Speculative grade |
| CCC | 250 | Distressed |
| NR (Not Rated) | 60 | Conservative IG-equivalent |
The combined daily volatility is:
dailyTotalVol = sqrt(rateVol² + spreadVol²) / sqrt(252)
dailyDollarVol = DV01 × dailyTotalVol
This assumes low correlation between rate moves and spread moves — they can move independently (rates fall while spreads widen in a flight-to-quality scenario).
| Input | Source | Default |
|---|---|---|
| Credit rating | User-supplied | BBB |
| Spread duration | User-supplied | Same as modified duration |
| Modified duration | User-supplied or approximated | 0.85 × years to maturity |
| Correlation (intra-class) | Between different corp bonds | 0.65 |
Convertible Bonds
Risk factor: Hybrid equity delta + credit spread risk with negative correlation.
Convertible bonds have both equity sensitivity (through the embedded call option) and credit risk (as a corporate bond). These are combined using a negative correlation of -0.30, reflecting the empirical observation that equity rallies often coincide with spread tightening and vice versa.
equityComponent = delta × equityDailyVol
creditComponent = spreadDailyVol × modDur × 0.0001
combinedVol = sqrt(equity² + credit² + 2 × (-0.30) × equity × credit)
| Input | Source | Default |
|---|---|---|
| Equity delta | User-supplied | 0.50 (at-the-money) |
| Underlying ticker | User-supplied | Same as bond ticker |
| Equity vol | User-supplied | 25% |
| Credit rating | User-supplied | BB |
| Equity-credit correlation | Fixed | -0.30 |
| Correlation (intra-class) | Between converts | 0.45 |
VaR Computation
Two methods are computed for each position; the conservative (higher) value is used.
Parametric VaR
Assumes normally distributed returns.
VaR_99 = |MV| × dailyVol × sqrt(holdingPeriod) × z_0.99
CVaR_99 = |MV| × dailyVol × sqrt(holdingPeriod) × phi(z_0.99) / (1 - 0.99)
Where:
z_0.99 = 2.326(inverse normal CDF at 99%)phi(z) = e^(-z²/2) / sqrt(2π)(standard normal PDF)phi(2.326) / 0.01 ≈ 2.665
For a $10M position with 25% annual equity vol:
- Daily vol = 25% / sqrt(252) = 1.575%
- 3-day vol = 1.575% × sqrt(3) = 2.728%
- VaR_99 = $10M × 2.728% × 2.326 = $634,734
- CVaR_99 = $10M × 2.728% × 2.665 = $727,024
Monte Carlo VaR
Generates synthetic P&L distributions with a seeded PRNG for reproducibility.
- Generate ~2,520 normal-period daily returns using position-specific daily vol
- Generate ~378 GFC-stub returns at 2x the daily vol (stress period)
- Scale daily returns to 3-day returns via sqrt(3)
- Sort the combined sample (2,898 observations)
- VaR_99 = loss at the 1st percentile
- CVaR_99 = average of all losses beyond VaR_99 (~29 observations)
The stub ensures the GFC is always represented in the tail, even though it may be outside the 10-year lookback window.
Portfolio VaR with Diversification
Position-level VaRs are aggregated using a correlation-adjusted approach:
Portfolio_VaR² = Σ_i Σ_j sign_i × sign_j × VaR_i × VaR_j × ρ_ij
Portfolio_VaR = sqrt(Portfolio_VaR²)
Where sign accounts for long (+1) vs. short (-1) positions, and ρ_ij is the estimated correlation between positions.
Cross-Asset Correlation Matrix
| Equity | Treasury | Corporate | Convertible | |
|---|---|---|---|---|
| Equity | 0.50 | -0.20 | 0.40 | 0.60 |
| Treasury | -0.20 | 0.85 | 0.30 | -0.05 |
| Corporate | 0.40 | 0.30 | 0.65 | 0.55 |
| Convertible | 0.60 | -0.05 | 0.55 | 0.45 |
Key relationships:
- Equity ↔ Treasury (-0.20): Flight-to-quality effect — when stocks fall, Treasuries rally
- Equity ↔ Corporate (0.40): Credit and equity risk are correlated
- Equity ↔ Convertible (0.60): Converts have high equity delta sensitivity
- Treasury ↔ Corporate (0.30): Corporates have rate duration but also spread risk
Diversification Benefit
Diversification = 1 - (Portfolio_VaR / Undiversified_VaR)
Where Undiversified_VaR is the simple sum of all position VaRs. A portfolio with long equities and long Treasuries will show meaningful diversification due to the negative equity-Treasury correlation.
GFC Stub Period
The 18-month stress window (January 2008 – June 2009) captures the most severe fixed income and credit market dislocations in modern history:
| Event | Date | Impact |
|---|---|---|
| Bear Stearns collapse | Mar 2008 | Repo market freeze |
| Lehman Brothers bankruptcy | Sep 2008 | Credit markets seize |
| AIG bailout | Sep 2008 | Counterparty risk repricing |
| TARP enacted | Oct 2008 | Government intervention |
| Treasury yields hit 2% | Dec 2008 | Flight-to-quality extreme |
| Credit spreads peak | Dec 2008 | IG spreads > 600 bps, HY > 2,000 bps |
| Equity market bottom | Mar 2009 | S&P 500 at 676 |
| Recovery begins | Q2 2009 | Spreads normalize, rates stabilize |
The stub is applied at 2x normal volatility, which is conservative relative to actual GFC vol (2-3x in equities, 3-5x in credit spreads, 1.5-2x in Treasuries).
By always including this period, the VaR estimate never "forgets" the GFC even as the 10-year rolling window moves forward.
Comparison: CVaR vs. Haircut Margin
The FICC margin calculator shows both:
| Metric | Method | Use Case |
|---|---|---|
| Haircut Margin | MV × maturity-based haircut rate | FICC GSD clearing fund methodology |
| 3-Day 99% CVaR | DV01-based VaR with GFC stress | Independent risk validation |
If CVaR exceeds the haircut margin, it suggests the published haircut schedule may understate risk for that portfolio (e.g., concentrated duration exposure or high-vol maturity buckets).
Implementation
import { computeVaR } from '@/lib/var'
const report = computeVaR([
{
id: 'pos-1',
ticker: 'AAPL',
assetClass: 'equity',
side: 'long',
marketValue: 10_000_000,
vol: 0.28,
},
{
id: 'pos-2',
ticker: '912810TV0',
assetClass: 'treasury',
side: 'long',
marketValue: 50_000_000,
modifiedDuration: 18.5,
yearsToMaturity: 28,
},
{
id: 'pos-3',
ticker: 'XYZ-CONVERT',
assetClass: 'convertible',
side: 'long',
marketValue: 5_000_000,
equityDelta: 0.65,
rating: 'BB',
underlyingTicker: 'XYZ',
},
])
console.log(report.portfolioCvar99) // 3-day 99% CVaR
console.log(report.diversificationPct) // diversification benefit %
Module Structure
| File | Purpose |
|---|---|
src/lib/var/types.ts | Type definitions, proxy vol tables, default config |
src/lib/var/engine.ts | Core VaR/CVaR computation, Monte Carlo, correlation |
src/lib/var/index.ts | Public API exports |
Limitations
-
Parametric vol proxies: Volatility estimates use built-in lookup tables, not live market data. For production use, feed actual implied vols and historical yield series.
-
Normal distribution assumption: Parametric VaR assumes normality. The Monte Carlo component with GFC stub partially addresses fat tails, but extreme events can still exceed CVaR.
-
Static correlations: Cross-asset correlations are fixed constants. In practice, correlations spike during crises (correlation breakdown). The GFC stub partially compensates.
-
No term structure modeling: Treasury VaR uses parallel yield shifts per bucket, not a full term structure model (e.g., Nelson-Siegel or PCA-based).
-
No jump-to-default: Corporate bond VaR captures spread widening but not sudden default events. For distressed credits (CCC and below), a separate jump-to-default model would be more appropriate.
-
Convertible simplification: The convert model uses a fixed delta and linear equity sensitivity. A full convertible model would incorporate gamma, vega, and credit-equity coupling dynamics.
Sources
- Basel Committee on Banking Supervision — "Minimum capital requirements for market risk" (FRTB), Jan 2019
- DTCC/FICC — "GSD Clearing Fund Methodology" v2.1
- RiskMetrics — J.P. Morgan Technical Document, 4th Edition (parametric VaR)
- Carol Alexander — "Market Risk Analysis, Volume IV: Value-at-Risk Models" (Wiley, 2009)
- Acerbi & Tasche — "On the coherence of Expected Shortfall" (Journal of Banking & Finance, 2002)
- Federal Reserve — DFAST Severely Adverse Scenario specifications