I am trying to for loop an AR(k)-GARCH(1,1) model, however it seems that I am getting same log-likelihoods and AICs. I believe that my code is fine, since I manually checked the iterations. Is there any statistically theoretical reason why is this happening?

garch_models = pd.DataFrame(columns=['AIC','Log-Likelihood'],index=garch_columns)
for i in np.arange(len(garch_models)):
    AEX_GARCH_0 = arch_model(log_r['AEX'], lags=i, vol='Garch', p=1, o=0, q=1, dist='t')
    res_AEX = AEX_GARCH_0.fit()
    garch_models.iloc[i,0]= res_AEX.aic
    garch_models.iloc[i,1]= res_AEX.loglikelihood

Here's what I am getting in the data frame: enter image description here

Here are two of the iterations (so I can save some space): enter image description here


You need to add mean = 'AR' (see documentation):

arch_model(log_r['AEX'], mean='AR', lags=i, vol='Garch', p=1, o=0, q=1, dist='t')

Try to check the model specification of AEX_GARCH_0 for the different iterations.

  • $\begingroup$ Thanks a lot. I don't know how I didn't see this before.... silly me $\endgroup$ – deblue Apr 29 '19 at 15:05
  • $\begingroup$ No problem. Sometimes we just miss something. Please accept the answer :) $\endgroup$ – Johan Stax Jakobsen Apr 29 '19 at 17:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.