Estimation of VaR and ES

Steps of Estimation

The main steps to estimating VaR and ES are the following:

  1. Identify the variable of interest (asset value, portfolio value, credit losses, insurance claims, etc.)

  2. Identify the key risk factors that impact the variable of interest (asset prices, interest rates, duration, volatility, default probabilities, etc.)

  3. Perform deviations in the risk factors to calculate the impact in the variable of interest

The main question is how to estimate the distribution that we will calculate the quantile of. There are three main approaches to estimating the distribution in VaR:

  1. Delta-Normal (Variance-Covariance) Approach

  2. Historical Simulation Approach(s)

  3. Simulation Approach

First we will discuss how to do this for value at risk followed by expected shortfall.

Delta Normal

The Delta Normal approach has two key characteristics that define it. First, we will discuss the Normal part of the name. Suppose that the value, \(V\), of an asset is a function of a normally distributed risk factor, \(RF\). Assume that the relationship between this risk factor and the value of the asset is linear:

\[ V = \beta_0 + \beta_1 RF \]

In this situation it is easy to calculate the VaR. If \(RF\) is normally distributed in the above equation, then \(V\) would also be normally distributed as well. The 2.5% VaR on any normal distribution is the quantile shown below:

Quantiles on Normal Distribution

The VaR at 2.5% is just \(\mu - 1.96\sigma\). With an estimate of \(\mu\) and \(\sigma\) we can estimate this number easily. In fact, any VaR for a normal distribution can be calculated by adjusting the 1.96 to match the quantile of interest. For example, the 1% VaR is \(\mu - 2.33\sigma\).

The above approach works great if the relationship is linear between \(RF\) and \(V\). What if the relationship between the two is nonlinear:

\[ V = \beta_0 + \beta_1 RF^2 \]

Finding the extreme of a normally distributed value and squaring that value does not equal the extreme value for a squared risk factor. However, we can still use the normality assumption to help calculate the VaR.

This is where the delta piece of the name comes into play. The derivative of the relationship will help us approximate what we need. Remember, the derivative at a specific point (say \(RF_0\)) is the tangent line at that point. If we zoom in closer to the area around \(RF_0\) the relationship is approximately linear as seen below:

Tangent Line on Non-Linear Relationship

Small changes of the risk factor result in small changes of the value of the asset. We can approximate these small changes with the slope. We can see this more mathematically by looking at the Taylor-series expansion of a function’s derivatives:

\[ dV = \frac{\partial V}{\partial RF} \cdot dRF + \frac{1}{2} \cdot \frac{\partial^2 V}{\partial RF^2} \cdot dRF^2 + \cdots \]

The Delta-Normal approach assumes that only the first derivative is actually important. We can evaluate this first derivative at a specific point \(RF_0\) which is typically some initial value:

\[ dV = \frac{\partial V}{\partial RF} \Bigg|_{RF_0} \cdot dRF \rightarrow \Delta V = \delta_0 \cdot \Delta RF \]

The change in the value of the asset / portfolio is a constant (\(\delta_0\)) multiplied by the change in the risk factor. This is a linear relationship between the changes. All we need to know is the distribution of \(\Delta RF\). Luckily, we already assumed normality for \(RF\). Since \(\Delta RF = RF_t - RF_{t-1}\) and each of \(RF_t\) and \(RF_{t-1}\) are normal, then \(\Delta RF\) is normally distributed since the difference in normal distributions is still normal. Therefore, the change in the value of the asset / portfolio, \(\Delta V\) is also normally distributed by the same logic. Since \(\Delta V\) is normally distributed we can easily calculate any VaR values for the change in the portfolio as we did above.

Let’s work through an example! Suppose that the variable of interest is a portfolio consisting of \(N\) units in a certain stock, \(S\). The price of the stock at time \(t\) is denoted as \(P_t\). Therefore, the value of the portfolio is \(N \times P_t\). Let’s assume that the price of the stock follows a random walk:

\[ P_t = P_{t-1} + \varepsilon_t \]

with \(\varepsilon_t\) following a normal distribution with mean 0 and standard deviation \(\sigma\). Therefore, the change in the value of the portfolio is \(N \times \Delta P_t\) with \(\Delta P_t = P_t - P_{t-1} = \varepsilon_t\) which is a normal distribution. We can then look up the VaR for a portfolio under this structure by just looking up the corresponding point on the normal distribution. If we wanted the 1% VaR for the change in the value of the portfolio, it would just be \(0 - 2.33\sigma\). This is why the Delta-Normal approach is sometimes referred to as the variance-covariance approach. If you know the variances of your data and are willing to assume normality, then the calculation of the VaR is rather straight forward.

