I am trying to run a garch model and to forecast the variance and then calculate the prices of an index by using bootstrapping. Therefore, I got:
garchspec1 <- ugarchspec( mean.model = list(armaOrder = c(0,0)),
variance.model = list(model = "sGARCH"),
distribution.model = "norm")
garchfit1 <- ugarchfit(data = SP500returns , spec = garchspec)
garchforecast1 <- ugarchforecast(fitORspec = garchfit, n.ahead = 20)
sigmas = sigma(garchforecast1)
residuals = residuals(garchfit1)
nus = residuals/sigmas
When I try to divide residuals/sigmas, I got this error.