`A selection of topics on IT and its application to finance. `

Send me your comments, questions or suggestions by clicking **here**

`elmama`

Calculating Value at Risk (VaR) using Historical Simulation

Value at risk - VaR for short - is a widely used indicator of Market Risk. It is a measure of the expected maximum loss that an asset or portfolio of assets might experience over a defined time horizon with a given confidence level.

There are three main methods by which VaR is measured.

1) Parametric or analytical methods

2) Monte Carlo Methods

3) Historical Simulation

A McKinsey report published in May 2012 estimated that 85% of large banks were using historical simulation. The other 15% used Monte Carlo methods.

In this topic we will discuss calculating VaR using the Historical Simulation method.

The other two methods will be discussed in other articles.

The main assumption of the Historical Methodology of VaR calculation is that you look back in time at the past performance of your portfolio, look at past losses and assume that future losses will be of a similar size and frequency.

In this case past performance __really is__ a guide to future performance. The caveat is that in times of Market distress or high volatility the VaR mode can and will breakdown somewhat. With that in mind the steps below show how we do the calculation.

Step 1 – Calculate the returns (or price changes) of all the assets in the portfolio between each time interval.

The first step lies in setting the time interval and then calculating the returns of each asset between two successive periods of time.

Generally, we use a daily horizon to calculate the returns, but we could use other periodic returns if required. The rule with Historical simulation of Â VaR i s that the longer the history of returns the better. Certainly at least a year and preferably more if possible.

**Step 2 – Apply the price change calculated to the current mark-to-market value of the assets and re-value your portfolio.**

Once we have calculated the returns of all the assets from today back to the first day of the period of time that is being considered – let us assume one year comprised of 265 days – we consider that these returns may occur tomorrow with the same likelihood. For instance, we start by looking at the returns of every asset yesterday and apply these returns to the value of these assets today. That gives us new values for all these assets and consequently a new value of the portfolio.

Then, we go back in time by one more time interval to two days ago. We take the returns that have been calculated for every asset on that day and assume that those returns may occur tomorrow with the same likelihood as the returns that occurred yesterday. We re-value every asset with these new price changes and then the portfolio itself. And we continue until we have reached the beginning of the period.

In this example, we will have had 264 simulations.

**Step 3 – Sort the series of the portfolio-simulated P&L’s from the lowest to the highest value.**

After applying these price changes to the assets 264 times, we end up with 264 simulated values for the portfolio and thus P&L’s.

Since VaR calculates the worst expected loss over a given horizon at a given confidence level under normal market conditions, we need to sort these 264 values from the lowest to the highest as VaR focuses on the tail of the distribution.

**Step 4 – Read the simulated value that corresponds to the desired confidence level.**

The last step is to determine the confidence level we are interested in – let us choose 99% for this example.

One can read the corresponding value in the series of the sorted simulated P&Ls of the portfolio at the desired confidence level and then take it away from the mean of the series of simulated P&Ls.

In other words, the VaR at 99% confidence level is the mean of the simulated P&Ls minus the 1% lowest value in the series of the simulated values.

This can be formulated as follows:

VaR1-α = µ(R) - Rα

Where:

VaR1-α is the estimated VaR at the confidence level 100*(1-α)%.

`µ(R) is the mean of the series of simulated returns or P&Ls `

of the portfolio

Rα is the worst return of the series of simulated P&Ls of the portfolio or, in

other words, the return of the series of simulated P&Ls that corresponds to the level of significance α

**Need for Interpolation**

****

We may need to proceed to some interpolation since there will be no chance to get a value at 99% in our example. Indeed, if we use 265 days, each return calculated at every time interval will have a weight of 1/264 = 0.00379. If we want to look at the value that has a cumulative weight of 99%, we will see that there is no value that matches exactly 1% (since we have divided the series into 264 time intervals and not a multiple of 100). Considering that there is very little chance that the tail of the empirical distribution is linear, proceeding to a linear interpolation to get the 99% VaR between the two successive time intervals that surround the 99th percentile will result in an estimation of the actual VaR. Nevertheless, even a linear interpolation may give you a good estimate of your VaR.