Unit 11, lesson 82

Value at risk and quantile estimation

Defines value at risk as a lower quantile of the loss distribution, the empirical quantile convention behind historical VaR, an exact failure of subadditivity and the sampling uncertainty of quantile estimates.

  • Video 82
  • Attribution and tail risk measures

A position loses 100 currency units in 4 percent of states and nothing in the others. Its 95 percent value at risk is 0, yet a loss of 100 is entirely possible. Value at risk marks where a chosen probability level is first reached in the loss distribution and says nothing about the size of the losses beyond that point. This lesson defines VaR with a quantile convention that handles atoms, computes historical VaR from a sorted sample, states how uncertain a sample quantile is, and builds an exact example in which the VaR of a sum exceeds the sum of the VaRs.

Key terms

Loss distribution

Definition Fix a portfolio, a horizon hh in years, a reporting currency and a probability measure, usually the physical measure P\mathbb{P} or a stated scenario distribution. If XX is the profit and loss of the period in currency units, a mark change plus any included cash flows as in Profit and loss attribution and sensitivities, the loss is L=−XL = -X. With this sign change a larger positive LL is worse and a negative LL is a gain. The loss distribution is the law of LL under the stated measure, described by its distribution function

FL(ℓ)=P(L≤ℓ)F_L(\ell) = \mathbb{P}(L \le \ell)

for real ℓ\ell, which is nondecreasing and right-continuous, with limit 00 at −∞-\infty and limit 11 at +∞+\infty. An atom is a value ℓ\ell with P(L=ℓ)>0\mathbb{P}(L = \ell) > 0, where FLF_L jumps by that probability. Losses from discrete events such as defaults, from scenario sets and from empirical samples have atoms, so a definition that works only for continuous distributions is not enough.

In plain words The loss distribution says how much the portfolio might lose over the horizon and how likely each amount is. Every number computed from it inherits the choices of horizon, currency, positions, cash flows and probability measure.

Example A constructed exposure loses 100100 currency units with probability 0.040.04 and 00 otherwise. Its distribution function is 00 below 00, equal to 0.960.96 on [0,100)[0, 100) and equal to 11 from 100100 on, with atoms at 00 and at 100100. Stored as profit and loss, the same exposure has X=−100X = -100 with probability 0.040.04, and the sign change L=−XL = -X has to be applied before any quantile is taken.

Value at risk

Definition For a confidence level α∈(0,1)\alpha \in (0, 1), the value at risk of the loss LL is the lower α\alpha quantile of its distribution,

VaR⁡α(L)=inf⁡{ℓ:FL(ℓ)≥α}.\begin{aligned} &\operatorname{VaR}_{\alpha}(L) \\[0.4em] &\quad = \inf\{\ell : F_L(\ell) \ge \alpha\} . \end{aligned}

The set is nonempty and bounded below because FLF_L tends to 11 at +∞+\infty and to 00 at −∞-\infty while 0<α<10 < \alpha < 1, so the infimum is finite, and right-continuity makes it attained, FL(VaR⁡α)≥αF_L(\operatorname{VaR}_{\alpha}) \ge \alpha. Hence

P(L>VaR⁡α)≤1−α,P(L<VaR⁡α)≤α,\begin{gathered} \mathbb{P}(L > \operatorname{VaR}_{\alpha}) \le 1 - \alpha, \\[0.4em] \mathbb{P}(L < \operatorname{VaR}_{\alpha}) \le \alpha, \end{gathered}

and VaR⁡α(L)≤ℓ\operatorname{VaR}_{\alpha}(L) \le \ell holds exactly when FL(ℓ)≥αF_L(\ell) \ge \alpha. When FLF_L is continuous and strictly increasing, VaR is the unique solution of FL(ℓ)=αF_L(\ell) = \alpha. VaR is an amount in currency units, reported with its horizon, currency, portfolio, loss definition, measure and level. It is neither the largest possible loss nor an average of tail losses, and at an atom it can jump when the probabilities change slightly. If the profit and loss X=−LX = -L is stored instead, then VaR⁡α(L)=−q1−α+(X)\operatorname{VaR}_{\alpha}(L) = -q^{+}_{1-\alpha}(X) with the upper quantile qβ+(X)=inf⁡{x:FX(x)>β}q^{+}_{\beta}(X) = \inf\{x : F_X(x) > \beta\}, and the lower quantile of XX gives a different answer wherever FXF_X is flat at level 1−α1 - \alpha.

In plain words VaR is the smallest loss level ℓ\ell such that the probability of losing at most ℓ\ell is at least α\alpha. It tells where the worst 1−α1 - \alpha of probability begins, not how large the losses in that tail are.

