This blog post will continue the discussion I started regarding the Final Year Project I am doing with 3 other undergraduates. I describe the three most commonly used methods to calculate Value at Risk (VaR). They are;

- Historical Simulation Method
- Parametric or Variance-Covariance Method
- Monte Carlo Simulation

VaR is normally calculated for a given portfolio. Portfolio is a collection of investments that is owned by a person or an organization. These investments can be stocks, bills and bonds etc. The risk a person or an organization is subjected to, by investing is calculated as VaR.

Since Historical Simulation is the simplest method one can use to calculate VaR I will give a detailed description on it and a general explanation on other two methods. Let us explore these three methods one by one.

**Historical Simulation Method**

Historical Simulation (HS) method is one of the most commonly used methods to calculate VaR. Despite the fact that HS does not produce more accurate risk indicators, most commercial banks prefer it because it is easy to explain, we make no assumptions, and also it is very conservative. HS is also categorized as a non-parametric method since we do not calculate any parameters or we do not assume any distribution for the data. As its name implies, this method simulates historical data. Historical data means the past values of a considered portfolio. There are various ways published on internet of how to perform Historical Simulation. Following steps can be done in order to calculate VaR.

- Collect the historical data for past 251 days regarding the individual asset in the portfolio. For example, if a portfolio is composed of three stocks, then we first have to get the stock prices during the last 251 days for
**each stock.** - For each stock, calculate the return value by applying the equation,
*ln(Si/Si-1)*where*Si*is the stock price. After finishing this step, we will have 250 return values per each stock. - For the 3
^{rd}step we need the amount of money invested in each asset or the number of shares the investor owns regarding each asset. We multiply each return value from either of those values for each stock. - Now we have the multiplied values such
*as a1, a2,…, a250*and*b1, b2, …, b250*and so on for each stock. We sum up each event (i.e.*a1+b1*, …,*a250+b250*) to get 250 portfolio values. - Then we sort these values in ascending order and find the frequency of each item to create a histogram.
- Once we get the histogram, we can select the value that corresponds to the given confidence level. If it is 95%, then we select the value that divides the area of the histogram to 2 areas of each having 5% and 95%. (See Fig. 1)

*Figure 1 – Histogram for Historical Simulation [1]*

By following those steps, we can simply calculate the VaR using Historical Simulation. However, the accuracy of this method is problematic since it induces two main problems. First, it involves a large standard errors. This is because, the samples we consider are drawn from historical data and they tend to be small in size. Second, the stale historical data might give incorrect measurements. The method employs historical data which spans for years back. Those past data might not be relevant for the present VaR. That fact itself reduces the accuracy of the method. However, it is more commonly used by financial institutes due to its simplicity.

**Parametric or Variance-Covariance Method**

Variance-Covariance method is another commonly used method to calculate VaR. In this method we make the assumption that the portfolio returns are normally distributed. Therefore we calculate two parameters, the expected average and the standard deviation. Hence, this method is also known as Parametric Method. This method involves a series of mathematical calculations. The general steps to calculate VaR using this method is given as below to give the readers a general idea.

- Create the histogram by following the steps 1-5 in Historical Simulation.
- Calculate the actual standard deviation and the expected average value and using those values, plot a normal distribution in the same histogram.
- Get the corresponding value for the given confidence level from the standard normal distribution table. (Ex: -1.65 for 95%)
- By multiplying the calculated standard deviation and the value got in step 4, we can calculate the VaR as a percentage.

The accuracy of Parametric Method is better than that of the Historical Method. Also, it provides a closed-form solution. One disadvantage of the method is the assumption of normal distribution.

**Monte Carlo Simulation**

V. Neumann, S. Ulam and N. Metropolis invented the Monte Carlo method in 1940s. Monte Carlo simulation uses random samples from a known population repeatedly to obtain numerical results. This is very similar to the Historical Simulation method. The only difference between those two methods is that we used randomized samples in Monte Carlo method. Of all three methods we consider in this blog, this is the hardest one to calculate. Still it gives the most accurate results. At the same time, Monte Carlo is preferred to be implemented in batch mode. That is, we first collect a set of data and then apply the method. This is due to the computationally intensity of the method. Following steps are included in the method:

- Determine the time zone t we need to analyze VaR. This can be a month containing 30 days. Divide the time zone in to equal small time periods. For example, we can divide 30 days into 30 equal time periods thereby getting Δt=1day.
- Use a random number generator to get a random number and calculate the return value of stock prices using the Brownian Motion equation.

Ri = (Si+1 – Si) = μΔt + σε√(Δt)Ri = return of the stock

Si = stock price

μ = sample mean of the stock price

σ = sample standard deviation of the stock price

ε = random value - Repeat step 2 for all 30 days.
- Repeat step 2 and 3 for a large M number of times. (standard M is equal to 10,000)
- Get the last stock price from each trial in step 4 and sort them in ascending order.
- Create a histogram and get the value that corresponds to the given confidence interval.
- Subtract the value from step 6 from the stock price value at the beginning of the month and the difference is the loss (or gain).

These steps calculate the VaR for one asset only. With slight changes we can employ it to calculate VaR for a given portfolio.

These are the 3 most commonly used methods to calculate VaR. In our project, we are planning to implement those 3 methods so that the users can select any method and calculate VaR.

References:

[1] – http://www.investopedia.com/articles/04/092904.asp

http://www.value-at-risk.net/shortcomings-historical-simulation/

http://www.value-at-risk.net/origins-historical-var/

## One thought on “Moving Towards Real Time Calculation of VaR – Real Time VaR Part 2”