pyhctsa.operations.correlation.bicorrelation¶
-
pyhctsa.operations.correlation.bicorrelation(y, max_lag=
'hinich', max_ar_order=10)¶ Third-order dependence over a plane of lag pairs: Hinich’s bicorrelations.
The bicorrelation at the lag pair \((r, s)\) is the normalised third-order moment \(E[z_t z_{t+r} z_{t+s}]\) of the standardised series. Hinich [1] proposed testing the residuals of a fitted linear model for third-order dependence through the bicorrelations over the triangle \(0 < r < s \le L\), combined into a portmanteau statistic, with \(L = N^c\) for some \(0 < c < 0.5\); Hinich and Patterson [2] and Brooks and Hinich [3] apply it to financial series. Every cell is zero for a linear Gaussian process and for any series with i.i.d. innovations, and a single nonzero cell at an arbitrary lag pair (a bilinear coupling \(x_t = e_t + c\, e_{t-P} e_{t-Q}\), say) is invisible to the autocorrelation and to third-order statistics at fixed short lags.
The series is first prewhitened by an autoregressive model of order chosen by AIC (as in
residual_autocorr_scan()), and the residuals are z-scored. Each cell is the mean of the products \(z_t z_{t+r} z_{t+s}\) divided by its standard error, estimated from the sample standard deviation of the products (a self-normalised form of Hinich’s \(G(r, s)\), which is robust to heavy tails), so each cell is approximately standard normal under the null. Reversing time maps the cell \((r, s)\) to \((s - r, s)\), so the difference of these two cells measures time-reversal asymmetry in the lag plane, a time-domain counterpart of the bispectral reversibility test of Hinich and Rothman [4].- Parameters:¶
- y : array-like¶
Input time series.
- max_lag : int or 'hinich', optional¶
Largest lag \(L\).
'hinich'(default) uses \(\lfloor m^{0.4} \rfloor\) (c = 0.4, the usual choice in applications of the test) capped at 20, with \(m\) the number of residuals.- max_ar_order : int, optional¶
Largest order of the prewhitening autoregression. Default is 10.
- Returns:¶
‘H_z’: Hinich’s portmanteau statistic \(H = \sum G(r, s)^2\) over the \(M = L(L-1)/2\) cells, as the approximate z-score \((H - M)/\sqrt{2M}\).
’max_abs’: the largest \(|G(r, s)|\).
’asym_max_abs’: the largest \(|G(r, s) - G(s - r, s)|/\sqrt{2}\) over the cells with \(r < s - r\).
All NaN if \(L < 3\) or the residuals are constant.
- Return type:¶
dict
References