Estimate potential future losses using VaR, Expected Shortfall, Monte Carlo simulation, and stress testing. Use when the user asks about Value-at-Risk, CVaR, Expected Shortfall, scenario analysis, stress testing, or factor-based risk decomposition. Also trigger when users mention 'how much could I lose', 'worst-case scenario', 'tail risk', 'risk budget', 'component VaR', 'marginal VaR', '99% confidence loss', 'Monte Carlo simulation', or ask how to project portfolio risk forward.
Estimate potential future losses using VaR, Expected Shortfall, Monte Carlo simulation, and stress testing. Use when the user asks about Value-at-Risk, CVaR, Expected Shortfall, scenario analysis, stress testing, or factor-based risk decomposition. Also trigger when users mention 'how much could I lose', 'worst-case scenario', 'tail risk', 'risk budget', 'component VaR', 'marginal VaR', '99% confidence loss', 'Monte Carlo simulation', or ask how to project portfolio risk forward.
Forward-Looking Risk Analysis
Core Concepts
Parametric (Variance-Covariance) VaR
Assumes returns are normally distributed. For a single asset or portfolio in dollar terms (assuming zero expected return over short horizons):
VaR = W * z_alpha * sigma_p
where:
W = portfolio value
z_alpha = z-score for confidence level (1.645 for 95%, 2.326 for 99%)
sigma_p = portfolio volatility over the relevant horizon
More generally, including expected return:
VaR_alpha = mu - z_alpha * sigma
To convert from 1-day VaR to h-day VaR (assuming i.i.d. returns):
VaR_h = VaR_1 * sqrt(h)
Portfolio VaR (Multiple Assets)
For a portfolio with weight vector w and covariance matrix Sigma:
CVaR is a coherent risk measure (unlike VaR) because it satisfies subadditivity: CVaR(A+B) <= CVaR(A) + CVaR(B). This means diversification always reduces or maintains CVaR, which is not guaranteed for VaR.
Component VaR
Decomposes total portfolio VaR into contributions from each position. Component VaRs sum to total VaR.
CVaR_i = w_i * beta_i * VaR_p
where beta_i = Cov(R_i, R_p) / Var(R_p) is the asset's beta to the portfolio.
The Monte Carlo result should converge to approximately this value for a multivariate normal assumption.
Example 3: Expected Shortfall
Given: From the Monte Carlo simulation above, the losses exceeding VaR (the worst 500 out of 10,000 scenarios) have an average loss of $225,000.
Calculate: 95% CVaR.
Solution:
CVaR_95% = $225,000
Interpretation: When losses exceed the 95% VaR threshold, the average loss is $225,000. This is roughly 29% worse than the $174,090 VaR figure, highlighting the severity of tail events.
Common Pitfalls
VaR says nothing about tail shape: VaR only identifies a threshold. Two portfolios with identical VaR can have vastly different tail losses. Always compute CVaR alongside VaR to understand tail severity.
Parametric VaR assumes normality: Financial returns exhibit fat tails and skewness. Parametric VaR systematically underestimates tail risk. Use Monte Carlo with fat-tailed distributions or historical simulation for more realistic estimates.
Correlation breakdown in crises: Correlations spike toward 1.0 during market stress, precisely when diversification is most needed. Stress tests should use crisis-period correlations, not calm-period correlations.
Using too short a lookback for covariance estimation: Too short a window is noisy; too long a window includes stale data from different market regimes. A common compromise is 1-3 years of daily data, or use EWMA-weighted covariances.
Not distinguishing between absolute VaR and relative VaR: Absolute VaR includes expected return (VaR = -mu + zsigma); relative VaR excludes it (VaR = zsigma). For short horizons (1-10 days), the expected return is negligible and the distinction is minor. For longer horizons, it matters.
Square-root-of-time scaling limitations: VaR_h = VaR_1 * sqrt(h) assumes i.i.d. returns. With serial correlation or volatility clustering, this scaling is inaccurate.
Cross-References
historical-risk (wealth-management plugin): Historical VaR and realized volatility serve as non-parametric alternatives and calibration benchmarks for the forward-looking models in this skill.
performance-metrics (wealth-management plugin): VaR and CVaR can be used as risk denominators in modified risk-adjusted ratios (e.g., return/CVaR).
volatility-modeling (wealth-management plugin): EWMA and GARCH volatility forecasts provide the volatility inputs (sigma) for parametric and Monte Carlo VaR.
Running the Script
uv run scripts/forward_risk.py # run the demo (uses PEP 723 inline deps)
uv run scripts/forward_risk.py --verify # check demo outputs against the worked examples (exit 1 on mismatch)
python3 scripts/forward_risk.py # alternative (requires: pip install numpy scipy)
The demo prints the calculations covered above; its values match the worked examples in this skill. Run --help for a list of the classes and functions. For programmatic use, import the module rather than running it — the demo only executes under python forward_risk.py.