Computing expected shortfall beyond VaR

Calculate the average loss in an exact upper probability share. Start with equally likely cases, then allocate part of a boundary probability when ties prevent strict exceedances from filling the share. Compare the calculation with the quantile-integral definition and separate model arithmetic from estimation.

Before you start: probability, means and loss thresholds

You need ordering, percentages and weighted averages. Probability runs from 0 to 1; 20% is 0.20. A weighted mean multiplies each value by its probability and adds the products. Our cases are mutually exclusive, meaning only one occurs, and exhaustive, meaning none is omitted from the stated model. Their probabilities sum to 1.

Let L denote a one-month loss in currency units (CU). Positive L means money lost; negative L would mean a gain. A distribution lists the possible values and their probabilities. Its cumulative distribution function, or CDF, is F(x) = P(L ≤ x): the probability of loss at or below x. The quantile qᵤ is the lowest threshold reaching cumulative probability u. Value at Risk at level α uses that quantile: VaRα = qα. The linked quantile lesson develops this generalized-inverse convention.

Step 1: choose the upper probability share

Use the illustrative population distribution from the previous lesson: one-month losses 0, 1, 2, 3, 4, 5, 6, 7, 8 and 20 CU, each with probability 0.10. These are the entire assumed possibilities, not ten historical observations. At α = 0.80, cumulative probability first reaches 80% at 7 CU, so VaR80 = 7 CU.

The upper share to average is 1 − α = 0.20. Sort losses from largest to smallest while keeping their probabilities. Take probability until this share is full: first 0.10 at 20 CU, then 0.10 at 8 CU. The selected probability is exactly 0.20. VaR marks a threshold; the two selected losses determine severity beyond that threshold in this example.

Step 2: divide the weighted loss by selected probability

The selected weighted-loss total is 0.10 × 20 + 0.10 × 8 = 2.8 CU. This is a contribution to the unconditional mean, not yet the upper-share average. Normalize by the selected probability: ES80 = 2.8 / 0.20 = 14 CU. With two equal weights this also equals (20 + 8) / 2.

The unconditional mean uses every outcome: (0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 20) / 10 = 5.6 CU. Thus mean loss 5.6, VaR80 7 and ES80 14 describe different features of the same one-month distribution. ES averages loss itself within the selected share; it is not a loss added on top of VaR.

If only the largest loss becomes 100 CU, VaR80 stays 7 CU but ES80 becomes (8 + 100) / 2 = 54 CU. This controlled illustration shows why a threshold alone can hide tail severity. It does not establish any real-world probability or expected loss.

Step 3: connect the calculation to the quantile integral

The general definition is ESα = (1 / (1 − α)) ∫α¹ qᵤ du. Here u labels a cumulative probability, qᵤ is its loss quantile, and α is the chosen probability level. The integral means add quantile height multiplied by probability width. For finite distributions it is a sum of rectangles, so no calculus is needed for our examples.

For the ten-case distribution, qᵤ = 8 for 0.80 < u ≤ 0.90 and qᵤ = 20 for 0.90 < u < 1. Each interval has width 0.10, so the integral is 8 × 0.10 + 20 × 0.10 = 2.8 CU. A single endpoint has zero width and cannot change the integral. Divide by 0.20 to recover 14 CU.

We assume finite expected absolute loss, written E[|L|] < ∞: average the magnitudes of losses using their probabilities and require a finite result. The finite examples meet this automatically. A general distribution with a sufficiently heavy upper tail may instead have infinite ES. A finite historical estimate alone cannot establish a finite population tail mean.

Step 4: fill a tied boundary with only the probability needed

Now assume an illustrative one-month population with loss 0 CU at probability 0.90 and loss 10 CU at probability 0.10. Its CDF reaches 90% at zero, so VaR80 = 0 CU. Losses strictly above zero have only 10% probability, while ES80 needs 20%.

