statsmodels.tsa.stattools.ccovf¶
-
statsmodels.tsa.stattools.ccovf(x, y, adjusted=
True, demean=True, fft=True)[source]¶ Calculate the cross-covariance between two series.
- Parameters:¶
- x : array_like¶
The time series data to use in the calculation.
- y : array_like¶
The time series data to use in the calculation.
- adjusted : bool, optional¶
If True, then denominators for cross-covariance are n-k, otherwise n.
- demean : bool, optional¶
Flag indicating whether to demean x and y.
- fft : bool, default True¶
If True, use FFT convolution. This method should be preferred for long time series.
- Returns:¶
The estimated cross-covariance function: the element at index k is the covariance between {x[k], x[k+1], …, x[n]} and {y[0], y[1], …, y[m-k]}, where n and m are the lengths of x and y, respectively.
- Return type:¶
ndarray