ARMA#
- class cultivars.univariate.box_jenkins.ARMA(endog, *, order, trend='c')[source]#
Stationary ARMA(p, q): no differencing, no seasonal block, no regressors.
The model \(\phi(L)\,(y_t - \mu_t) = \theta(L)\,\varepsilon_t\) on the series as given. Stationarity and invertibility are enforced by the reparameterization, so a series with a unit root is fitted with an autoregressive root pushed against the boundary rather than beyond it; the
stabilityrecord’s largest modulus is the tell, andARIMAwithd = 1the remedy.- Parameters:
- Raises:
SpecificationError – If
orderis not two non-negative integers or the trend is unrecognized.DimensionError – If the series is too short for the specification.
See also
Example
>>> import numpy as np >>> rng = np.random.default_rng(0) >>> e = rng.standard_normal(600) >>> y = np.zeros(600) >>> for t in range(1, 600): ... y[t] = 0.7 * y[t - 1] + e[t] + 0.4 * e[t - 1] >>> res = ARMA(y, order=(1, 1)).fit() >>> res.is_stationary and res.is_invertible True >>> bool(abs(res.ar_params[0] - 0.7) < 0.1), bool(abs(res.ma_params[0] - 0.4) < 0.1) (True, True)
On a random walk the enforced stationarity shows as a root at the boundary:
>>> walk = ARMA(np.cumsum(y), order=(1, 0)).fit() >>> bool(walk.ar_params[0] > 0.99), walk.is_stationary (True, True)
Attributes#
The validated endogenous series. |
|
The validated exogenous regressors, or |
|
The non-seasonal order |
|
The seasonal order |
|
The deterministic specification. |
Methods#
|
Estimate by exact maximum likelihood. |