Example For the constructed exposure, FL(0)=0.96≥0.95F_L(0) = 0.96 \ge 0.95 while FL(ℓ)=0F_L(\ell) = 0 for ℓ<0\ell < 0, so VaR⁡0.95(L)=0\operatorname{VaR}_{0.95}(L) = 0 although a loss of 100100 has probability 0.040.04. At α=0.97\alpha = 0.97 the level is first reached at 100100, so VaR⁡0.97(L)=100\operatorname{VaR}_{0.97}(L) = 100. If the loss probability rises from 0.040.04 to 0.0510.051, then FL(0)=0.949<0.95F_L(0) = 0.949 < 0.95 and the 9595 percent VaR jumps from 00 to 100100. The jump follows from the atom and the cutoff, not from a numerical error.

Empirical quantile convention

Definition For losses L1,…,LnL_1, \dots, L_n with equal weights 1/n1/n, the empirical distribution function is

F^n(ℓ)=1n∑i=1n1{Li≤ℓ}.\widehat F_n(\ell) = \frac{1}{n}\sum_{i=1}^{n} \mathbf{1}_{\{L_i \le \ell\}} .

Write L(1)≤⋯≤L(n)L_{(1)} \le \dots \le L_{(n)} for the sorted sample. The lower inverse of F^n\widehat F_n at level α\alpha is the order statistic

q^α=L(k),k=⌈nα⌉.\widehat q_{\alpha} = L_{(k)}, \quad k = \lceil n\alpha \rceil .

Indeed F^n(L(k))≥k/n≥α\widehat F_n(L_{(k)}) \ge k/n \ge \alpha. Any ℓ<L(k)\ell < L_{(k)} lies below the n−k+1n - k + 1 observations L(k),…,L(n)L_{(k)}, \dots, L_{(n)}, so F^n(ℓ)≤(k−1)/n<α\widehat F_n(\ell) \le (k - 1)/n < \alpha, because kk is the smallest integer with k≥nαk \ge n\alpha. Ties do not affect the argument. This is the lower inverse convention applied to the empirical law, and the losses strictly above q^α\widehat q_{\alpha} carry empirical probability at most 1−α1 - \alpha. Interpolating between neighboring order statistics defines a different estimator, and numerical libraries differ in their default rules, so two reported VaRs can be compared only after their conventions are matched.

In plain words Sort the losses from smallest to largest and count up to the first position whose share of the sample reaches α\alpha. The loss at that position is the empirical quantile. Changing the level means changing the rank.

Example For n=20n = 20 and α=0.95\alpha = 0.95 the rank is ⌈19⌉=19\lceil 19 \rceil = 19, for n=21n = 21 it is ⌈19.95⌉=20\lceil 19.95 \rceil = 20, and for n=20n = 20 and α=0.9\alpha = 0.9 it is 1818. A common linear interpolation rule places the α\alpha quantile at position 1+(n−1)α1 + (n - 1)\alpha in the sorted sample and interpolates between the neighboring values. For the twenty losses of the next card this position is 19.0519.05, which gives 25+0.05⋅(40−25)=25.7525 + 0.05 \cdot (40 - 25) = 25.75, while the lower inverse gives 2525.

Historical VaR

Definition Historical VaR applies the empirical quantile to losses of the current portfolio under past scenarios. Take nn historical changes Δx1,…,Δxn\Delta x_1, \dots, \Delta x_n of the risk factors over windows of the horizon length, apply each to today’s factors xx with today’s positions, and revalue, so that

Li=V(t,x)−V(t+h,x+Δxi).\begin{aligned} L_i &= V(t, x) \\[0.4em] &\quad - V(t + h, x + \Delta x_i) . \end{aligned}

With equal weights, historical VaR at level α\alpha is L(⌈nα⌉)L_{(\lceil n\alpha \rceil)}. Relative or logarithmic changes can replace absolute ones, and that choice is part of the method. The number is exact for the empirical law of the scenarios. Treating it as the VaR of the next period assumes that the scenarios are a relevant sample of next-period changes, which is an assumption about the future and not a consequence of a long history. Overlapping windows make the scenario losses dependent, and changes in holdings or in the volatility regime can make older scenarios describe a different distribution. Reweighting the scenarios or revaluing a changed portfolio changes the empirical law, and the quantile has to be recomputed from it.

In plain words Historical VaR asks how the portfolio held today would have fared in each past period, sorts those outcomes and reads off the chosen rank. It reports where the worst share of the replayed outcomes begins.

Example Take twenty constructed scenario losses in currency units, already sorted,

−4,−2,−1,0,1,2,3,4,5,6,7,8,9,10,12,14,16,19,25,40,\begin{gathered} -4, -2, -1, 0, 1, 2, 3, \\[0.4em] 4, 5, 6, 7, 8, 9, 10, \\[0.4em] 12, 14, 16, 19, 25, 40, \end{gathered}

