
####My data is related to Gold returns###

X<-Gold$Gold
X
hist(X)
plot(X,type="l")

#n.ahead=1
#data(Gold)
#spec = ugarchspec(variance.model=list(model="egarch"),distribution.model = "norm")
X.bktest = ugarchroll(spec, data = X, 
                 n.start = 100,  refit.every = 500, refit.window = "moving", 
                 solver = "hybrid", fit.control = list(),
                 calculate.VaR = TRUE, VaR.alpha = c(0.01, 0.025, 0.05),
                 keep.coef = TRUE)
report(X.bktest, type="VaR", VaR.alpha = 0.01)
report(X.bktest, type="VaR", VaR.alpha = 0.025)
report(X.bktest, type="VaR", VaR.alpha = 0.05)



