Skip to content Skip to sidebar Skip to footer

Non Invertible Of A ARIMA Model

I am trying to write a code to generate a series of arima model and compare different models.The code is as follow. p=0 q=0 d=0 pdq=[] aic=[] for p in range(6): for d in range

Solution 1:

Use try: ... except: ... to catch the exception and continue

for p in range(6):
    for d in range(2):
        for q in range(4):
            try:
                arima_mod=sm.tsa.ARIMA(df,(p,d,q)).fit(transparams=True)

                x=arima_mod.aic

                x1= p,d,q
                print (x1,x)

                aic.append(x)
                pdq.append(x1)
            except:
                pass
                # ignore the error and go on

Post a Comment for "Non Invertible Of A ARIMA Model"