where the negative values are gains. At α=0.95\alpha = 0.95 the rank is 1919 and historical VaR is 2525. Only the loss 4040 exceeds it, one observation in twenty, exactly 1−α1 - \alpha of the empirical probability. At α=0.9\alpha = 0.9 the rank is 1818 and VaR is 1919. Adding a twenty-first scenario with loss 100100 moves the 9595 percent rank to 2020, so VaR becomes 4040, not 100100. The new worst loss changes the severity of the tail without being the quantile.

Failure of subadditivity

Definition A risk measure ρ\rho is subadditive on a set of losses if

ρ(L1+L2)≤ρ(L1)+ρ(L2)\rho(L_1 + L_2) \le \rho(L_1) + \rho(L_2)

for all L1L_1 and L2L_2 in the set. VaR is monotone, translation equivariant and positively homogeneous, but it is not subadditive on the set of all losses, and the example below gives two independent losses whose sum has a larger VaR than the sum of their VaRs. Subadditivity does hold in scoped cases. A normal loss with mean μ\mu and standard deviation σ\sigma has VaR⁡α=μ+σ Φ−1(α)\operatorname{VaR}_{\alpha} = \mu + \sigma\,\Phi^{-1}(\alpha). If (L1,L2)(L_1, L_2) is jointly normal, the sum is normal too, the means add, σL1+L2≤σL1+σL2\sigma_{L_1 + L_2} \le \sigma_{L_1} + \sigma_{L_2}, and for α≥12\alpha \ge \tfrac12 the factor Φ−1(α)\Phi^{-1}(\alpha) is nonnegative, so VaR is subadditive. A result for one family of distributions is not a theorem about all of them.

In plain words Each exposure alone keeps its rare loss inside the worst 1−α1 - \alpha of probability, which VaR does not look into. Together, the chance that at least one of them loses exceeds 1−α1 - \alpha, so the combined VaR shows a loss that neither separate VaR shows. This does not mean that diversification raises risk. It means that VaR can fail to recognize diversification.

Example Let AA and BB be independent, each losing 100100 with probability 0.040.04 and 00 otherwise, so each has VaR⁡0.95=0\operatorname{VaR}_{0.95} = 0. The sum A+BA + B is 00 with probability 0.962=0.92160.96^2 = 0.9216, 100100 with probability 2⋅0.04⋅0.96=0.07682 \cdot 0.04 \cdot 0.96 = 0.0768 and 200200 with probability 0.042=0.00160.04^2 = 0.0016. Its distribution function is 0.9216<0.950.9216 < 0.95 at 00 and 0.9984≥0.950.9984 \ge 0.95 at 100100, so

VaR⁡0.95(A+B)=100>0+0,\begin{aligned} &\operatorname{VaR}_{0.95}(A + B) \\[0.4em] &\quad = 100 > 0 + 0 , \end{aligned}

the sum of the two separate VaRs.

Quantile estimation uncertainty

Definition Suppose L1,…,LnL_1, \dots, L_n are independent with a common distribution function FF, and FF is differentiable at qα=VaR⁡αq_{\alpha} = \operatorname{VaR}_{\alpha} with derivative f(qα)>0f(q_{\alpha}) > 0, for example when FF has a density that is continuous and positive at qαq_{\alpha}. Then the empirical quantile q^α=L(⌈nα⌉)\widehat q_{\alpha} = L_{(\lceil n\alpha \rceil)} satisfies

n (q^α−qα)⇒N(0,α(1−α)f(qα)2)\begin{aligned} &\sqrt{n}\,(\widehat q_{\alpha} - q_{\alpha}) \\[0.4em] &\quad \Rightarrow \mathcal{N}\Bigl(0, \frac{\alpha(1 - \alpha)}{f(q_{\alpha})^2}\Bigr) \end{aligned}

in distribution as n→∞n \to \infty, a result stated here without proof, which gives the approximate standard error

SE⁡(q^α)≈α(1−α)/nf(qα).\begin{aligned} &\operatorname{SE}(\widehat q_{\alpha}) \\[0.4em] &\quad \approx \frac{\sqrt{\alpha(1 - \alpha)/n}}{f(q_{\alpha})} . \end{aligned}

The reason shows in the empirical distribution function. At the fixed point qαq_{\alpha}, the value F^n(qα)\widehat F_n(q_{\alpha}) is an average of independent indicators with mean α\alpha and variance α(1−α)/n\alpha(1 - \alpha)/n, and near qαq_{\alpha} a probability error δ\delta moves the quantile by about δ/f(qα)\delta/f(q_{\alpha}). A thin tail, where f(qα)f(q_{\alpha}) is small, turns a small probability error into a large threshold error. The statement is asymptotic and holds for this sampling law. It is not an exact interval for a given dataset, and atoms at the quantile, dependence such as overlapping windows, changing volatility and sparse tails need other methods.

