6 Risk measures and extreme value theory

  • One of the goals of financial risk management is the accurate calculation of the magnitudes and probabilities of large potential losses due to extreme events

  • In statistical terms, these magnitudes and probabilities are high quantiles and tail probabilities of a loss distribution (losses are typically understood as negative returns)

  • The methods of extreme value theory focus on modeling the tail behavior of a loss distribution using only extreme values (above some high threshold) rather than all of the data

  • The magnitude of potential losses (the risk measure or risk exposure), which is most widely used in practice, is Value–at-Risk (VAR)

Value–at-Risk (VAR) is the maximal expected loss on an investment or portfolio over a given time horizon at a specified confidence level \(1-p\) (usually \(95\%\) or \(99\%\)) when a holder is in the long position. Assuming a normal distribution of returns a \(VaR_{1-p}\) is the \(p\)-th normal quantile of the losses

\[\begin{equation} VaR_{1-p}=\mu+z_{p}\sigma \tag{6.1} \end{equation}\]

\(\mu\) – expected return (mean)
\(z_{p}\) – standard normal upper quantile (e.g. \(1.64\) for \(p=0.05\) when confidence level is \(95\%\))
\(\sigma\) – standard deviation of returns

  • To forecast the \(VaR_{1-p}\) of a single asset or an entire portfolio of assets for one–period ahead, it is necessary to know the distribution of returns, the conditional mean at time \(t+1\), and the conditional variance at time \(t+1\), and therefore this parametric approach is the most sensitive

  • When normality assumption is unrealistic (due to asymmetry and heavy tails of returns), four solutions are available: (a) adjust the standard normal quantile \(z_{p}\) for skewness and kurtosis using Cornish–Fisher expansion, (b) assume another theoretical distribution which captures heavy tails and/or skewness, (c) use assumption–free approach which is non–parametric (such as historical \(VaR_{1-p}\)), and (d) calculate VaR based on POT methodology (peak over threshold) by fitted tail distribution

  • Historical \(VaR_{1-p}\) calculates the \(p-\)th empirical quantile of the past returns and can not be used to predict future risk (backward–looking approach)

  • To accommodate heavy tails, a Student’s t–distribution with \(df\) degrees of freedom can be assumed when calculating \(VaR_{1-p}\)

\[\begin{equation} VaR_{1-p}=\mu+t_{p}\sigma \sqrt{\dfrac{df-2}{df}} \tag{6.2} \end{equation}\]

where \(t_{p}\) is upper quantile of t–distribution for a given probability \(p\) (e.g. \(2.105\) for \(p=0.05\) and \(df=5\)), and \(\sqrt{(df-2)/df}\) is a correction factor for the standard deviation because the sample standard deviation is a biased estimate of the scale parameter of the non–central Student’s t–distribution (by this correction the \(p-\)th quantile of standardized Student’s t–distribution is obtained)

Example 22. From PerformaceAnalytics package use VaR() command to calculate historical Value–at-Risk at \(95\%\) confidence level (\(VaR_{0.95}\)) considering daily returns of Meta stock retrieved from Yahoo Finance (period from 2021-01-01 to 2024-12-31). Afterwards, compute the normal Value–at-Risk at the same confidence level. Finally, compute modified Value–at-Risk assuming the same distribution of returns (Gaussian) as well as studentized Value–at-Risk assuming the Students’ t-distribution with pre–computed degrees of freedom.
Solution Copy the code lines below to the clipboard, paste them into an R Script file, and run them.
In this example, under Gaussian assumption, there is \(95\%\) probability the Meta will not loss more than \(4.61\%\) of it’s value in one day (\(VaR_{0.95}=-0.046089\)) or in other words you might lose more than \(4.61\%\) in \(1\) out of \(20\) days. Keep in mind that in command VaR() an argument \(p=0.95\) due to inverting convention (unlike quartile() command which uses \(p=0.05\) as expected for the \(5-\)th quantile). Additionally, modified and studentized VaR’s are not expected to be greater than normal Value–at–Risk (normal VaR is typically underestimated when heavy tail property is ignored), while the historical Value–at–Risk has the lowest value.
# Loading required packages (if already installed)
install.packages("PerformanceAnalytics")
library(PerformanceAnalytics)
library(quantmod)

# Importing Meta stock data from Yahoo Finance for the specified period
getSymbols("META", src = "yahoo", from = as.Date("2021-01-01"), to = as.Date("2024-12-31"))

# Compute daily log returns using closing prices
meta_returns <- dailyReturn(Cl(META), type = "log")

# Check for missing values in the returns
sum(is.na(meta_returns))

# Three types of Vale-at-Risk at the same confidence level
historical <- VaR(meta_returns,p=0.95,method="historical")
historical

# Alternatively, historical VaR can be calculated as empirical quantile  
quantile(meta_returns,p=0.05) # lower quantile of returns
quantile(-meta_returns,p=0.95) # upper quantile of negative returns

# Normal VaR and modified VaR
normal <- VaR(meta_returns,p=0.95,method="gaussian")
normal

# Noraml VaR computed manually
mean(-meta_returns)+qnorm(0.95)*sd(-meta_returns)
mean(meta_returns)+qnorm(0.05)*sd(meta_returns)

modified <- VaR(meta_returns,p=0.95,method="modified")
modified

# Calculating degrees of freedom from kurtosis and studentized VaR
df=4+(6/(kurtosis(meta_returns)-3))
studentized <- mean(-meta_returns)+qt(0.95,df)*sd(-meta_returns)*sqrt((df-2)/df)
studentized

\(~~~\)

  • The proportion of VaR exceedances (occurs when actual return or loss exceeds the VaR) is called the VaR coverage rate. VaR coverage rate should be close to probability level \(p\) if VaR is accurately estimating the risk level. If the coverage rate is too low the model is too conservative, and if it’s too high the model is underestimating risk which is more dangerous

  • Kupiec’s unconditional coverage test can be used as formal test in checking the effectiveness of VaR (so called backtesting)

  • VaR tells you how much you might lose, but not how bad it can get beyond that. To overcome this drawback of VaR, a risk measure called expected shortfall (ES) is introduced in financial econometrics

Expected shortfall (ES), also known as conditional VaR (CVaR), is the expected loss size given that VaR is exceeded. Assuming a normal distribution \(ES_{1-p}\) is conditional expectation of the losses (variable \(X\)) greater than \(p\)-th normal quantile

\[\begin{equation} ES_{1-p}=E(X|X>VaR_{1-p})=\mu+\sigma \dfrac{pdf(z_{p})}{1-cdf(z_{p})} \tag{6.3} \end{equation}\]

\(\mu\) – mean return – command mean()
\(z_{p}\) – standard normal upper/lower qunatile – command qnorm()
\(\sigma\) – standard deviation of returns – command sd()
\(pdf\) – probability density function – command dnorm()
\(cdf\) – cumulative distribution function – command pnorm()

  • ES better reflect the tail behavior of the losses than VaR, and it is considered as coherent risk measure, while VaR is not always conherent. A risk measure is conherent if satisfies the following four properties: monotonicity, sub–additivity, psitive homogeneity and translation invariance

  • Although both risk measures can theoretically accommodate any distribution of returns, but for forecasting purposes the parameters of assumed distribution should be predicted, at least \(1-\)step ahead like \(\mu_{t+1}\) and \(\sigma_{t+1}\)