# Statsmodels says ARIMA is not appropriate because series is not stationary, how is it testing that?

I have a time series that I am trying to model with Python's statsmodels ARIMA api. When I apply the following:

from statsmodels.tsa.arima_model import ARIMA
model = ARIMA(data['Sales difference'].dropna(), order=(2, 1, 2))
results_AR = model.fit(disp=-1)


I get the following error:

ValueError: The computed initial AR coefficients are not stationary
You should induce stationarity, choose a different model order, or you can


But I have already differenced the data:

data['Sales'] = data['Sales'] - data['Sales'].shift()


What more can I do to induce stationarity?

And what test is the ARIMA api running to determine that the data is not stationary?

My original time series looks like:

The differenced time series looks like:

And my ACF plot looks like:

• The premise is wrong. Differencing in the ARIMA family allows for polynomial trends to be removed a therefore allowing some nonstationary models to be converted to stationary. The ARMA family does not allow differencing and do not include non-stationary models. – Michael R. Chernick Dec 14 '16 at 3:49
• @MichaelChernick but I am calling the ARIMA api, not the ARMA one. Am I missing something? – Skander H. - Reinstate Monica Dec 14 '16 at 4:25