Let’s put some numbers to the previous example. Suppose you invested $100,000 in Apple today (bought Apply stock). Historically, the daily standard deviation of Apple returns are 1.81%. Let’s also assume daily returns for Apple have a mean return of 0%. Let’s assume that the returns for Apple follow a normal distribution. Then the 1 day, 1% VaR is calculated as \(\$100,000 \times (-2.33) \times 0.0181 = -\$4,217.30\) In other words, you think there is a 1% chance of losing more than $4,075.50 by holding that portfolio of Apple stock for a single day.

What if we had two assets in our portfolio? Luckily, these calculations are still easily worked out under the assumption of normality. If we had two random variables X and Y that were both normally distributed, then the variance of a linear combination of X and Y, \(aX + bY\) would be the following:

\[ \sigma^2 = a^2 \sigma_x^2 + b^2 \sigma_Y^2 + 2ab \times Cov(X, Y) \]

Suppose you invested $200,000 in Microsoft and $100,000 in Apple. Assume the historical daily average return is 0% for both. Also assume that the historical standard deviation of daily returns for Microsoft and Apple are 2.15% and 2.36% respectively. Lastly, assume that the historical correlation between the two returns is 0.791. Under the assumption that both returns follow normal distributions then the variance of that portfolio is the following:

\[ \sigma_P^2 = (2/3)^2 \sigma_M^2 + (1/3)^2 \sigma_A^2 + 2(2/3)(1/3) \times Cov(A, M) \]

\[ \sigma_P^2 = (2/3)^2 0.0191^2 + (1/3)^2 0.0181^2 + 2(2/3)(1/3) \times (0.791 \times 0.0191 \times 0.0181) = 0.000311 \]

Then the one day, 1% VaR for this portfolio is \(\$300,000 \times (-2.32635) \times \sqrt{0.000311} = -\$12,303.84\).

Let’s see how we can do this in each of our softwares!

Historical Simulation Approach

The historical simulation approach is a non-parametric (distribution free) approach to estimating the VaR and ES values. This approach, as the name states, depends solely on historical data. For example, if history suggests that only 1% of the time Apple’s daily returns were below -4%, then the 1% VaR for daily returns is just -4%. Essentially, we just find the quantiles of our historical data! Let’s work through some examples.

Single Position Example

Suppose you invested $100,000 in Apple today. You have 500 historical observations on Apple’s daily returns. You want to compute the daily, 1% VaR of your portfolio. All we have to do is find the 1% quantile of our 500 observations. To do this we simply calculate the portfolio’s value as if the 500 historical observations we had were possible future values of the Apple’s daily returns. We sort these 500 portfolio values from worst to best. The 1% of 500 days is 5 days, so we need to find a loss that is only exceeded 5 times. In other words, the 1% VaR would be the 6th observation in our sorted possible portfolio values as shown below:

6 Worst Observations in Time Window of 2/22/2019 - 2/16/2021

Here we can see that our portfolio dropping 6.76% in value is the 6th worst occurrence.

Let’s see how to do this in each of our softwares!

Two Position Example

We can easily extend this to a two position portfolio example by taking the same approaches. Suppose you invested $200,000 in Microsoft and $100,000 in Apple today. You have 500 historical observations on both returns. Simply calculate the portfolio’s value as if each of the previous 500 days is a possible scenario for your one day return on this portfolio. We then sort these 500 possible scenarios and the 1% VaR will be the 6th observation as shown below:

6 Worst Observations in Time Window of 2/22/2019 - 2/16/2021

Let’s see how to do this in each of our softwares!

Stressed VaR and ES

There are some key assumptions we are making with the historical simulation approach:

  1. The past will repeat itself.

  2. The historical period covered is long enough to get a good representation of “tail” events.

These have lead to alternative version of the historical simulation approach.

One of these approaches is the stressed VaR (and ES) approach. Instead of basing the calculations on the movements in market variables over the last \(n\) days, we can base calculations on movements during a period in the past that would have been particularly bad for the current portfolio. Essentially, we look for the worst collection of \(n\) days in a row in our data. That is where we will get our stressed VaR instead of the last \(n\) days.

Let’s see how to do this in each of our softwares!

Multiple Day VaR

With the Delta-Normal approach is was easily mathematically to extend the 1 day VaR calculations to the \(n\) day VaR. When extending to multiple days using the historical simulation approach you could do one of the following approaches:

  1. Calculate \(n\) day returns first, then run the historical simulation approach(es) as desired.

  2. Use any of the historical simulation approaches, but consider the daily returns as starting points. Record the return of the next consecutive \(n\) days to get a real example of \(n\) day returns for simulation.

Simulation

The last approach to estimating the VaR and ES would be through simulation. We simulate the value of the portfolio using some statistical / financial model that explains the behavior of the random variables of interest. If we have “enough” simulations then we have simulated the distribution of the portfolio’s value. From there we can find the VaR or ES at any point we desire. Simulation approaches allow us to control for non-normal distributions, non-linear relationships, multidimensional problems, and history changing.

