INFINITE UPSIDE

Count the whole tail, including the boundary

How do I calculate value at risk and expected shortfall?

A loss cutoff can stay unchanged while the tail gets much worse. Follow the probability mass before you trust the summary.

Value at risk gives you a loss cutoff. Expected shortfall averages the worst specified share of a loss distribution. When several outcomes sit exactly at the cutoff, include only enough of that tied probability to fill the tail. Averaging every loss at or above the cutoff can answer a different question.

That small distinction changes the result substantially in the worked example below: the 95% value at risk is $200, while the 95% expected shortfall is $2,520. Neither figure says the most you could lose is two hundred dollars.

Put the conventions on the page

Start with a defined loss variable. Here, a positive number means a dollar loss in portfolio value over one fixed horizon. Zero means no loss. All fees are already included in the supplied valuation losses, and there are no contributions, withdrawals or tax adjustments to reconcile.

Use a 95% confidence level and therefore a 5% upper-loss tail. Define value at risk, or VaR, as the smallest loss whose cumulative probability reaches at least 95%. Expected shortfall, or ES, is the probability-weighted average within the worst 5% of losses, including the necessary fraction of any boundary mass.

The Basel Committee's January 2019 market-risk overview distinguishes a VaR cutoff from the severity of tail losses summarized by expected shortfall. For the precise treatment when a distribution has probability concentrated at a value, Carlo Acerbi and Dirk Tasche's mathematical treatment of expected shortfall includes the boundary adjustment.

The paper uses a profit variable and a lower-tail probability convention. This guide translates that idea into positive losses and an upper tail: 95% confidence leaves 5% for the tail. Do not put 95% into a formula expecting the 5% tail probability.

An original complete loss model

Imagine the following deliberately simple fictional distribution. These probabilities are stipulated inputs, not estimates from observed trading days or claims about an actual investment. The four possibilities exhaust the model.

All amounts are positive dollar valuation losses over the same horizon. The ticket column is an equivalent representation of probability, not a historical data set.

LossProbabilityCumulative probabilityTickets out of 100
$094%94%94
$2004%98%4
$2,0001%99%1
$10,0001%100%1

The probabilities sum to 100%. To make the arithmetic visible, picture a box of one hundred equally likely model tickets. Ninety-four say zero, four say two hundred dollars, one says two thousand, and one says ten thousand.

Those tickets make a discrete distribution easy to sort. They do not create one hundred independent observations, establish how likely the inputs are in the real world or tell you which outcome will happen next.

Find the VaR cutoff

At a zero-dollar loss, cumulative probability is only 94%, below the chosen 95% confidence level. Move to the next loss, two hundred dollars, and cumulative probability reaches 98%. That is the first value reaching at least 95%, so VaR95 is $200.

The actual probability of a loss strictly greater than two hundred dollars is 1% + 1% = 2%. It is not exactly 5%. A point mass at the cutoff lets cumulative probability jump from 94% to 98% without passing through every intermediate percentage.

This is why the convention belongs next to the result. An interpolated sample-percentile function can produce a different numerical answer from the lower quantile of a stipulated probability distribution. The percentile turnaround-time guide explores sample conventions; here, the cumulative-probability definition is explicit.

Fill exactly five percent of the tail

For ES95, take the worst five model tickets. The ten-thousand-dollar ticket and the two-thousand-dollar ticket fill two places. Fill the remaining three with three of the four two-hundred-dollar tickets.

The total of those five ticket losses is $10,000 + $2,000 + 3 × $200 = $12,600. Divide by five to obtain $2,520 expected shortfall.

Using probabilities rather than tickets produces the same calculation: (0.01 × $10,000 + 0.01 × $2,000 + 0.03 × $200) ÷ 0.05 = $2,520. The last term uses three percentage points of probability from the four percentage points sitting at two hundred dollars.

No particular two-hundred-dollar outcome is economically different from another in this model. Selecting only part of that tied mass is a weighting operation. It does not require predicting which otherwise identical ticket will be drawn.

The 95th-percentile cutoff sits within a block of tied losses. Expected shortfall completes the specified tail by taking the required share of that block, rather than letting the size of the tie change the tail being averaged.

Two plausible averages that answer different questions

If you average only losses strictly greater than $200, you take two tickets: $10,000 and $2,000. Their average is $6,000. That is the conditional mean given a loss greater than two hundred dollars, covering 2% of model probability.

If you average all losses at least $200, you take six tickets: those two large losses and all four two-hundred-dollar losses. Their total is $12,800, giving $2,133.33 when divided by six. That covers 6% of model probability.

Both conditional averages are legitimate calculations when clearly labeled. Neither is the average of the worst 5% here. Writing “average beyond VaR” without explaining ties leaves a choice between two wrong tail sizes for the intended ES calculation.

A useful worksheet therefore records four things separately: probability strictly above the cutoff, probability at the cutoff, probability needed from the cutoff, and the total tail probability. Here those are 2%, 4%, 3% and 5%.

Check the answer another way

