Skip to content
All library documents

Specifying ARMA and ARIMA Orders in Statsmodels

Article Quant Q&A · Author: user1243255

Summary

The document clarifies how model order parameters map to autoregressive, differencing, and moving-average components in the Statsmodels time-series interface. For ARIMA, the order tuple follows the sequence of AR terms, differences, then MA terms; the example identifies the tuple corresponding to the stated ARIMA model. For ARMA, the tuple contains the AR and MA orders.

This is a narrow implementation clarification rather than a discussion of model selection, estimation, or forecasting. It gives no guidance on choosing orders, checking stationarity, interpreting fitted models, or accounting for software-version changes, so users should consult the documentation for the version they are using before applying the syntax.

Key ideas

  • An ARIMA order tuple lists autoregressive order, differencing order, and moving-average order in that sequence.
  • An ARMA order tuple lists autoregressive order followed by moving-average order.
  • The document explains parameter notation but does not describe how to select suitable model orders.

Tags

Full text
# Python statsmodel ARMA question


# Python statsmodel ARMA question












I am reading through the documentation of statsmodel package in python from the link

> The (p,q) order of the model for the number of AR parameters, differences, and MA parameters to use.

How do I specify the order for ARMA(2,5); ARIMA(2,1,4), AR(2) and MA(6)? I am not able to figure from the document explanation.

## Answer by Bob Jansen (score 1, accepted)

https://quant.stackexchange.com/a/26253

For `ARIMA(2,1,4)` you would need to use the ARIMA model, as described here.

You would call with something like this

```
ARIMA(endog, order = (2, 1, 4))
```

where `endog` is your endogenous variable and the tuple given for `order` follows the convention AR, Differencing, MA.

For `ARMA(1, 1)` you could just use `ARMA(endog, order = (1, 1))`.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.