ARMAFIGARCH#

class cultivars.univariate.conditional_variance.ARMAFIGARCH(endog, *, ar_lags=1, ma_lags=1, mean='constant', truncation=1000)[source]#

ARMA mean with a fractionally integrated variance, estimated jointly.

The combination the constant-mean FIGARCH cannot 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 the ARMAGARCH one, searched through the partial autocorrelations when ma_lags > 0 and as an unconstrained lag regression otherwise; the variance is the FIGARCH filter. Both mean defaults are one, so ARMAFIGARCH(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:
  • endog (ArrayLike) – The series.

  • ar_lags (int) – Conditional-mean autoregressive order.

  • ma_lags (int) – Conditional-mean moving-average order.

  • mean (str) – "constant" or "zero".

  • truncation (int) – Infinite-order truncation lag for the fractional filter.

Raises:
  • SpecificationError – If an order or truncation is not a non-negative integer (truncation at least 1), or mean is not one of the two choices.

  • DimensionError – If endog is not one-dimensional or is shorter than the mean orders plus four.

  • NumericalError – If endog contains non-finite values.

See also

  • ARMAFIGARCHResult – what fit() 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)

Attributes#

ar_lags

The conditional-mean autoregressive order.

endog

The validated endogenous series.

has_constant_mean

Whether a mean intercept is estimated.

ma_lags

The conditional-mean moving-average order.

mean_order

The conditional-mean order (ar_lags, ma_lags).

truncation

The infinite-order truncation lag.

Methods#

fit()

Estimate mean and variance jointly by Gaussian maximum likelihood.