statsmodels.tsa.stattools.ccovf

statsmodels.tsa.stattools.ccovf(x, y, unbiased=True, demean=True)[source]

Calculate the crosscovariance between two series.

Parameters
x, yarray_like

The time series data to use in the calculation.

unbiasedbool, optional

If True, then denominators for autocovariance is n-k, otherwise n.

demeanbool, optional

Flag indicating whether to demean x and y.

Returns
ndarray

The estimated crosscovariance function.

Notes

This uses np.correlate which does full convolution. For very long time series it is recommended to use fft convolution instead.