Quant Sandbox
DerivativesPortfolio & RiskFixed IncomeCorporate FinanceStochastic ModelsGuide
Guide
Derivatives pricing
01Forwards, calls and puts02Combining positions03Arbitrage and the forward price04Put–call parity05The one-step binomial model06Risk-neutral probabilities07Multi-step trees and backward induction08American options and early exercise09Delta and hedging10Geometric Brownian motion11The Black–Scholes formula12The Greeks: gamma, vega, theta and rho13Implied volatility and the volatility smile14Stochastic volatility and the Heston model15Static replication: Breeden–Litzenberger and Carr–Madan16Exotic options: barriers, Asians and digitals
Portfolio & risk
01Returns and volatility02Diversification and correlation03The efficient frontier and the capital market line04Risk aversion and the optimal complete portfolio05CAPM, beta and the security market line06Performance measures: Sharpe, Treynor, Jensen and information ratio07Factor models and systematic risk08Value at Risk and expected shortfall
Fixed income
01Bond prices and yields02Duration and convexity03Immunization and duration matching04Spot rates, forward rates and the yield curve05Bond futures and the cheapest-to-deliver06Interest rate swaps07Callable bonds and negative convexity08Credit risk: default probabilities and credit spreads
Corporate finance
01Interest, compounding and discounting02Annuities, perpetuities and loan amortization03Net present value and internal rate of return04The weighted average cost of capital05Capital structure and the Modigliani–Miller theorems06Discounted cash flow valuation07Relative valuation with multiples08Real options: the value of flexibility
Stochastic models
01Random walks and Brownian motion02Probability spaces, σ-algebras and random variables03Filtrations, adapted processes and stopping times04Conditional expectation and martingales05Properties of Brownian motion06The reflection principle and first passage times07The Brownian bridge08The Itô integral09Itô's lemma10Kolmogorov equations and the Feynman–Kac formula11Change of measure and Girsanov's theorem12Monte Carlo option pricing13Simulating SDEs: the Euler–Maruyama scheme14Mean reversion: Ornstein–Uhlenbeck and Vasicek15Jumps and the Merton jump-diffusion model
Knowledge graph

© 2026 Quant Sandbox · A study aid for quantitative finance

Privacy & dataNo cookies

This site does not use cookies and asks for no personal data. It keeps a few small settings in your browser's local storage — your chosen theme and language, the sidebar layout, and your progress and answers in the Guides — so it remembers them on your next visit. This data never leaves your device; clearing your browser storage removes it. Inputs you change can also be captured in the page URL, so you can share or bookmark a specific setup. The site uses Vercel Web Analytics, a privacy-friendly, cookieless service that records only anonymous, aggregated usage (such as page views) without identifying you or tracking you across other sites.

Guide/Portfolio & risk

Value at Risk and expected shortfall

Lesson 8 of 8 · 1 min read

The lesson "Returns and volatility" measured risk by the volatility σ\sigmaσ, the standard deviation of returns. A risk manager usually wants a different kind of answer: an amount of money that the position could lose. This lesson turns a return distribution into two such numbers, Value at Risk and expected shortfall, first under the normal model and then with fat tails, and ends with portfolios, which links back to "Diversification and correlation".

The loss distribution

Take a position worth VVV today and fix a horizon, for example one trading day or ten. Let RRR be the simple return of the position over that horizon. The loss is the fall in value, counted as a positive number:

L=−(Vh−V)=−VR.L = -(V_h - V) = -V R.L=−(Vh​−V)=−VR.

A gain is a negative loss. The distribution of LLL is the loss distribution; risk measures are numbers read off its right tail, where the large losses are. We assume the position is held unchanged over the horizon.

Value at Risk

Pick a confidence level α\alphaα, typically 95% or 99%. The Value at Risk VaRα\text{VaR}_\alphaVaRα​ is the α\alphaα-quantile of the loss distribution: the smallest amount ℓ\ellℓ such that the loss stays at or below ℓ\ellℓ with probability at least α\alphaα,

VaRα=min⁡{ℓ:P(L≤ℓ)≥α}.\text{VaR}_\alpha = \min\{\ell : \mathbb{P}(L \le \ell) \ge \alpha\}.VaRα​=min{ℓ:P(L≤ℓ)≥α}.

