Time Series Analysis in Python
Rob Reider
Adjunct Professor, NYU-Courant Consultant, Quantopian
from statsmodels.graphics.tsaplots import plot_acf
plot_acf(x, lags= 20, alpha=0.05)
alpha
sets the width of confidence intervalalpha=0.05
alpha=1
from statsmodels.tsa.stattools import acf
print(acf(x))
[ 1. -0.6765505 0.34989905 -0.01629415 -0.02507013 0.01930354
-0.03186545 0.01399904 -0.03518128 0.02063168 -0.02620646 -0.00509828
...
0.07191516 -0.12211912 0.14514481 -0.09644228 0.05215882]
Time Series Analysis in Python