StabilityAssessment.is_invertible#

classmethod StabilityAssessment.is_invertible(ma_coeffs, *, tol=1e-8)[source]#

Is an MA/ARMA invertible? (companion of the MA polynomial, roots inside).

The same strict companion test as is_stationary(), applied to moving-average coefficients. It therefore reads its argument in the autoregressive convention and tests \(1 - M_1 z - \cdots - M_q z^q\).

Warning

A moving-average polynomial written the usual way, \(\theta(L) = 1 + \theta_1 L + \cdots + \theta_q L^q\), must be passed negated. Passing theta itself tests a different polynomial and returns a wrong verdict whenever the two disagree; for q == 1 they happen to coincide. The fitted results negate internally, so this applies only to direct calls.

Parameters:
  • ma_coeffs (ArrayLike) – MA coefficients M_1, ..., M_q in the same layout as AR coefficients; shape (q,) or (q, k, k). In terms of \(\theta(L)\) above, \(M_j = -\theta_j\). Empty coefficients are invertible.

  • tol (float) – Modulus tolerance.

Return type:

bool

Returns:

True iff all companion eigenvalues lie strictly inside the unit circle.

Raises:
  • SpecificationError – If tol is negative and ma_coeffs is non-empty.

  • DimensionError – If ma_coeffs is neither rank 1 nor a stack of square matrices.

  • NumericalError – If ma_coeffs contains non-finite values, or the eigenvalue computation returns them.

Example

\(1 + 1.5 L + 0.6 L^2\) is invertible, which the method reports only for the negated coefficients:

>>> import numpy as np
>>> theta = np.array([1.5, 0.6])
>>> _StabilityAssessment.is_invertible(-theta)
True
>>> _StabilityAssessment.is_invertible(theta)
False