I am reading a statsmodels tutorial for generating and fitting ARMA models here. The author says

The conventions of the arma_generate function require that we specify a 1 for the zero-lag of the AR and MA parameters

What does zero-lag mean?

  • $\begingroup$ It appears to simply be incredibly badly designed software and not anything meaningful, statistically. Why would I always have to add a 1 and negate? Why doesn't the function do it for me? Who comes up with this stuff? $\endgroup$
    – Chris Haug
    Jan 9, 2017 at 1:41

1 Answer 1


This is the representation as a lag polynomial and not as regression coefficients, i.e. standard ARMA(p, q) can be represented as

A(L) $y_t$ = B(L) $u_t$

where L is the lag operator and A(L) is the lag polynomial A(L)$y_t$ = $a_0$ $y_t$ + $a_1$ $y_{t-1}$ + ... + $a_p$ $y_{t-p}$ and analogously for B(L) $u_t$.

The first term is not lagged, i.e. it corresponds to zero lag, and $a_0$ and $b_0$ are usually set to 1.

The advantage is that operations for polynomials apply and can be directly used, for example the MA representation is $A^{-1}$(L) * B(L).

A few reasons for implementing it this way:

  • it is the standard way for specifying the theory and computation with lag polynomials
  • scipy.signal.lfilter uses it that way
  • numpy or scipy polynomial functions can directly be applied to it
  • you can calculate the FFT representation of the lag polynomial and maybe a few more reasons.

Note, that the estimation models use the more appropriate coefficient representation because those are the parameters that we estimate and use for prediction.

Another note: Vector autoregressive models, VAR, especially structural VAR or vector ARMA models are defined in a similar way where the coefficients in the lag polynomials are matrices:

A(L) $Y_t$ = B(L) $U_t$

In structural VAR the lag zero coefficient matrix A(0) is usually not the identity matrix in contrast to univariate ARMA, but might have off-diagonal elements.

A small deviation to text books that break symmetry for left hand side and right hand side polynomials is that the left hand side is often specified with negative sign on coefficients with lag greater than zero:

A(L)$y_t$ = $a_0$ - $a_1$ $y_{t-1}$ - ...

(in reply to the comment: I came up with this for statsmodels when I had more of a theoretical than applied background.)

The process class has an additional constructor based on the regression coefficients for the lag polynomials http://www.statsmodels.org/stable/generated/statsmodels.tsa.arima_process.ArmaProcess.from_coeffs.html

addition: constant, trend and explanatory variables

If the process does not have mean zero or has additional explanatory variables, then they can be modeled in two different ways, (assuming x includes constant, trend and explanatory variables)

(1) A(L) $y_t$ = $x_t$ * $\beta$ + B(L) $u_t$


(2) A(L) ($y_t$ - $x_t$ $\beta$) = B(L) $u_t$

ARMA, the new SARIMAX and most other times series models in statsmodels implement version (2) which essentially corresponds to a linear model (like OLS) with ARMA errors. If there is only a constant, then it differs just in scaling of the by the sum of lag coefficients between the two versions. If there are time varying explanatory variables, then those have different lagged effects on the dependent variables, i.e. (2) can be rewritten as

A(L) $y_t$ = A(L) $x_t$ $\beta$ + B(L) $u_t$


$y_t$ = $x_t$ $\beta$ + $A(L)^{-1}$ $B(L) u_t$

If we define the residual $e_t$ = $A(L)^{-1}$ B(L) $u_t$, then it follows a zero mean ARMA process
A(L) $e_t$ = B(L) $u_t$

Hyndman has some explanations for this, and some arguments in favor of (2).

  • $\begingroup$ Thanks so much, this makes sense! Does this mean I can't generate non-zero mean processes? $\endgroup$
    – user369210
    Jan 12, 2017 at 0:21
  • $\begingroup$ Also, perhaps my background is lacking, but in, $A(L)y_t = a_0 + a_1 y{_t-1} + \cdots + a_p y_{t-p}$, why is there no $y_t$ being multiplied by $a_0$? $\endgroup$
    – user369210
    Jan 12, 2017 at 0:26
  • $\begingroup$ my mistake, the first term is a_0 y_t. I fixed it. $\endgroup$
    – Josef
    Jan 12, 2017 at 2:12
  • $\begingroup$ I added a section at the end about the question in the first comment. $\endgroup$
    – Josef
    Jan 12, 2017 at 2:36
  • 1
    $\begingroup$ @MichaelChernick I think the root of the confusion is the interface of the ARIMA simulating function in this software: you have to add this extra "1" in front of your coefficients. This is an implementation detail that is leaking through: underneath the hood it is using a signal processing function where having a coefficient other than 1 in front of $y_t$ is useful. It is not useful in the ARIMA context, so you wouldn't hear of "zero-lag" anywhere in the theory, hence the confusion. $\endgroup$
    – Chris Haug
    Jan 12, 2017 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.