A one-day 99% VaR of 28,000 reads: on 99 days out of 100 the loss should not exceed 28,000. The convention here is that VaR is a positive amount of money and α\alphaα is close to 1.

Expected shortfall

VaR is a threshold. It says how often the threshold is crossed, but nothing about how far. The expected shortfall answers that: it is the average loss in the worst 1−α1-\alpha1−α fraction of outcomes. For a continuous loss distribution this equals

ESα=E[L∣L≥VaRα]=11−α∫α1VaRu du.\text{ES}_\alpha = \mathbb{E}\big[L \mid L \ge \text{VaR}_\alpha\big] = \frac{1}{1-\alpha}\int_\alpha^1 \text{VaR}_u\,du.ESα​=E[L∣L≥VaRα​]=1−α1​∫α1​VaRu​du.

The second form shows it as the average of all VaRs beyond α\alphaα, so ESα≥VaRα\text{ES}_\alpha \ge \text{VaR}_\alphaESα​≥VaRα​ always.

The normal model

Assume the return over the horizon is normal, R∼N(μ,σ2)R \sim N(\mu, \sigma^2)R∼N(μ,σ2). Then L=V(σZ−μ)L = V(\sigma Z - \mu)L=V(σZ−μ) with ZZZ standard normal (the sign of ZZZ is flipped, which the symmetry of the normal allows). Let zα=N−1(α)z_\alpha = N^{-1}(\alpha)zα​=N−1(α) be the standard normal quantile, so z0.99≈2.326z_{0.99} \approx 2.326z0.99​≈2.326. Since LLL is increasing in ZZZ, its quantile is

VaRα=V (σzα−μ).\text{VaR}_\alpha = V\,(\sigma z_\alpha - \mu).VaRα​=V(σzα​−μ).

For the expected shortfall we need the mean of ZZZ beyond zαz_\alphazα​. The standard normal density φ(x)=e−x2/2/2π\varphi(x) = e^{-x^2/2}/\sqrt{2\pi}φ(x)=e−x2/2/2π​ satisfies φ′(x)=−xφ(x)\varphi'(x) = -x\varphi(x)φ′(x)=−xφ(x), so xφ(x)x\varphi(x)xφ(x) has the antiderivative −φ(x)-\varphi(x)−φ(x):

E[Z∣Z≥zα]=11−α∫zα∞x φ(x) dx=11−α[−φ(x)]zα∞=φ(zα)1−α.\mathbb{E}[Z \mid Z \ge z_\alpha] = \frac{1}{1-\alpha}\int_{z_\alpha}^{\infty} x\,\varphi(x)\,dx = \frac{1}{1-\alpha}\Big[-\varphi(x)\Big]_{z_\alpha}^{\infty} = \frac{\varphi(z_\alpha)}{1-\alpha}.E[Z∣Z≥zα​]=1−α1​∫zα​∞​xφ(x)dx=1−α1​[−φ(x)]zα​∞​=1−αφ(zα​)​.

Substituting into L=V(σZ−μ)L = V(\sigma Z - \mu)L=V(σZ−μ) gives

ESα=V(σ φ(zα)1−α−μ).\text{ES}_\alpha = V\left(\sigma\,\frac{\varphi(z_\alpha)}{1-\alpha} - \mu\right).ESα​=V(σ1−αφ(zα​)​−μ).

At α=99%\alpha = 99\%α=99% the factor is φ(2.326)/0.01≈2.665\varphi(2.326)/0.01 \approx 2.665φ(2.326)/0.01≈2.665, about 15% above z0.99z_{0.99}z0.99​.

Scaling with the horizon

Volatility is usually estimated from daily returns. As shown in "Returns and volatility", if daily returns are independent and identically distributed, variances add over days, so over hhh days

σh=σ1h,μh=μ1h.\sigma_h = \sigma_1\sqrt{h}, \qquad \mu_h = \mu_1 h.σh​=σ1​h​,μh​=μ1​h.

Over short horizons μ\muμ is tiny compared with σ\sigmaσ and is often set to zero; then VaR and ES grow like h\sqrt{h}h​. The rule relies on three assumptions: returns on different days are independent, volatility stays constant, and the position is not changed during the horizon. Volatility clustering and autocorrelation break the first two, so a scaled 10-day figure is an approximation.

Worked example

