Discrepancy! https://blog.quantinsti.com/calculating-value-at-risk-in-excel-python/


https://quaintitative.com/monte_carlo_var/ 

On your blog you have a method for parametric var that is different from this website I found. Is there something Im missing or one of these is incorrect?

VaR_99 = norm.ppf(1-0.99, mean, std_dev)

Z_99 = stats.norm.ppf(1-0.99)
price = AAPL.iloc[-1]['Close']
ParamVAR = price*Z_99*std

 

Hello Jane, 

VaR and ParamVaR two different approaches to calculate the Value at Risk.

Before we discuss the differences and possible relationship between Var_99 and ParamVaR… let's see what they both really are and how they are calculated.



VaR_99 is calculated using the cumulative probability distribution function (CDF) of a normal distribution. The function norm.ppf(p, mean, std_dev) is used to calculate the inverse CDF, also known as the percent point function (PPF). The PPF gives the value of the random variable such that the probability of the random variable being less than or equal to that value is equal to the given probability (in this case, 0.99).



ParamVaR is calculated using the standard normal distribution, which is a normal distribution with a mean of 0 and a standard deviation of 1. The function stats.norm.ppf(1-0.99) is used to calculate the inverse CDF of the standard normal distribution. The result is a Z-score that corresponds to the 99th percentile. Then the Z-score is multiplied by the standard deviation of the stock's returns, and by the last close price of the stock.



In summary, VaR_99 is calculated using the mean, standard deviation and assuming that the stock's returns follow a normal distribution. While ParamVaR uses the standard normal distribution and the last close price and standard deviation of the stock's returns.



As you might have noticed, VaR_99 uses normal distribution of returns whereas ParamVaR uses a standard normal distribution (mean =0 and std =1). 

And also, VaR gives you the maximum percentage loss at a given confidence interval whereas paramVaR gives you the maximum loss in dollar terms at a given confidence interval. You can simply multiply the last traded price with VaR value to get a value close to paramVaR (the difference is due to different distributions used to calculate the Value at Risk by both the methods)



I hope this helps!