An independent check starts at the two-hundred-dollar cutoff and measures only the excess above it. The two-thousand-dollar loss exceeds the cutoff by $1,800; the ten-thousand-dollar loss exceeds it by $9,800.

The probability-weighted excess is 0.01 × $1,800 + 0.01 × $9,800 = $116. Divide that by the 5% tail probability and add the cutoff: $200 + $116 ÷ 0.05 = $2,520.

This is the cutoff-plus-excess representation evaluated at a valid quantile. It confirms the tail-allocation calculation without repeating the same ticket sum. It also shows why subtracting the cutoff from large losses and then forgetting to add it back would understate ES.

Keep the full precision of probabilities and dollar amounts until the final presentation. Round a displayed result, not the probability mass needed to fill the tail. A small rounded probability can carry a large loss contribution.

Change confidence without changing the distribution

At 97.5% confidence, the cutoff remains two hundred dollars because its cumulative probability is 98%. But the tail is now only 2.5%. Include the two largest tickets plus half of one two-hundred-dollar ticket.

The probability-weighted tail loss becomes $100 + $20 + $1 = $121. Dividing by 0.025 gives $4,840 ES97.5. A fractional ticket is simply a convenient way to show half a percentage point of probability.

At 99% confidence, the cutoff becomes $2,000 because cumulative probability first reaches 99% there. The worst 1% consists entirely of the ten-thousand-dollar loss, so ES99 is $10,000.

These are different summaries of the same distribution. A confidence change is not evidence that the underlying investment became safer or riskier. Label the confidence level every time you compare two reported figures.

Keep the mean and the maximum separate

The whole-distribution expected loss is 0.04 × $200 + 0.01 × $2,000 + 0.01 × $10,000 = $128. It averages all possible outcomes under the supplied model, including the large probability of zero.

That is different from the $2,520 average within the worst 5%. Neither should be described simply as “the expected loss” without saying which population is being averaged.

The model's largest possible loss is $10,000. That is another distinct number. It is a maximum inside this invented distribution, not proof that a real portfolio cannot lose more. Omitted outcomes remain omitted even when the arithmetic is perfect.

The cutoff can stay still while the tail worsens

For a separate sensitivity, replace only the ten-thousand-dollar outcome with a $50,000 loss, keeping its probability at 1% and every other input unchanged. VaR95 remains $200: the cumulative probability at that cutoff is still 98%.

ES95 becomes ($50,000 + $2,000 + 3 × $200) ÷ 5 = $10,520. The whole-distribution mean rises to $528. A stable VaR cutoff has concealed a substantial increase in the stipulated tail's severity.

That sensitivity does not forecast a fifty-thousand-dollar loss. It tests what a chosen summary reveals when one assumption changes. Keep the original and altered distributions side by side rather than replacing the unfavorable version without a record.

A record you can reproduce

  1. Define the exposure: valuation loss or another clearly specified variable, currency, horizon, fees and treatment of external cash flows.
  2. Preserve the model: every outcome and probability, their source or explicit fictional status, and the probability-sum check.
  3. Name the convention: positive loss, chosen confidence and its complementary tail probability.
  4. Find the cutoff: sort losses and retain cumulative probabilities, including jumps at tied values.
  5. Allocate the tail: full mass above the cutoff plus exactly the boundary mass needed; divide by the intended tail probability.
  6. Challenge the interpretation: compare the mean, cutoff, tail average and modeled maximum, then test a materially worse tail assumption.

Before turning the result into a decision, ask what supports the probabilities and which plausible losses are absent. This example supplies a distribution; it does not estimate one. It assumes no normal curve, annualization rule or independence across horizons.

Valuation loss is also not automatically a cash bill due tomorrow. A liquidity plan needs actual payment obligations and usable cash. Neither VaR nor ES alone establishes the right reserve, investment position or acceptable exposure for a particular reader.

For a historical path question, the drawdown guide follows peaks and troughs through time. The distribution here has no chronological ordering. For dispersion across assets, the portfolio-volatility guide handles a different set of inputs.

Explore Infinite Upside

For Vijay Sheth’s personal accounts, read Infinite Upside: Building Wealth With Room to Live, published by Sheth Capital, Inc.

Find your edition · Chapter companion

Choose an edition

Choose an edition

ABOUT THE CONTRIBUTOR

Luna Lim

DIRECTOR OF FINANCIAL RESEARCH & EDITORIAL STRATEGY

SHETH CAPITAL, INC.

Luna Lim writes about business, investing, and the judgment behind financial decisions. She joined PCH Exotics Inc. as Director of Operations in 2022, working across La Jolla and Miami. Today, she reports directly to Vijay Sheth at Sheth Capital, Inc., bringing an operator’s perspective to the ideas she covers.

Based in Pacific Beach, California, Luna is curious about the people behind the numbers: what they’re building, how they weigh uncertainty, and what makes a risk worth taking. Her articles for Infinite Upside follow those questions through the details, with clear explanations and a feel for how decisions play out in everyday business.

More from Luna Lim

The Infinite Upside store