Hi,
I want to calculate the Value at Risk with using some distirbutions and a
volatility model.
I use the following data(http://uploadeasy.net/upload/cdm3n.rar) which are
losses (negative returns) of a company of approx. the last 10 years. So I
want to calculated the Value at Risk, this is nothing else than the
quantile. Since I have losses I consider the right tail of the distribution.
Consider a first simple example, I assume the returns to follow a normal
distribution with mean zero and a volatility, which is estimated for each
day with a volatility model. Let's use a simple volatility model: The
empirical standard deviation of the last 10 days. So I calculate the
standard deviation of the first ten days and this is my estimate for the
11th day and so on, until the end of my data. So I assume for each day a
normal distribution with mean zero and a sigma estimated by the voaltility
mdoel. So I use this estimated sigma to calculate the quantile, which gives
me the Value at Risk. The code would be:
volatility<-0
quantile<-0
for(i in 11:length(dat)){
volatility[i]<-sd(dat[(i-10):(i-1)])
}
for(i in 1:length(dat)){
quantile[i]<-qnorm(0.975,mean=0,sd=volatility[i])
}
# the first quantile value is the VaR for the 11th date
#plot the volatility
plot(c(1:length(volatility)),volatility,type="l")
#add VaR
lines(quantile,type="l",col="red")
So in this case I understand everything and I can implement this. But now
comes my problem: I want to use a t-distribution with paramters mu, nu and
beta or even a generalized hyperbolic distribution. So in this case, I
don't know how to plug in the estimates for sigma, since there is no sigma
in the paramters? How can I implement the volatility model and e.g. the
generalized hyperbolic distribution in this case to calculate the Value at
Risk?
Thanks
[[alternative HTML version deleted]]