
X<-Gold$Rr.1000
#hist(Gold$Rr.1000)
spec = ugarchspec(variance.model=list(model="eGARCH"),distribution.model = "std")
mod = ugarchroll(spec, data = X, n.ahead = 1, 
                 n.start = 1000,  refit.every = 1000, refit.window = "moving", 
                 solver = "solnp", 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, conf.level = 0.95) 
report(X.bktest, type="fpm")


garchspec(variance.model=list(model="sGARCH"),distribution.model = "norm")
roll = ugarchroll(spec, data = X, n.start = 100,  refit.every = 500, refit.window = "moving",
                  solver = "solnp", fit.control = list(),
                  calculate.VaR = TRUE, VaR.alpha = c(0.01, 0.025, 0.05), keep.coef = TRUE)
 
     
     
     