# How do I get Value-at-Risk for a GED distribution in R?

I need to calculate parametric Value-at-Risk using a GARCH model assuming a GED distribution. How can calculate it in R? thank you

## VaR for GED in R

package(fGarch)
qged(p, mean = 0, sd = 1, nu = 2)

#Example
qged(.01, mean=1000, sd=2000)
[1] -3652.696


where, $$1-p$$ is confidence level.

• GED distribution is assumed for standardized errors, but these will be scaled by the conditional standard deviation as per the GARCH model to form the real errors. The question is (I believe), what is the VaR for the real errors? If VaR is just a quantile, I suppose one should just multiply the argument sd in the function qged by the conditional standard deviation at the particular data point. – Richard Hardy Mar 10 '16 at 19:07
• @RichardHardy It is not clear in the question, so I provided basic answer. – Neeraj Mar 11 '16 at 9:49
• That's fine, I just thought you might want to improve your answer by adding a paragraph on the case when the standardized errors are GED. This is the case here, I believe (I found a similar question by the same user at Cross Validated, hence I knew what he was looking for.) – Richard Hardy Mar 11 '16 at 9:54