Definition and Brief History
Value at Risk, according to the Bank of International Settlements, is defined as a measure of the worst expected loss on a portfolio of instruments resulting from market movements over a given time horizon and a pre-defined confidence interval. It is used by risk managers to measure and control risk exposure. A brief history follows.
Value at Risk has its foundations in the 1920s to the capital requirements that the New York Stock Exchange required its members to adhere to. At this time however, the metric was not mentioned explicitly. D.H. Leavens was the first to provide a crude VaR measure back in 1945. Writing for a predominantly non-technical audience, Holton assumes that Leaven had standard deviation in mind because he repeatedly made use of the phrase “spread between probable losses and gains”.
Even after having received contributions from individuals like Harry Markowitz and William F. Sharpe, the metric did not arise as a unique idea until the 1980s. Because of the spread in the usage of technology VaR was now applied to a greater numbers of securities, and it could also be applied in a new context. According to Wikipedia, it was the stock market crash of 1987 that made the use of VaR more prevalent. In 1988 the Basel Committee published a set of minimal capital requirements to be adhered to by banks. G-10 countries agreed to adhere to these requirements, and this event is now known as the 1988 Basel Accord.
An Example
In more general terms, VaR determines the potential loss for the organization being appraised and provides a probability statistic of occurrence of the defined loss. The figures used to calculate VaR are:
The amount of the potential loss;
The probability of the loss occurring; and
3. The timeframe.
Now for an example. Suppose the risk manager of Capricorn Bank, a fictitious bank, says that the 5-day VaR of a portfolio is R3 million, with a 99% confidence interval. This implies that there is a 99% probability that the maximum loss will not exceed R3 million over a 5-day period. Put differently, we can say that there is only a 1% chance that the maximum loss over a 5-day period will be greater than R3 million.
An Illustration in Python
I will now demonstrate calculating VaR in python using two approaches, namely, the parametric approach, and the historical simulation approach.I will calculate VaR for First National Bank, one of South Africa's oldest banks, for a 6 year period, beginning March 2014, and ending March 2020. Let us begin with the parametric approach.
1. We begin by importing the packages required to perform the computation.
![](https://static.wixstatic.com/media/2be87c_a4011d63432a41ab95f630364364589b~mv2.png/v1/fill/w_310,h_279,al_c,q_85,enc_auto/2be87c_a4011d63432a41ab95f630364364589b~mv2.png)
2. Thereafter we import the daily price data for our selected stock, and calculate the daily returns
![](https://static.wixstatic.com/media/2be87c_a0d37fc95bef4448afbb4e8f7550c448~mv2.png/v1/fill/w_430,h_79,al_c,q_85,enc_auto/2be87c_a0d37fc95bef4448afbb4e8f7550c448~mv2.png)
3. Begin by firstly computing the mean and standard deviation, and thereafter plotting the normal distribution curve against the daily returns.
![](https://static.wixstatic.com/media/2be87c_fc0f8ec545b84684a4cf48aeedbc6cdb~mv2.png/v1/fill/w_611,h_130,al_c,q_85,enc_auto/2be87c_fc0f8ec545b84684a4cf48aeedbc6cdb~mv2.png)
![](https://static.wixstatic.com/media/2be87c_b763e83fa6fd4bcba0e2a43a02db04dc~mv2.png/v1/fill/w_446,h_308,al_c,q_85,enc_auto/2be87c_b763e83fa6fd4bcba0e2a43a02db04dc~mv2.png)
4. Calculate the VaR using the point percentile function.
![](https://static.wixstatic.com/media/2be87c_e813b5ca7a0d4a349994e478877ec5c0~mv2.png/v1/fill/w_946,h_208,al_c,q_85,enc_auto/2be87c_e813b5ca7a0d4a349994e478877ec5c0~mv2.png)
The second approach to calculate VaR is the historical simulation method. The procedure to applying to method is outlined below.
1. Import the packages required to perform the computation.
![](https://static.wixstatic.com/media/2be87c_a4011d63432a41ab95f630364364589b~mv2.png/v1/fill/w_310,h_279,al_c,q_85,enc_auto/2be87c_a4011d63432a41ab95f630364364589b~mv2.png)
2. Import the daily price data for the selected stock.
![](https://static.wixstatic.com/media/2be87c_a0d37fc95bef4448afbb4e8f7550c448~mv2.png/v1/fill/w_430,h_79,al_c,q_85,enc_auto/2be87c_a0d37fc95bef4448afbb4e8f7550c448~mv2.png)
3. Calculate and sort the daily returns.
![](https://static.wixstatic.com/media/2be87c_5ba268d3df094356aa96a9554fbd6dff~mv2.png/v1/fill/w_418,h_100,al_c,q_85,enc_auto/2be87c_5ba268d3df094356aa96a9554fbd6dff~mv2.png)
4. Calculate the VaR using the point percentile function.
![](https://static.wixstatic.com/media/2be87c_dd141383278d4d1d94172c3b0e613998~mv2.png/v1/fill/w_980,h_248,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/2be87c_dd141383278d4d1d94172c3b0e613998~mv2.png)
Interpretation
The difference between the VaR figures using the two methods above is indicative of the fact that the return distribution is not normal, which means that losses are not distributed equally across the mean.
Concluding Remarks
Even though VaR is easy to compute and understand, it does have a few critical limitations. One such limitation is that VaR is made the central concern of risk management, when the reality of the situation is that risk managers should be concerned with what happens when VaR is exceeded. This has lead some risk practitioners to prefer metrics like GARCH and expected shortfall, but to mention a few.
Despite its shortcomings the metric does provide some benefits. Rather than completely not using it, it should be seen as a gateway into calculating relevant metrics for risk management, or as a benchmark of sorts.If you would like to download the code and try it on a stock of your choosing, the relevant code can be found on my github at this link. Complement this article with the following video.
References
Bank of International Settlements, Wikipedia.com
History of Value at Risk: 1922-1988, Wharton.edu
William F. Sharpe, Wikipedia.com
History of the Basel Committee, BIS.com
Value at Risk, Investopedia.com
Comentarios