I am newbie in R, and trying to estimate the volatility using GARCH model. I have daily return time series of some stocks in DAX30.
My question is, how the initial variance is calculated when I have a return time series with 20 elements as the input and lets say they are daily returns in January. Is it the variance of the time series? In this case, I will only have the variance for the last day of the month and the returns for the whole month. Since the time points of returns and volatility will not fit, how will be the model estimated then?
I'd like to use the 20-day variance for the 1st of January as the initial variance, how should I code it so that it takes whatever I want as the initial variance? I checked the source code for initializing parameters but I could not see how it is done.