Using simulation assumes a couple of key aspects:

  1. The choice of distribution is an accurate representation of the reality.

  2. The number of draws is enough to capture the tail behavior.

Let’s walk through the approach for our two position portfolio. If we have $200,000 invested in Microsoft and $100,000 invested in Apple, we just need to pick a distribution for their returns to simulate. Assume a normal distribution for each of these stocks returns with their historical mean and standard deviation. We can draw 10,000 observations from each of these distributions.

We can add in the correlation structure to these returns through Cholesky decomposition. For more details on Cholesky decomposition and adding correlation to simulations, please see the code notes for Introduction to Simulation.

From there, we just need to calculate the quantile for this distribution. With 10,000 simulations, the 1% VaR would be the \(101^{st}\) observation.

Due to the normality assumption in this example we could have easily used the Delta-Normal approach instead, but it would at least illustrates the simulation approach.

Let’s see how to do this in each of our softwares!

Comparison of Three Approaches

The following is a summary comparison for the three approaches - Delta-Normal, historical simulation, and simulation.

Advantages and Disadvantages of 3 Approaches

Confidence Intervals for VaR

Value at risk calculations in any of the above approaches are just estimates. All estimates have a notion of variability. Therefore, we can calculate confidence intervals for each of the above approaches.

When you have a normal distribution (the Delta-Normal approach) there is a known mathematical equation for the confidence interval around a quantile. It is derived as a confidence interval around the standard deviation \(\sigma\) followed by multiplying this \(\sigma\) by the corresponding quantiles of interest on the normal distribution. The confidence interval for \(\sigma\) is as follows:

\[ CI(\hat{\sigma}) = (\sqrt{\frac{(n-1) \sigma^2}{\chi^2_{\alpha/2, n-1}}}, \sqrt{\frac{(n-1) \sigma^2}{\chi^2_{1-\alpha/2, n-1}}}) \]

For non-normal distributions or historical / simulation approaches, the bootstrap method of confidence intervals is probably best. The bootstrap approach to confidence intervals is as follows:

  1. Resample from the simulated data using their empirical distribtion; or rerun the simulation severeal times.

  2. In each new sample (from step 1) calculate the VaR.

  3. Repeat steps 1 and 2 many times to get several VaR estimates. Use these estimates to get the expected VaR and its confidence interval.

Let’s see both of these approaches in our softwares!

Expected Shortfall

The ES is a conditional expectation that tries to answer what you should expect to lose if your loss exceeds the VaR. It is the expected (average) value of the portfolio in the circled region below:

Expected Shortfall for Portfolio Value

The main question is how to estimate the distribution that we will calculate the average of the worst case outcomes. There are three main approaches to estimating the distribution in ES and they are the same as VaR:

  1. Delta-Normal (Variance-Covariance) Approach

  2. Historical Simulation Approach(s)

  3. Simulation Approach

The best part is that extending these approaches to include expected shortfall from what we already covered for value at risk is rather straight forward. Let’s take a look at each of these.

Delta-Normal

Just like the VaR calculation for the Delta-Normal approach, the ES has a known equation. For a normal distribution, the average (or expected value) in a tail of the distribution is defined as follows:

\[ ES = CVaR = \mu - \sigma \times \frac{e^{-q^2_{\alpha/2}}}{\alpha \sqrt{2 \pi}} \]

with \(\sigma\) being the standard deviation of the data, \(\alpha\) being the percentile of interest (1% for example), and \(q_{\alpha}\) as the tail percentile from the standard normal distribution (-2.33 for example).

Let’s see how to code this into our softwares!

The calculation above would be the average of the 1% worst case scenarios, assuming normality was true.

Historical Simulation

We can easily extend the historical simulation approach for VaR to ES. Let’s look at our two position portfolio example. Suppose you invested $200,000 in Microsoft and $100,000 in Apple today. You have 500 historical observations on both returns. Simply calculate the portfolio’s value as if each of the previous 500 days is a possible scenario for your one day return on this portfolio. We then sort these 500 possible scenarios and the 1% ES will be the average of these 5 observations that make up the 1%:

6 Worst Observations in Time Window of 2/22/2019 - 2/16/2021

The average of these 5 observations is -$28,154.09. Again, this value is saying that if the worst 1% of cases happens, we expect to lose $28,154.09 on average.

Let’s see how to do this in each of our softwares!

The calculation above would be the average of the 1% worst case scenarios, according to historical data.

Simulation

Simulation is just an extension of what we did earlier to calculate the VaR. First, follow the steps described earlier to create the 10,000 simulated, sorted, portfolio values for the VaR calculation. Then simply just take the average of all the values that are worst than the VaR. For 10,000 simulations, the ES would be the average of the worst 100 observations.

Let’s see how to do this in each of our softwares!

Again, the above value is the average of the 1% worst case scenarios, assuming our structure of the simulations is correct.