I want to do one step ahead in-sample forecasts. My data can be found here. This is just a data frame with the date as the rownames.
I specify my model and do the fit and show the plots with
library(rugarch)
model<-ugarchspec(variance.model = list(model = "sGARCH", garchOrder = c(1, 1)),
mean.model = list(armaOrder = c(0, 0), include.mean = FALSE),
distribution.model = "norm")
modelfit<-ugarchfit(spec=model,data=mydata)
plot(modelfit)
Now I want to do one-step-ahead in sample forecasts of my cond. mean and cond. volatility.
I therefore use the ugarchfit command:
ugarchforecast(modelfit,n.ahead=1,data=mydata)
But this is only one value for the last date. So I want to have this for every data starting from the beginning and up to my final values. These should be 1-step-ahead forecasts which use the specified model parameters and my data. How can I get this?