pyhctsa.operations.correlation.nonlinear_autocorr_abs_surrogate_ratio

pyhctsa.operations.correlation.nonlinear_autocorr_abs_surrogate_ratio(y, taus, num_surrs=10, random_seed=0, tau=1)

Absolute nonlinear autocorrelation relative to its value for linear Gaussian surrogates.

A variant of nonlinear_autocorr() [2] with absval=True that removes its dependence on the marginal distribution and the linear autocorrelation, so that it responds to nonlinear dependence between the magnitudes of the values (e.g. volatility clustering). It computes the same average on the Gaussian ranks \(g\) of the series (each value replaced by \(\Phi^{-1}((r - 1/2)/N)\), \(r\) its rank, then z-scored) and divides it by its mean over phase-randomised (Fourier) surrogates of \(g\) [1], which are Gaussian linear processes with the same periodogram:

\[R = \frac{\langle |g_t \prod_{k=1}^{m} g_{t-\tau_k}| \rangle} {\frac{1}{S} \sum_{s=1}^{S} \langle |g^{(s)}_t \prod_{k=1}^{m} g^{(s)}_{t-\tau_k}| \rangle},\]

where each surrogate \(g^{(s)}\) is z-scored. \(R \approx 1\) for any strictly increasing transform of a linear Gaussian process; \(R > 1\) means that large magnitudes cluster in time more than the linear correlation implies. Slow changes in the variance of the series also raise \(R\). Normalising a statistic by its values on surrogates follows the surrogate-data method [1]. The surrogates come from the portable generator bf_random() with a fixed seed, so the result is deterministic.

Parameters:
y : array-like

The input time series.

taus : array-like of int

The non-negative lags of the factors other than \(x_t\), as in nonlinear_autocorr().

num_surrs : int, optional

The number of phase-randomised surrogates \(S\) (default 10).

random_seed : int, optional

The seed of the surrogates’ random phases (default 0).

tau : int or str, optional

The unit of the lags, in samples: an integer, or a rule for get_tau() (e.g. 'ac1e') applied to the analysed series (the Gaussian ranks), so that the result stays rank-invariant. The lags are tau * taus, over every time point (all tau phases of the series sampled every tau samples). Default 1. NaN when a rule cannot set the delay.

Returns:

The ratio \(R\) (NaN if the series is not longer than the largest lag, has fewer than four samples, or all its values are tied).

Return type:

float

References