ARFIMAResult#
- class cultivars.univariate.fractional_integration.ARFIMAResult(*, endog, fittedvalues, resid, llf, nobs, n_params, order, truncation, d, mean, ar_params, ma_params, sigma2)[source]#
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
truncationterms. The autocorrelations decay as \(k^{2d-1}\) rather than geometrically, sodis 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 ofdwith 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
dand the variance.order – Short-memory
(p, q).truncation – Length of the fractional-difference filter.
d – Estimated fractional integration order.
mean – Estimated mean, or
Nonewhentrend == "n".ar_params – Short-memory AR coefficients.
ma_params – Short-memory MA coefficients.
sigma2 – Innovation variance.
Note
The estimator confines
dto \((-0.499, 0.499)\) through a scaledtanh, so every fit satisfies|d| < 0.5and the stationarity verdict reduces to the autoregressive block; a series with a unit root comes back withdpinned at the boundary andis_stationarystillTrue. Readdnear \(\pm 0.499\) as the data asking for integer differencing first, andis_mean_revertingas a condition the estimator cannot violate.ar_paramsandma_paramsare 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– thed = 0case 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
Attributes#
|
|
|
|
|
|
Maximized joint Gaussian log-likelihood. |
|
Observations the likelihood was evaluated on. |
|
the mean if estimated, |
|
Short-memory |
|
Number of fractional-difference weights applied. |
|
Fractional integration order, inside \((-0.499, 0.499)\). |
|
Estimated level \(\mu\), or |
|
|
|
|
|
Innovation variance. |
|
Whether |
|
AIC, BIC, and HQIC derived from the likelihood and parameter count. |
|
Full eigenvalue verdict for the moving-average polynomial. |
|
Whether every companion eigenvalue of the MA block is inside the unit circle. |
|
Whether shocks die out, which holds on the wider range |
|
Whether the process is covariance stationary. |
|
Estimated parameters keyed by display name, in table order. |
|
Full eigenvalue verdict for the autoregressive polynomial. |
Methods#
|
Rank this result against others by an information criterion. |
|
Test this result as the restricted model against a nesting one. |
|
The estimation summary, renderable as text, HTML, or a dataframe. |
|
The aligned per-observation outputs as plain numpy arrays. |
|
The aligned per-observation outputs as a |
The aligned per-observation outputs as a |