SVResult.half_life#

property SVResult.half_life: float[source]#

Periods for a log-variance shock to halve, log 0.5 / log phi.

Returns inf when phi is outside (0, 1).

Example

>>> import numpy as np
>>> from cultivars.engine._internals._simulators import _simulate_stochastic_volatility
>>> rng = np.random.default_rng(0)
>>> y, _ = _simulate_stochastic_volatility(
...     300, mu=-1.0, phi=0.95, sigma2=0.05, mean=0.0, rng=rng
... )
>>> res = SV(y, mean="zero").fit()
>>> bool(5.0 < res.half_life < 60.0)
True
>>> bool(np.isclose(res.half_life, np.log(0.5) / np.log(res.phi)))
True