In: Statistics and Probability
Suppose X is a normal with zero mean and standard deviation of $10 million.
a) Find the value at risk for X for the risk tolerances h=0.01, 0.02, 0.05, 0.10, 0.50, 0.60, and 0.95.
b) Is there a relation between VaR for values of h <= 0.50 and values for h>= 0.50?
Sol:
a).
Here I write R-code for given problem.
install.packages("PerformanceAnalytics")
library("PerformanceAnalytics")
h=c(0.01,0.02,0.05,0.10,0.50,0.60,0.95)
VaR(h, p = 0.95, method = "gaussian", mu = NULL, sigma = 10)
And the output is:
> VaR(h, p = 0.95, method = "gaussian", mu =
NULL, sigma = 10)
[,1]
VaR -0.242709
Thus the value at risk is -0.242709.
b).
h1=c(0.01,0.02,0.05,0.10,0.50)
h2=c(0.50,0.60,0.95)
VaR(h1, p = 0.95, method = "gaussian", mu = NULL, sigma = 10,invert = T)
VaR(h2, p = 0.95, method = "gaussian", mu = NULL, sigma = 10,invert = F)
Here we get output for only h1 which is vector for h<=0.50
and this output is means the value at risk is -0.1677595
But for second vector we cant get value at risk.
There is some error by using this method.
The error says that VaR calculation produces
unreliable result (inverse risk) for column: 1 :
-0.365990711424113
[,1]
VaR NA.
If you Satisfy with Answer, Please give me "Thumb Up". It was very important to me.