Moving Towards Real Time Calculation of VaR – Real Time VaR Part 2

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.

  1. 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.
  2. 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.
  3. For the 3rd 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.
  4. 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.
  5. Then we sort these values in ascending order and find the frequency of each item to create a histogram.
  6. 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)

Historical Method

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.

  1. Create the histogram by following the steps 1-5 in Historical Simulation.
  2. Calculate the actual standard deviation and the expected average value and using those values, plot a normal distribution in the same histogram.
  3. Get the corresponding value for the given confidence level from the standard normal distribution table. (Ex: -1.65 for 95%)
  4. 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:

  1. 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.
  2. 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
  3. Repeat step 2 for all 30 days.
  4. Repeat step 2 and 3 for a large M number of times. (standard M is equal to 10,000)
  5. Get the last stock price from each trial in step 4 and sort them in ascending order.
  6. Create a histogram and get the value that corresponds to the given confidence interval.
  7. 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.


[1] –


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

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s