I am trying to implement a QMLE estimation of GARCH(2,2) model as a side project.
We can represent GARCH(2,2) as follows: \begin{aligned} r_{t} &= \mu_{t} + \epsilon_{t}, \\ \mu_{t} &= 0, \\ \epsilon_{t} &= \sigma_{t}z_{t}, \quad z_{t} \sim N(0,1), \\ \sigma_{t+1}^{2} &= \omega + \alpha_{1}\epsilon_{t}^{2} + \beta_{1}\sigma_{t}^{2} + \alpha_{2}\epsilon_{t-1}^{2} + \beta_{2}\sigma_{t-1}^{2}. \end{aligned} Using standard arguments, we can write the log-likelihood as $$ \sum_{t}^{T}l(\theta|r_{t}) = \sum_{t=1}^{T}\log\bigg[ \frac{1}{\sqrt{2\pi\sigma^{2}_{t}(\theta)}}\exp\{\frac{r_{t}^{2}}{2\sigma(\theta)_{t}^{2}}\}\bigg] $$ where $\theta$ is just the vector of parameters.
This would be estimated, at each time $t$ by plugging in $\omega + \alpha_{1}\epsilon_{t-1}^{2} + \beta_{1}\sigma_{t-1}^{2} + \alpha_{2}\epsilon_{t-2}^{2} + \beta_{2}\sigma_{t-2}^{2}$ instead of $\sigma_{t}^{2}$ and $r_{t}^{2}$ (data). However, my problem is basically that I cannot understand whether
- $r_{t}^{2}$ is the data that we have (which would be logical) or
- if $r_{t}^{2}$ is simply generated from previous iterations of $\sigma_{t}^{2}$, as $r_{t}^{2} = \epsilon_{t}^{2} = z_{t}^{2}\sigma_{t}^{2}=z_{t}^{2}(\omega + \alpha_{1}\epsilon_{t-1}^{2} + \beta_{1}\sigma_{t-1}^{2} + \alpha_{2}\epsilon_{t-2}^{2} + \beta_{2}\sigma_{t-2}^{2})$.
The latter doesn't make sense, and it means I only need to initialize the process and then I wouldn't need any data to fit it, and this is exactly what confuses me.
If the former is true, then how can we say that $r_{t} = \epsilon_{t}$?
I have already checked this post, which was quite helpful, but still does not answer my question.
Perhaps it has to something with conditioning on information at time $t$, but I am struggling to clearly understand this.