Take all 0.10 probability at 10 CU and another 0.10 from the probability at 0 CU. That is one ninth of the 0.90 mass at zero; it is a mathematical allocation of tied probability, not a prediction that a particular zero-loss outcome will occur. ES80 = (0.10 × 10 + 0.10 × 0) / 0.20 = 5 CU. The conditional mean given L > VaR80 averages only the strictly larger losses, yielding 10 CU. It is not ES80.

The quantile integral gives the same answer: qᵤ = 0 for 0.80 < u ≤ 0.90 and qᵤ = 10 for 0.90 < u < 1. Its weighted total is 0 × 0.10 + 10 × 0.10 = 1 CU; 1 / 0.20 = 5 CU. When the chosen boundary has probability, the integral automatically includes the needed fraction.

A boundary can also split an individual case probability without repeated loss values. At α = 0.85 in the original ten-case distribution, the upper share is 0.15: take all 0.10 at 20 and only 0.05 of the 0.10 at 8. ES85 = (0.10 × 20 + 0.05 × 8) / 0.15 = 16 CU. For any finite distribution, work down from the largest loss, taking each probability in full until the next would overfill 1 − α. Take only the remaining probability at that boundary loss. Multiply each selected probability by its loss, sum, and divide by 1 − α. If several cases share that loss, their allocation among themselves does not change ES.

Step 5: distinguish a declared distribution from an estimate

These calculations are exact for assumed population distributions. If the ten numbers were observations, assigning each weight 1/10 would define an empirical distribution, a sample-based approximation. ES for that distribution is a statistic, not knowledge of the unknown population ES. At 80%, only two observations determine its upper-share average; fewer than two new extreme observations could materially change it.

For a report, check exposure, units, horizon, loss sign, α, probability assumptions and treatment of sample quantiles and boundary weights. Different sample interpolation rules need not produce the same statistic. At higher levels the selected probability is smaller, often leaving less tail information in a fixed sample. Missing extremes, dependence and changing conditions can undermine estimation; exact arithmetic does not resolve those problems.

Check your understanding

Illustrative assessment: one-month losses are 0 CU with probability 0.70, 4 CU with probability 0.20 and 20 CU with probability 0.10. At α = 0.80, find VaR and ES. How much probability at the boundary belongs in the upper share? Would averaging only strict exceedances work?

Answer: F(0) = 0.70 and F(4) = 0.90, so VaR80 = 4 CU. The upper share needs 0.20 probability. Take 0.10 at 20 and only 0.10 of the 0.20 at 4. ES80 = (0.10 × 20 + 0.10 × 4) / 0.20 = 12 CU. Averaging strict exceedances would give 20 CU and omit half the required probability share. Taking all outcomes at or above 4 would instead average 30%, also the wrong share.

Second check: what is ES90 for the original ten-case distribution? Answer: the upper 10% consists entirely of the 20 CU case, so ES90 = 20 CU, while VaR90 = 8 CU. Neither value establishes a maximum real loss or tells an individual which investment to choose.

General education, not investment advice. All numerical examples are illustrative one-month loss distributions with assumed probabilities, not market observations, forecasts or Quantustik performance claims. Expected shortfall depends on the loss distribution and estimation method; it is not a maximum loss, a capital recommendation or a test of investment suitability.

Where this comes from

Frequently asked questions

Can the worst share contain part of a case probability?

Yes. A probability mass can cross the selected boundary. Include only enough of that mass to complete 1 − α; identical losses make the weighted total independent of which tied cases receive that allocation.

Does a higher confidence level make losses safer?

No. Changing α changes the upper share being summarized, not the underlying exposure or loss distribution. Keep the level visible when comparing reports.

Can I use these figures as a portfolio loss estimate?

No. The probabilities and losses are illustrative assumptions. A real estimate requires justified data or a model, a stated method and an assessment of tail uncertainty.

Related glossary terms

Continue this course

Investor education only — not investment advice, and never a promise of profit. Every investment can lose value.