# GARCH Use the Normal errors formula, build an iterative equation for predicting the variances in R

My arma model had residual from which I created GARCH model in R.My question is how using Normal errors formula, build an iterative equation for predicting the variances & figure a way to obtain the last ah and the last σh from the output.

I know variance formula in GARCH is given by Sigma(t)=omega+alphae(t-1)+Bsigma(t-1)

I am confused as to how to find value for e(t-1) and sigma(t-1)

I am sharing my R code below for reference:

#Generating data for 4 years
data1<-getSymbols("KO",from="2017-08-01", to="2021-08-01",auto.assign = F)
#Checking for Unit root/stationary
adf.test(data1$KO.Adjusted) logdata1<-na.omit(diff(log(data1$KO.Adjusted)))
#Order of my arma model is (4,1)
arma_model<-arima(logdata1,c(4,0,1))
#Checking for presence of residual
arma_model$residuals #Creating standard garch with arma order(4,1) and distribution as normal x=ugarchspec(variance.model=list(garchOrder=c(1,1)),mean.model=list(armaOrder=c(4,1)),distribution.model = "norm")  I am confused how to proceed forward and how to calculate variance and last ah and the last σh. Kindly advise how to proceed forward. Explain using R. • Use ugarchforcast (for one step ahead prediction) and ugarchboot (for$h>1\$ prediction). Aug 6, 2021 at 0:08
• Also relate to stats.stackexchange.com/questions/201933/… for some formula Aug 6, 2021 at 0:10
• @Richard Hardy I saw your old post stats.stackexchange.com/questions/201933/… your input will help me out.Kindly advise how to calculate variance and last ah and the last σh in R?My code is above Aug 6, 2021 at 22:04
• I saw your post but am busy with other stuff. Sorry. Aug 7, 2021 at 5:55