Question about the GARCH model formula implementation in Python

There is a function to find the likelihood of given GARCH(1,1) model parameters where sigma2 is expressed as the following:

```

for t in range(1, len(returns)):

      sigma2 = gamma * parkinson[0] + alpha * returns[t-1]**2 + beta * parkinson[t]

```

Why isn't the third term parkinson[t-1]?

 

 

Hello Ben,



Thank you for your query. We will look into this and get back soon.



Thanks. 

Hi Ben, 

Thanks for pointing this out, the notebook has been updated. The correct expression for sigma2 now includes the term parkinson[t-1] instead of the previously incorrect parkinson[t]. 



Best regards!