GARCH, Value at Risk, Student´s t and Skewed t

I would be very grateful if someone can help me to clarify some doubts about GARCH form rugarch package, conditional distribution and VaR.
I´m computing VaR with student t and skewed t distribution. The package I use is rugarch. First of all I estimate the model:
##ARMA(1,0) GARCH(1,1) STUDENT T##
model=ugarchspec(variance.model = list(model = "sGARCH", garchOrder = c(1, 1)),
mean.model = list(armaOrder = c(1,0), include.mean = TRUE),
distribution.model = "std"
)
gt11= ugarchfit(spec=model, solver = "hybrid", data=return)
I extract the paremeters in order to compute conditional mean and conditional variance.
mu11=gt11@fit\$coef[1]
ar11=gt11@fit\$coef[2]
omega11=gt11@fit\$coef[3]
alpha11=gt11@fit\$coef[4]
beta11=gt11@fit\$coef[5]
nut11=gt11@fit\$coef[6]

arma_t11[t+1]= mu11 + ar11*(return- mu11)
sigma2_t11[t+1]= omega11 + alpha11 (return- arma_t11[t+1])^2 + beta11sigma2_t11[t]
sigma_t11[t+1]=sqrt(sigma2_t11[t+1]) * sqrt((nut11-2)/nut11)
VaRt1[t+1]= arma_t11[t+1] + sigma_t11[t+1] * qt(p1, df=nut11) * value
My question is: Is the code correct? By this I mean if I have to standardize the residuals or rugarch package do it for me. I think the quantile qt is standardized.
I knew for sure that my code was right, but I´m not sure now
The same example can be use for the skewed t distribution, but changing the quantile and adding a new parameter: skew
##ARMA(1,0) GARCH(1,1) SKEWED T##
modelsst=ugarchspec(variance.model = list(model = "sGARCH", garchOrder = c(1, 1)),
mean.model = list(armaOrder = c(1,0), include.mean = TRUE),
distribution.model = "sstd"
)
gsst11= ugarchfit(spec=model, solver = "hybrid", data=return)
I extract the paremeters in order to compute conditional mean and conditional variance.
mu11=gsst11@fit\$coef[1]
ar11=gsst11@fit\$coef[2]
omega11=gsst11@fit\$coef[3]
alpha11=gsst11@fit\$coef[4]
beta11=gsst11@fit\$coef[5]
skewst11=gsst11@fit\$coef[6]
nut11=gsst11@fit\$coef[7]
arma_st11[t +1]= mu11 + ar11*(return-mu11)
sigma2_st11[t+1]= omega11 + alpha11 (return- arma_st11[t+1])^2 + beta11sigma2_st11[t]
sigma_st11[t+1]=sqrt(sigma2_st11[t+1])
VaRst1[t+1]= arma_st11[t+1] + sigma_st11[t+1] * qsstd(p1, nu=nust11, xi=skewst11) * value
Thanks!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.