ARFIMAResult#

class cultivars.univariate.fractional_integration.ARFIMAResult(*, endog, fittedvalues, resid, llf, nobs, n_params, order, truncation, d, mean, ar_params, ma_params, sigma2)[source]

Bases: _SummaryMixin, _SeriesMixin, _ComparisonMixin, _StationarityMixin, _InvertibilityMixin

A fitted fractionally integrated ARMA.

The model

\[\phi(L)\,(1 - L)^d\,(y_t - \mu) = \theta(L)\,\varepsilon_t, \qquad \varepsilon_t \sim N(0, \sigma^2),\]

with the fractional operator expanded as

\[(1 - L)^d = \sum_{k=0}^{\infty} \pi_k L^k, \qquad \pi_k = \frac{\Gamma(k - d)}{\Gamma(-d)\,\Gamma(k + 1)},\]

cut at truncation terms. The autocorrelations decay as \(k^{2d-1}\) rather than geometrically, so d is the memory parameter: zero is a short-memory ARMA, \(0 < d < 0.5\) a stationary long-memory process, \(d \ge 0.5\) non-stationary, and \(d = 1\) a unit root. The record carries the estimate of d with the short-memory block and the innovation variance; the fitted values and residuals are on the fractionally differenced scale, where the model is an ARMA, not on the levels.

Variables:
  • endog – The full observed series.

  • fittedvalues – One-step fitted values on the fractionally differenced series.

  • resid – One-step residuals on the fractionally differenced series.

  • llf – Maximized joint log-likelihood.

  • nobs – Observations the likelihood was evaluated on.

  • n_params – Free parameter count, including d and the variance.

  • order – Short-memory (p, q).

  • truncation – Length of the fractional-difference filter.

  • d – Estimated fractional integration order.

  • mean – Estimated mean, or None when trend == "n".

  • ar_params – Short-memory AR coefficients.

  • ma_params – Short-memory MA coefficients.

  • sigma2 – Innovation variance.

Note

The estimator confines d to \((-0.499, 0.499)\) through a scaled tanh, so every fit satisfies |d| < 0.5 and the stationarity verdict reduces to the autoregressive block; a series with a unit root comes back with d pinned at the boundary and is_stationary still True. Read d near \(\pm 0.499\) as the data asking for integer differencing first, and is_mean_reverting as a condition the estimator cannot violate. ar_params and ma_params are searched through the partial autocorrelations, so the stability and invertibility verdicts verify the transform. Standard errors are not yet reported by this estimator.

See also

  • ARFIMA – the specification that produces this.

  • ARMAResult – the d = 0 case with the exact likelihood.

  • FIGARCHResult – long memory in the variance rather than the level.

  • unit_roots – whether integer differencing is wanted before a fractional fit.

References

Granger, C. W. J., & Joyeux, R. (1980). An introduction to long-memory time series models and fractional differencing. Journal of Time Series Analysis, 1(1), 15-29.

Hosking, J. R. M. (1981). Fractional differencing. Biometrika, 68(1), 165-176.

Sowell, F. (1992). Maximum likelihood estimation of stationary univariate fractionally integrated time series models. Journal of Econometrics, 53(1-3), 165-188.

Example

An ARFIMA(0, d, 0) with \(d = 0.3\), simulated by filtering white noise with the weights of \((1 - L)^{-0.3}\):

>>> import numpy as np
>>> from cultivars.engine._core._transforms import _fractional_difference_weights
>>> rng = np.random.default_rng(0)
>>> n = 600
>>> w = _fractional_difference_weights(-0.3, n)
>>> y = np.convolve(rng.standard_normal(n + 300), w)[300 : 300 + n]
>>> res = ARFIMA(y, order=(0, 0)).fit()
>>> list(res.params), res.nobs, res.n_params
(['mean', 'd', 'sigma2'], 600, 3)
>>> bool(abs(res.d - 0.3) < 0.1), res.is_stationary, res.has_long_memory
(True, True, True)
>>> res.fittedvalues.shape == res.endog.shape
True

Private methods#

_comparison_label()

Specification label used when this result appears in a ranking.

_from_fit(fit, model)

Assemble the public result from a raw fit and its specification.

_summary_table()

Structured summary rendered by every display path.