pyhctsa.operations.extreme_events.extremogram

pyhctsa.operations.extreme_events.extremogram(y, quantile=0.95, max_lag=100)

Serial dependence of extremes: the largest value of the extremogram over a range of lags.

The extremogram of Davis and Mikosch [1] is the analogue of the autocorrelation function for extreme events: for the event that \(|x_t|\) exceeds a high threshold \(u\), it is the conditional probability that the event recurs \(k\) samples later,

\[\chi(k) = P(|x_{t+k}| > u \mid |x_t| > u),\]

estimated by the fraction of exceedances that are followed by another at lag \(k\). With \(u\) the quantile of \(|x_t - \bar{x}|\), \(\chi(k)\) is the empirical lag-\(k\) tail-dependence coefficient at that level (Ledford and Tawn [2] give diagnostics of extremal dependence of this kind). Under independence of the extremes it is the exceedance rate \(\hat{p} \approx 1 -\) quantile at every lag, whatever the dependence of the bulk of the distribution, and it detects extremes that recur in time even when the autocorrelation of \(|x|\) is zero.

The function scans \(k = 1, ..., K\), with \(K = \min(\) max_lag \(, \lfloor N/10 \rfloor)\). At each lag, with \(n_k\) exceedances that have a sample \(k\) steps later and \(c_k\) of them followed by another exceedance, the count’s excess over its expectation under independence is expressed as a Poisson z-score, \(z_k = (c_k - n_k \hat{p})/\sqrt{n_k \hat{p}}\). Davis, Mikosch and Cribben [3] study the sampling variability of the extremogram and give bootstrap confidence bands for it.

Parameters:
y : array-like

Input time series.

quantile : float, optional

Quantile of \(|x_t - \bar{x}|\) that sets the threshold, in (0, 1). Default is 0.95.

max_lag : int, optional

Largest lag scanned, further limited to a tenth of the series length. Default is 100.

Returns:

  • ‘max_chi’: the largest \(\chi(k)\).

  • ’max_z’: the largest \(z_k\).

  • ’peak_lag’: the lag at which \(z_k\) is largest.

All NaN if the series is shorter than 10 samples or has fewer than two exceedances.

Return type:

dict

References