title: ADF rejects null hypothesis after first difference but statsmodels SARIMAX gives error? python 3
body: <p>Augmented Dickey Fuller rejects the null hypothesis on the data but SARIMAX says that the data is non-stationary??</p>
  
  <p>I have a dataset which is non-stationary; so I take the first difference and test it with ADF test which rejects the null hypothesis. But when I try to use that data in statsmodels.tsa.statespace.sarimax.SARIMAX I get an error which reads: <code>Non-stationary starting autoregressive parameters found with "enforce_stationarity" set to True</code>. So I have to difference it again in the SARIMAX function (or is it class I'm not sure?)</p>
  
  <pre><code>def ADF(array, sig_level=0.05):
      result = adfuller(array)
      print('ADF t-Statistic: %f' % result[0])
      print('p-value: %f' % result[1])
      print('Critical Values:')
      for key, value in result[4].items():
          print('\t%s: %.3f' % (key, value))
      if result[1] &gt;= sig_level:
          rej = False
      else:
          rej = True
      print("reject H_0:", rej)
  
  ADF(SP_diff)
  SP_fit = SARIMAX(SP, trend='c', order=(1,1,1)).fit(disp=False) # doesnt work
  SP_fit = SARIMAX(SP, trend='c', order=(1,2,1)).fit(disp=False) # works
  </code></pre>
  
  <p>I'm confused why ADF gives the wrong result or what is going on here in general?</p>
  
  <p>The data is SP500 monthly from .loc["2009-01-01":"2018-12-01"] from yahoo finance:</p>
  
  <p>SP = [825.880005, 735.090027, 797.869995, 872.8099980000001, 919.1400150000001, 919.320007, 987.4799800000001, 1020.6199949999999, 1057.079956, 1036.189941, 1095.630005, 1115.099976, 1073.869995, 1104.48999, 1169.430054, 1186.689941, 1089.410034, 1030.709961, 1101.599976, 1049.329956, 1141.199951, 1183.26001, 1180.550049, 1257.640015, 1286.119995, 1327.219971, 1325.829956, 1363.609985, 1345.199951, 1320.640015, 1292.280029, 1218.890015, 1131.420044, 1253.300049, 1246.959961, 1257.599976, 1312.410034, 1365.680054, 1408.469971, 1397.910034, 1310.329956, 1362.160034, 1379.319946, 1406.579956, 1440.670044, 1412.160034, 1416.180054, 1426.189941, 1498.109985, 1514.680054, 1569.189941, 1597.569946, 1630.73999, 1606.280029, 1685.72998, 1632.969971, 1681.550049, 1756.540039, 1805.810059, 1848.359985, 1782.589966, 1859.449951, 1872.339966, 1883.949951, 1923.569946, 1960.22998, 1930.6700440000002, 2003.369995, 1972.290039, 2018.050049, 2067.560059, 2058.899902, 1994.9899899999998, 2104.5, 2067.889893, 2085.51001, 2107.389893, 2063.110107, 2103.840088, 1972.180054, 1920.030029, 2079.360107, 2080.409912, 2043.939941, 1940.2399899999998, 1932.22998, 2059.73999, 2065.300049, 2096.949951, 2098.860107, 2173.600098, 2170.949951, 2168.27002, 2126.149902, 2198.810059, 2238.830078, 2278.8701170000004, 2363.639893, 2362.719971, 2384.199951, 2411.800049, 2423.409912, 2470.300049, 2471.649902, 2519.360107, 2575.26001, 2584.840088, 2673.610107, 2823.810059, 2713.830078, 2640.8701170000004, 2648.050049, 2705.27002, 2718.3701170000004, 2816.290039, 2901.52002, 2913.97998, 2711.73999, 2760.169922, 2506.850098]</p>