Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Interpretation of the ccf function from statsmodel python library

I am using the ccf (cross correlation) as follows:

from statsmodels.tsa.stattools import ccf
print ccf(np.array(X), np.array(Y), unbiased=True)

I am having a hard time interpreting the results. My question is whether the output is the cross-correlation at all possible lags or is this the result of multiplications of all data points at lag 0? The documentation does not provide any insights on this issue. Thanks in advance.

like image 273
user823743 Avatar asked Feb 24 '26 22:02

user823743


1 Answers

I believe it is for all possible lags. Since the core is np.correlate('full'). However, in my case I got value close to -2. Which does not seem right.

like image 62
Jurijs Avatar answered Feb 27 '26 10:02

Jurijs