ARMAFIGARCH#
- class cultivars.univariate.conditional_variance.ARMAFIGARCH(endog, *, ar_lags=1, ma_lags=1, mean='constant', truncation=1000)[source]
Bases:
_FractionalVarianceModel[ARMAFIGARCHResult]ARMA mean with a fractionally integrated variance, estimated jointly.
The combination the constant-mean
FIGARCHcannot express: short-memory dynamics in the level alongside long-memory dynamics in the volatility, which is the usual empirical picture for a return series sampled finely enough to show mean reversion. The mean is theARMAGARCHone, searched through the partial autocorrelations whenma_lags > 0and as an unconstrained lag regression otherwise; the variance is theFIGARCHfilter. Both mean defaults are one, soARMAFIGARCH(y, ar_lags=2)keeps a moving-average term.- Variables:
_truncation – The retained number of weights.
_endog – The validated series.
_ar_lags – Conditional-mean AR order.
_ma_lags – Conditional-mean MA order.
_const – Whether the mean carries an intercept.
- Parameters:
- Raises:
SpecificationError – If an order or
truncationis not a non-negative integer (truncationat least 1), ormeanis not one of the two choices.DimensionError – If
endogis not one-dimensional or is shorter than the mean orders plus four.NumericalError – If
endogcontains non-finite values.
See also
ARMAFIGARCHResult– whatfit()returns.FIGARCH– the same variance under a constant or zero mean, with the filter written out.ARMAGARCH– the same mean over a geometric-decay variance.
Example
>>> import numpy as np >>> rng = np.random.default_rng(0) >>> y = np.zeros(600) >>> e = rng.standard_normal(600) >>> for t in range(1, 600): ... y[t] = 0.7 * y[t - 1] + e[t] >>> res = ARMAFIGARCH(y, ar_lags=1, ma_lags=0).fit() >>> res._comparison_label(), bool(abs(res.ar_params[0] - 0.7) < 0.1) ('AR(1)-FIGARCH(1, d, 1)', True) >>> res.is_stationary, res.is_covariance_stationary (True, False)