A position of V=1,000,000V = 1{,}000{,}000V=1,000,000 has daily volatility σ=1.2%\sigma = 1.2\%σ=1.2% and μ=0\mu = 0μ=0. The steps below compute its 99% VaR and ES over one day and its VaR over ten days.

Worked example

99% VaR and ES of a 1,000,000 position

  1. Multiply the position by its daily volatility.

    Vσ=1,000,000×0.012\displaystyle V\sigma = 1{,}000{,}000 \times 0.012Vσ=1,000,000×0.012=12,000
  2. Look up the 99% quantile of the standard normal distribution.

    z0.99=N−1(0.99)\displaystyle z_{0.99} = N^{-1}(0.99)z0.99​=N−1(0.99)=2.326
  3. The one-day VaR is VσV\sigmaVσ times the quantile.

    VaR0.99=Vσ⋅z0.99\displaystyle \text{VaR}_{0.99} = V\sigma \cdot z_{0.99}VaR0.99​=Vσ⋅z0.99​=27,916
  4. The one-day ES uses the tail factor φ(z0.99)/0.01≈2.665\varphi(z_{0.99})/0.01 \approx 2.665φ(z0.99​)/0.01≈2.665 in place of the quantile.

    ES0.99=Vσ⋅φ(z0.99)0.01\displaystyle \text{ES}_{0.99} = V\sigma \cdot \frac{\varphi(z_{0.99})}{0.01}ES0.99​=Vσ⋅0.01φ(z0.99​)​=31,983
  5. Over ten days the volatility, and with μ=0\mu = 0μ=0 also the VaR, grows by the factor 10≈3.162\sqrt{10} \approx 3.16210​≈3.162.

    VaR0.99(10)=VaR0.99⋅10\displaystyle \text{VaR}^{(10)}_{0.99} = \text{VaR}_{0.99} \cdot \sqrt{10}VaR0.99(10)​=VaR0.99​⋅10​=88,279

The ten-day volatility is σ10=1.2%×10≈3.79%\sigma_{10} = 1.2\% \times \sqrt{10} \approx 3.79\%σ10​=1.2%×10​≈3.79%, and the ten-day ES scales in the same way, to about 101,138.

Fat tails

Daily returns have more extreme days than the normal predicts. A simple fat-tailed model is the Student t distribution with ν\nuν degrees of freedom. Its variance is ν/(ν−2)\nu/(\nu-2)ν/(ν−2), so we rescale it by (ν−2)/ν\sqrt{(\nu-2)/\nu}(ν−2)/ν​ to unit variance and multiply by σ\sigmaσ. Both models then have the same volatility and differ only in shape: the t puts more weight in the far tail and in the centre, less in between. Small ν\nuν means fat tails; as ν→∞\nu \to \inftyν→∞ the t becomes normal.

For ν=4\nu = 4ν=4 the multipliers of σ\sigmaσ are:

  • α=97.5%\alpha = 97.5\%α=97.5%: VaR 1.96 under both models; ES 2.34 (normal) against 2.82 (t).
  • α=99%\alpha = 99\%α=99%: VaR 2.33 against 2.65 (14% higher); ES 2.67 against 3.69 (38% higher).
  • α=99.9%\alpha = 99.9\%α=99.9%: VaR 3.09 against 5.07; ES 3.37 against 6.84, about twice as much.

In the worked example the fat-tailed one-day 99% VaR is about 31,794 and the ES about 44,280. A VaR at a moderate confidence level hardly sees the tail; the ES, which averages over the tail, does, and the gap widens as α\alphaα rises.

The figure uses a position of 100 with daily volatility 1.2% and zero mean. Sliders set the confidence level α\alphaα (90% to 99.5%), the horizon in days (1 to 20, volatility scaled by h\sqrt{h}h​) and the degrees of freedom ν\nuν of the fat-tailed model (3 to 30). The chart shows the loss distribution under the normal model and under the Student t with the same volatility, with vertical lines at the two VaRs. The readouts give VaR and ES under both models, per 100 invested. With α=99%\alpha = 99\%α=99%, one day and ν=4\nu = 4ν=4 they read 2.79 and 3.20 (normal) and 3.18 and 4.43 (t). Raise α\alphaα towards 99.5% and watch the fat-tailed ES move away from the normal one; then lower ν\nuν and see the same effect grow.

