Markets & Trading

Value-at-Risk & Risk Metrics Calculator

Compute Value-at-Risk (VaR) and Expected Shortfall three ways — parametric, historical and Monte-Carlo — for a single position or a two-asset portfolio. The signature calculation of the FRM, PRM and CAIA risk readings, with a tail-shaded return distribution and a plain-English reading.

$
%
Advertisement

How it works

Value-at-Risk answers one question: “over the next h days, how much could I lose, with c confidence, under normal conditions?” This tool computes it three independent ways and shows them side by side, because the methods make different assumptions and often disagree.

1. Parametric (variance–covariance)

VaR = V · ( z·σh − μh )  ·  ES = V · ( σh·φ(z)/(1−c) − μh )
where σh = σannual·√(h/252), μh = μannual·(h/252), z = N−1(c) and φ is the standard-normal density.

Assuming returns are normally distributed, the loss quantile is just a z-score number of standard deviations from the mean. The familiar z-values are 1.282 @ 90%, 1.645 @ 95%, 1.960 @ 97.5% and 2.326 @ 99%. Expected Shortfall uses the normal density at z, divided by the tail probability — the mean of the normal tail. Fast and clean, but it understates risk when returns have fat tails.

2. Historical simulation

No distribution is assumed. Your scaled returns are sorted ascending; the VaR is the loss at the (1−c) percentile, and ES is the average of every return worse than that cutoff. With a pasted series this uses your real data directly; otherwise it ranks a normally-generated sample. The honesty of historical VaR is also its weakness: it can only ever show losses that already happened in the window.

3. Monte-Carlo simulation

We draw 10,000 random period returns from r ~ N(μ·h/252, σ²·h/252), sort them, and read the empirical quantile for VaR with the tail mean for ES — the same percentile logic as historical, but on simulated rather than realised paths. It converges to the parametric answer for a linear position and is the go-to method once a portfolio contains options or other non-linear payoffs.

Square-root-of-time scaling

VaRh-day = VaR1-day · √h  (i.i.d. returns)

Volatility scales with the square root of time, so a 10-day VaR is about 3.16× the 1-day figure, not 10×. We annualise on a 252 trading-day year. The rule assumes returns are independent and identically distributed; it breaks down when volatility clusters or returns trend, so treat long horizons with care.

Two-asset portfolios

Diversification lowers risk whenever assets aren’t perfectly correlated. The blended volatility is σp = √(w₁²σ₁² + w₂²σ₂² + 2w₁w₂ρσ₁σ₂). With ρ < 1 the portfolio vol is below the weighted average of the two — that gap is the diversification benefit, and it feeds straight into a lower VaR.

VaR

A threshold

The loss you should not exceed at confidence c — not the worst case. Breaches still happen (1−c) of the time.

ES

The tail's depth

If you do breach VaR, ES is the average loss beyond it. Coherent and Basel-preferred.

Learn

Go deeper

Master risk measures with free certified courses on AMAADOR Academy.

FAQ

Why do the three methods disagree? Parametric assumes a normal bell curve; historical uses only what actually occurred; Monte-Carlo simulates from an assumed model. Real returns have fat tails, so parametric VaR is usually the most optimistic. A big gap between them is a warning that your risk is tail-driven.
Is VaR the most I can lose? No. VaR is a confidence threshold; losses beyond it are expected (1−c) of the time and can be far larger. That is exactly why Expected Shortfall exists — to measure how deep the tail goes.
Which confidence and horizon should I use? Basel market-risk uses 99% over 10 days; many desks monitor 1-day 95%. Higher confidence and longer horizons both raise the number. Pick what matches your reporting mandate, then stay consistent.

Related