I am comparing the results from arima_model and ar_model. Here is what I can't understand:
- Why are the resulting coefficients different? Is it because of the estimation method? (Different settings of the method property of fit() don't give identical results)
- After getting the coefficients and backtesting the fitted results I match those of the AR(1) but not of ARIMA(1). Why?
- What is ARIMA really doing in this simplest setting, isnt it supposed to be able to reproduce AR?
```
import pandas_datareader as pdr
import datetime
aapl = pdr.get_data_yahoo('AAPL', start=datetime.datetime(2006,1,1), end=datetime.datetime(2020,6,30))
aapl = aapl.resample('M').mean()
aapl['close_pct_change'] = aapl['Close'].pct_change()
from statsmodels.tsa.arima_model import ARIMA
mod = ARIMA(aapl['close_pct_change'][1:], order=(1,0,0))
res1 = mod.fit(method='mle')
print(res1.summary())
from statsmodels.tsa.ar_model import AutoReg, ar_select_order
mod = AutoReg(aapl['close_pct_change'][1:], 1)
res2 = mod.fit()
print(res2.summary())
fitted_check1 = res1.params[0] + res1.params[1]*aapl['close_pct_change'][1:].shift(1)
print(fitted_check1[1:] - res1.fittedvalues)
fitted_check2 = res2.params[0] + res2.params[1]*aapl['close_pct_change'][1:].shift(1)
print(fitted_check2[1:] - res2.fittedvalues)
```