statsmodels.tsa.stattools.ccf

statsmodels.tsa.stattools.ccf(x, y, adjusted=True, fft=True)[source]

The cross-correlation function.

Parameters
x, yarray_like

The time series data to use in the calculation.

adjustedbool

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

fftbool, default True

If True, use FFT convolution. This method should be preferred for long time series.

Returns
ndarray

The cross-correlation function of x and y.

Notes

If adjusted is true, the denominator for the autocovariance is adjusted.