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, yarray_like
The time series data to use in the calculation.
- adjustedbool,
optional
If True, then denominators for cross-covariance are n-k, otherwise n.
- demeanbool,
optional
Flag indicating whether to demean x and y.
- fftbool,
default
True
If True, use FFT convolution. This method should be preferred for long time series.
- Returns:¶
ndarray
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.
Last update:
Dec 23, 2024