Foundations✓ Mathematical
◆ The PatternMeasuring how a series remembers its own past
The autocorrelation function (ACF) measures correlation between a series and its lagged values. The partial autocorrelation function (PACF) removes the influence of intermediate lags. Together they reveal the memory structure and guide ARIMA order selection.
ACF(k) = Cov(yt, yt−k) / Var(yt)
ACF at lag k is the Pearson correlation between a series and itself shifted by k steps. Values outside the confidence band are significant.
// Interactive — ACF and PACF plots
AR Order (p)1
MA Order (q)0
| Pattern | ACF | PACF | Model |
|---|---|---|---|
| Slow decay | Geometrically decaying | Cuts off at lag p | AR(p) |
| Sharp cutoff | Cuts off at lag q | Geometrically decaying | MA(q) |
| Both decay | Decays | Decays | ARMA(p,q) |
# Python — ACF/PACF plots from statsmodels.graphics.tsaplots import plot_acf, plot_pacf fig, axes = plt.subplots(1, 2, figsize=(12, 4)) plot_acf(series, lags=30, ax=axes[0]) plot_pacf(series, lags=30, method='ywm', ax=axes[1]) plt.tight_layout()
Pattern bridge: ACF/PACF diagnoses for time series are like correlation analysis in statistics — but with yourself across time. In markets, momentum indicators are practical autocorrelation measurements.