Estimation and Forecasting an MA Model

Time Series Analysis in Python

Rob Reider

Adjunct Professor, NYU-Courant Consultant, Quantopian

Estimating an MA Model

  • Same as estimating an AR model (except order=(0,0,1))
    from statsmodels.tsa.arima.model import ARIMA
    mod = ARIMA(simulated_data, order=(0,0,1))
    result = mod.fit()
    
Time Series Analysis in Python

Forecasting an MA Model

from statsmodels.graphics.tsaplots import plot_predict
fig, ax = plt.subplots()
data.plot(ax=ax)
plot_predict(res, start='2012-09-27', end='2012-10-06', ax=ax)
plt.show()

Time Series Analysis in Python

Let's practice!

Time Series Analysis in Python

Preparing Video For Download...