In plain words A sample quantile is itself random. Its scatter shrinks like 1/n1/\sqrt{n} and grows where the density is thin, which is where a high-level VaR lies, and a short sample has only a handful of observations near a 99 percent quantile.

Example For constructed losses that are independent and normal with mean 00 and standard deviation 1010, the 9999 percent quantile is 10 Φ−1(0.99)≈23.2610\,\Phi^{-1}(0.99) \approx 23.26 and the density there is φ(2.3263)/10≈0.002665\varphi(2.3263)/10 \approx 0.002665. With n=250n = 250 the selected rank is 248248, only 22 observations lie above it, and the approximate standard error is

0.99⋅0.01/2500.002665≈2.36,\frac{\sqrt{0.99 \cdot 0.01/250}}{0.002665} \approx 2.36 ,

about a tenth of the quantile. A simulation of 100000100000 such samples gave a standard deviation of about 2.332.33 for the estimator, close to the approximation. At 9595 percent the same sample size gives an approximate standard error of about 1.341.34 around the quantile 16.4516.45.

Check yourself

  1. For the twenty constructed losses, find historical VaR at 8080 percent and at 9999 percent and the number of observations strictly above each. What does the 9999 percent figure say about losses beyond the sample?
Show the answer

At 8080 percent the rank is ⌈16⌉=16\lceil 16 \rceil = 16, so VaR is 1414, and the four losses 1616, 1919, 2525 and 4040 lie above it, exactly 2020 percent of the sample. At 9999 percent the rank is ⌈19.8⌉=20\lceil 19.8 \rceil = 20, so VaR is 4040, the largest observation, and nothing lies above it. With twenty observations every level above 0.950.95 selects the sample maximum, so the estimate cannot exceed 4040, and the sample carries no information about how far beyond 4040 losses can go.

  1. A system stores the same twenty outcomes as profit and loss, gains positive, so the sorted values begin −40-40, −25-25, −19-19. An analyst takes the lower empirical 55 percent quantile of the profit and loss and changes its sign to report the 9595 percent VaR. What does that give, why does it differ from the VaR of the losses, and what is the correct conversion?
Show the answer

The lower 55 percent quantile of the profit and loss has rank ⌈20⋅0.05⌉=1\lceil 20 \cdot 0.05 \rceil = 1, so it is −40-40, and the analyst reports 4040. The 9595 percent VaR of the losses L=−XL = -X has rank 1919 and is 2525. The empirical distribution function of XX equals 0.050.05 from −40-40 up to, but not including, −25-25, so the lower inverse picks the left end, while the sign change needs the upper quantile,

VaR⁡0.95(L)=−q0.05+(X)=−X(⌊20⋅0.05⌋+1)=−X(2)=25.\begin{aligned} &\operatorname{VaR}_{0.95}(L) = -q^{+}_{0.05}(X) \\[0.4em] &\quad = -X_{(\lfloor 20 \cdot 0.05 \rfloor + 1)} \\[0.4em] &\quad = -X_{(2)} = 25 . \end{aligned}

The safe route is to form the losses first and then take their lower quantile. With 2121 observations the product 21⋅0.05=1.0521 \cdot 0.05 = 1.05 is not an integer, the two routes agree, and both give 4040.

  1. Two independent exposures each lose 100100 with probability 0.020.02 and 00 otherwise. Find the VaR of each and of their sum at 9595 and at 9797 percent. A colleague says that VaR is subadditive for independent exposures and cites the normal argument. What does that argument need?
Show the answer

Each exposure has F(0)=0.98F(0) = 0.98, which is at least 0.950.95 and at least 0.970.97, so each VaR is 00 at both levels. The sum is 00 with probability 0.982=0.96040.98^2 = 0.9604, 100100 with probability 2⋅0.02⋅0.98=0.03922 \cdot 0.02 \cdot 0.98 = 0.0392 and 200200 with probability 0.00040.0004. At 9595 percent, F(0)=0.9604≥0.95F(0) = 0.9604 \ge 0.95, so the VaR of the sum is 00 and the inequality holds. At 9797 percent, F(0)=0.9604<0.97F(0) = 0.9604 < 0.97 and F(100)=0.9996≥0.97F(100) = 0.9996 \ge 0.97, so the VaR of the sum is 100100, larger than 0+00 + 0. The normal argument needs the losses to be jointly normal, so that every VaR has the form μ+σ Φ−1(α)\mu + \sigma\,\Phi^{-1}(\alpha), and it needs α≥12\alpha \ge \tfrac12. These losses are not normal, and independence alone does not give subadditivity. Whether it holds depends on the distribution and on the level.

How this lesson connects