Loss distribution under a normal and a fat-tailed modelOpen in Risk & Return →
99.0%
0.90.995
1
120
4
330
NormalFat-tailed (Student t)
VaR, normal
2.79
ES, normal
3.20
VaR, fat-tailed
3.18
ES, fat-tailed
4.43

Historical simulation

Instead of assuming a distribution, historical simulation reuses the past. Take, say, the last 500 daily returns, apply each to today's position to get 500 hypothetical losses, and sort them. The 99% VaR is about the fifth-largest loss and the ES the average of the five largest. The method captures fat tails and correlations as they actually occurred, but only those in the window: a calm window gives a low VaR right before a crisis.

Properties of VaR and ES

Because VaR is a single quantile, two positions with the same VaR can have very different losses beyond it. Worse, VaR is not subadditive: the VaR of a portfolio can exceed the sum of the VaRs of its parts. Example: two independent bonds each lose 100 with probability 4% and nothing otherwise. Each has a 95% VaR of 0, since a loss occurs with probability below 5%. Holding both, the probability of at least one default is 1−0.962=7.84%1 - 0.96^2 = 7.84\%1−0.962=7.84%, so the portfolio's 95% VaR is 100. Measured by VaR, diversification looks harmful.

Expected shortfall is subadditive, ES(L1+L2)≤ES(L1)+ES(L2)\text{ES}(L_1 + L_2) \le \text{ES}(L_1) + \text{ES}(L_2)ES(L1​+L2​)≤ES(L1​)+ES(L2​); in the example each bond has ES 80 and the pair 103.2, well below 160. Together with three simpler properties (monotonicity, translation invariance, positive homogeneity) this makes ES a coherent risk measure.

VaR answers "how bad can it get on a normal bad day"; ES answers "how bad is it on average once that line is crossed". For this reason the Basel Fundamental Review of the Trading Book (FRTB) replaced 99% VaR by 97.5% ES for market risk capital. Under the normal model the two are almost equal (2.326 against 2.338 standard deviations); with fat tails ES is larger.

Portfolio VaR

For a portfolio with weights www and return covariance matrix Σ\SigmaΣ, the lesson "Diversification and correlation" gives σp2=w⊤Σ w\sigma_p^2 = w^\top\Sigma\,wσp2​=w⊤Σw, and in the normal model VaRα=V(σpzα−μp)\text{VaR}_\alpha = V(\sigma_p z_\alpha - \mu_p)VaRα​=V(σp​zα​−μp​). With correlations below one, σp\sigma_pσp​ is less than the weighted average of the volatilities, so the portfolio VaR is less than the sum of the separate VaRs. Splitting the 1,000,000 above into two positions of 500,000, each with daily volatility 1.2% and correlation 0.3, gives σp=1.2%×0.65≈0.97%\sigma_p = 1.2\% \times \sqrt{0.65} \approx 0.97\%σp​=1.2%×0.65​≈0.97% and a 99% VaR of about 22,507 instead of 27,916.

Summary

  • The loss over a horizon is L=−VRL = -VRL=−VR; VaRα\text{VaR}_\alphaVaRα​ is its α\alphaα-quantile, a positive amount of money.
  • ESα\text{ES}_\alphaESα​ is the average loss in the worst 1−α1-\alpha1−α tail and is never below VaR.
  • Normal model: VaRα=V(σzα−μ)\text{VaR}_\alpha = V(\sigma z_\alpha - \mu)VaRα​=V(σzα​−μ), ESα=V(σφ(zα)/(1−α)−μ)\text{ES}_\alpha = V(\sigma\varphi(z_\alpha)/(1-\alpha) - \mu)ESα​=V(σφ(zα​)/(1−α)−μ), with σh=σ1h\sigma_h = \sigma_1\sqrt{h}σh​=σ1​h​ under independence and constant volatility.
  • With fat tails VaR rises moderately but ES much more, increasingly so at high confidence levels.
  • ES is subadditive and coherent, VaR is not; regulation (FRTB) uses 97.5% ES.
Try itEstimate means, volatilities and the risk–return trade-off in the Risk & Return lab →
2 questions on this lesson at the end of the series →
← PreviousFactor models and systematic riskBack to guides →Portfolio & risk
Connections
Value at Risk and expected shortfall
Open the full graph →
Labs for this lesson
Risk & ReturnPortfolio Lab