By the end of this chapter, the student should be able to:
For our purposes, measuring a risk means summarising the distribution of a risk variable using a number known as a risk measure. A risk variable may represent the profit or loss of a firm, a bank, a trading book, an insurance portfolio, a foreign exchange position, or an investment portfolio.
At the simplest level, one may calculate the mean or variance of a risk. The mean gives the average outcome. The variance and standard deviation describe the spread of outcomes around the mean. These measures are useful, but they do not provide enough information about extreme risk.
Extreme financial risk measurement is mainly concerned with the tail of the loss distribution. In this chapter we adopt the convention that a loss is a positive number and a profit is a negative number. This convention is useful because Extreme Value Theory is naturally developed as a theory of large losses rather than a theory of small profits.
Let \(L\) be a loss random variable with distribution function
\[ F_L(x)=P(L\leq x). \]
A large value of \(L\) represents a severe loss. The right tail probability is
\[ P(L>x)=1-F_L(x). \]
This probability tells us how likely it is for the loss to exceed the level \(x\). Tail-based risk measures are built from this idea. The two main measures studied here are Value-at-Risk and Expected Shortfall.
Value-at-Risk, usually abbreviated as VaR, is one of the most widely used measures of market risk. VaR is a high quantile of the loss distribution, commonly the 95th or 99th percentile. It provides a loss level that is exceeded only with a small probability.
For a loss variable \(L\), the VaR at confidence level \(q\) is
\[ VaR_q=F_L^{-1}(q), \qquad 0<q<1. \]
If \(q=0.95\), the VaR is the 95th percentile of the loss distribution. If \(q=0.99\), it is the 99th percentile.
A one-day 95% VaR of KSh 30 million means that, under the model being used, there is a 95% probability that the one-day loss will not exceed KSh 30 million. Equivalently, there is a 5% probability that the one-day loss will exceed KSh 30 million.
VaR always has three important components:
For example, suppose a dealer with a KSh 20 million position estimates a one-day VaR of KSh 500,000 at the 99% confidence level. This means that the dealer expects to lose more than KSh 500,000 on about 1% of trading days. If there are 250 trading days in a year, this corresponds to about 2.5 days per year.
VaR is attractive because it summarizes risk in a single number that is easy to communicate to management, regulators, and non-technical decision-makers. However, VaR should not be interpreted as the maximum possible loss. Losses worse than VaR can still occur.
set.seed(2426)
returns <- rt(1000, df = 5) / 100
losses <- -returns
var_table <- tibble(
Confidence_Level = c("95%", "99%"),
VaR = c(
as.numeric(quantile(losses, 0.95)),
as.numeric(quantile(losses, 0.99))
)
)
var_table
The empirical VaR is obtained by ordering the losses and reading off the appropriate quantile. The 99% VaR is larger than the 95% VaR because it is located further into the right tail of the loss distribution.
VaR has been criticised on two main grounds. First, VaR is not necessarily sub-additive. This means that the VaR of a combined portfolio may be greater than the sum of the VaRs of its components in some cases. If this happens, VaR fails to reward diversification consistently.
Second, VaR tells us nothing about the size of the loss beyond the VaR threshold. It tells us where the tail begins, but not how severe the tail losses are once that threshold is exceeded.
Expected Shortfall, also called Tail Conditional Expectation, is proposed as an alternative or complement to VaR. It is defined as the expected size of a loss given that the VaR level has been exceeded:
\[ ES_q=E[L\mid L>VaR_q]. \]
Expected Shortfall therefore answers a different question from VaR. VaR asks: What loss level is exceeded with small probability? Expected Shortfall asks: If that level is exceeded, what is the expected loss?
VaR_95 <- quantile(losses, 0.95)
VaR_99 <- quantile(losses, 0.99)
es_table <- tibble(
Confidence_Level = c("95%", "99%"),
VaR = c(as.numeric(VaR_95), as.numeric(VaR_99)),
Expected_Shortfall = c(
mean(losses[losses > VaR_95]),
mean(losses[losses > VaR_99])
)
)
es_table
Expected Shortfall is usually larger than VaR because it averages the losses that lie beyond the VaR threshold. This makes it more informative for extreme risk analysis.
A coherent risk measure is a risk measure that satisfies a set of mathematical properties considered desirable for rational risk measurement. Let \(V\) be a set of real-valued random variables defined on a probability space, and let
\[ \rho:V\to\mathbb{R} \]
be a function that assigns a risk value to each random variable. The function \(\rho\) is called a coherent risk measure if it satisfies four axioms: monotonicity, sub-additivity, positive homogeneity, and translation invariance.
Monotonicity means that if one position is always more risky than another, then its risk measure should be larger. If \(X\geq Y\), then
\[ \rho(X)\geq \rho(Y). \]
The intuition is direct. If one portfolio always produces worse losses than another, it should not be assigned a smaller risk value.
Sub-additivity means that combining two positions should not create more risk than the sum of their separate risks:
\[ \rho(X+Y)\leq \rho(X)+\rho(Y). \]
This property is especially important because it formalizes the idea that diversification should not increase measured risk. In banking supervision, for example, if a bank is made up of several branches, sub-additivity supports the idea that the capital requirement of the whole bank should not exceed the sum of capital requirements calculated separately for each branch.
Positive homogeneity means that scaling a portfolio by a positive constant scales the risk by the same constant. For \(\lambda\geq0\),
\[ \rho(\lambda X)=\lambda\rho(X). \]
If the size of a position doubles, then the measured risk should also double, provided everything else remains unchanged.
Translation invariance means that adding a risk-free amount of cash reduces risk by the same amount. If \(c\in\mathbb{R}\), then
\[ \rho(X+c)=\rho(X)-c. \]
This property ensures that the risk measure and the profit/loss variable are expressed in the same numeraire, such as shillings, dollars, or euros.
Expected Shortfall is coherent under standard conditions. VaR, however, is not necessarily coherent because it can violate sub-additivity.
There are three commonly used methods of calculating VaR: the historical method, the variance-covariance method, and Monte Carlo simulation.
The historical method reorganizes actual historical returns from worst to best and assumes that history is informative about future risk. If the worst 5% of historical daily returns begin at a loss of 4%, then the 95% historical VaR is approximately 4%. This method is simple and does not require normality, but it depends heavily on the historical sample.
The variance-covariance method assumes that returns are normally distributed. Under this method, the risk manager estimates the expected return and standard deviation, then uses normal quantiles to estimate VaR. If losses are approximately normal with mean \(\mu_L\) and standard deviation \(\sigma_L\), then
\[ VaR_q=\mu_L+z_q\sigma_L, \]
where \(z_q\) is the \(q\)-quantile of the standard normal distribution. For common confidence levels,
\[ z_{0.95}\approx1.65, \qquad z_{0.99}\approx2.33. \]
The Monte Carlo method involves specifying a model for returns or losses, randomly generating many possible future outcomes from that model, and estimating VaR from the simulated loss distribution. This approach is flexible, but it depends on the quality of the assumed model.
set.seed(2426)
returns <- rt(1500, df = 5) / 100
losses <- -returns
position_value <- 10000000
# Historical VaR
historical_var_95 <- as.numeric(quantile(losses, 0.95)) * position_value
historical_var_99 <- as.numeric(quantile(losses, 0.99)) * position_value
# Variance-covariance VaR using normality
mu_loss <- mean(losses)
sigma_loss <- sd(losses)
vcov_var_95 <- (mu_loss + qnorm(0.95) * sigma_loss) * position_value
vcov_var_99 <- (mu_loss + qnorm(0.99) * sigma_loss) * position_value
# Monte Carlo VaR using a fitted normal model for illustration
simulated_losses <- rnorm(10000, mean = mu_loss, sd = sigma_loss)
mc_var_95 <- as.numeric(quantile(simulated_losses, 0.95)) * position_value
mc_var_99 <- as.numeric(quantile(simulated_losses, 0.99)) * position_value
var_methods_table <- tibble(
Method = c("Historical", "Historical", "Variance-Covariance", "Variance-Covariance", "Monte Carlo", "Monte Carlo"),
Confidence_Level = c("95%", "99%", "95%", "99%", "95%", "99%"),
VaR_KSh = c(historical_var_95, historical_var_99, vcov_var_95, vcov_var_99, mc_var_95, mc_var_99)
)
var_methods_table
The three methods need not give identical answers. The historical method reflects the empirical sample directly. The variance-covariance method depends strongly on the normality assumption. The Monte Carlo method depends on the assumed simulation model.
VaR can be explained using either discrete or continuous distributions. Suppose a firm has the following distribution for the change in value of a portfolio over one week.
discrete_distribution <- tibble(
Change_in_Value = c(
"Loss of at least KSh 1,000,000",
"Loss between KSh 500,000 and KSh 999,999",
"Loss between KSh 250,000 and KSh 499,999",
"Loss between KSh 0 and KSh 249,999",
"Gain between KSh 1 and KSh 249,999",
"Gain between KSh 250,000 and KSh 499,999",
"Gain between KSh 500,000 and KSh 999,999",
"Gain of at least KSh 1,000,000"
),
Probability = c(0.01, 0.04, 0.15, 0.30, 0.30, 0.15, 0.04, 0.01)
)
discrete_distribution
From this distribution, the 1% VaR is KSh 1,000,000. The firm expects to lose at least KSh 1 million one percent of the time. The 5% VaR is KSh 500,000 because there is a 1% probability of losing at least KSh 1 million and a 4% probability of losing between KSh 500,000 and KSh 999,999.
For a continuous normal model, suppose the expected change in portfolio value is KSh 1,000,000 and the standard deviation is KSh 1,500,000. Then
\[ VaR(1\%)=E(\Delta V)-2.33\sigma(\Delta V), \]
and
\[ VaR(5\%)=E(\Delta V)-1.65\sigma(\Delta V). \]
These formulas are written in terms of changes in value, where negative values represent losses. The values 2.33 and 1.65 correspond approximately to the number of standard deviations leaving 1% and 5% in the left tail of a normal distribution.
expected_change <- 1000000
sd_change <- 1500000
VaR_1_percent_change <- expected_change - 2.33 * sd_change
VaR_5_percent_change <- expected_change - 1.65 * sd_change
tibble(
Tail_Probability = c("1%", "5%"),
Change_in_Value_Quantile = c(VaR_1_percent_change, VaR_5_percent_change),
Loss_Interpretation = -c(VaR_1_percent_change, VaR_5_percent_change)
)
The negative change values indicate losses. The firm could expect to lose at least KSh 2,495,000 one percent of the time and at least KSh 1,475,000 five percent of the time, under the normal model assumptions.
Risk managers often need to calculate VaR for a portfolio containing more than one asset. If two portfolio components have VaRs \(VaR_1\) and \(VaR_2\), and their correlation is \(\rho\), then a simple two-asset variance-covariance portfolio VaR is
\[ VaR_p=\sqrt{VaR_1^2+VaR_2^2+2\rho VaR_1VaR_2}. \]
This formula shows that the total portfolio VaR depends not only on the individual risks but also on the correlation between them. If the correlation is less than one, the combined risk may be less than the sum of the separate risks. This reduction is called diversification benefit.
VaR_stock <- 1641161
VaR_bond <- 5525229
rho <- 0.3
portfolio_VaR <- sqrt(VaR_stock^2 + VaR_bond^2 + 2 * rho * VaR_stock * VaR_bond)
diversification_benefit <- VaR_stock + VaR_bond - portfolio_VaR
tibble(
Stock_VaR = VaR_stock,
Bond_VaR = VaR_bond,
Correlation = rho,
Portfolio_VaR = portfolio_VaR,
Diversification_Benefit = diversification_benefit
)
The diversification benefit is positive when the combined VaR is less than the sum of the individual VaRs. This happens because the two assets do not move perfectly together. If correlation were equal to one, the diversification benefit would disappear.
This application brings together the main ideas of the chapter. We simulate two asset return series, compute losses, estimate VaR and Expected Shortfall, and then calculate a simple portfolio VaR.
set.seed(2026)
n <- 2000
asset_1_returns <- rt(n, df = 5) / 100
asset_2_returns <- 0.0002 + rt(n, df = 6) / 120
weights <- c(0.6, 0.4)
portfolio_returns <- weights[1] * asset_1_returns + weights[2] * asset_2_returns
portfolio_losses <- -portfolio_returns
portfolio_VaR_95 <- as.numeric(quantile(portfolio_losses, 0.95))
portfolio_VaR_99 <- as.numeric(quantile(portfolio_losses, 0.99))
portfolio_ES_95 <- mean(portfolio_losses[portfolio_losses > portfolio_VaR_95])
portfolio_ES_99 <- mean(portfolio_losses[portfolio_losses > portfolio_VaR_99])
risk_summary <- tibble(
Risk_Measure = c("VaR", "VaR", "Expected Shortfall", "Expected Shortfall"),
Confidence_Level = c("95%", "99%", "95%", "99%"),
Estimate = c(portfolio_VaR_95, portfolio_VaR_99, portfolio_ES_95, portfolio_ES_99)
)
risk_summary
plot_data <- tibble(Loss = portfolio_losses)
threshold_95 <- portfolio_VaR_95
threshold_99 <- portfolio_VaR_99
ggplot(plot_data, aes(x = Loss)) +
geom_histogram(bins = 80) +
geom_vline(xintercept = threshold_95, linetype = "dashed") +
geom_vline(xintercept = threshold_99, linetype = "dotted") +
labs(
title = "Portfolio Loss Distribution with VaR Thresholds",
x = "Portfolio loss",
y = "Frequency"
)
The two vertical lines represent the 95% and 99% VaR thresholds. Losses to the right of these thresholds are tail losses. Expected Shortfall is obtained by averaging the losses beyond the chosen VaR threshold.
Students often interpret VaR as the maximum possible loss. This is incorrect. VaR is a quantile, not a worst-case loss. Losses beyond VaR can occur.
A second common mistake is to ignore the time horizon. A one-day VaR and a one-month VaR are not the same thing. Every VaR statement must specify the time horizon.
A third mistake is to confuse the confidence level with the tail probability. A 99% VaR corresponds to a 1% exceedance probability.
A fourth mistake is to assume that VaR always rewards diversification. VaR is not necessarily sub-additive, so it is not always coherent.
A fifth mistake is to use the variance-covariance method without checking whether the normality assumption is reasonable. Financial losses may be heavy-tailed, and normality-based VaR may underestimate extreme losses.
Finally, students sometimes calculate Expected Shortfall using all losses instead of only the losses beyond VaR. Expected Shortfall is a conditional average over the tail.
A financial institution wants to measure the market risk of its trading portfolio. The risk manager is considering Value-at-Risk and Expected Shortfall as possible risk measures. The institution also wants to understand how diversification affects portfolio risk.
Required: