02 — Foundations

Autocorrelation (ACF/PACF)#

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
PatternACFPACFModel
Slow decayGeometrically decayingCuts off at lag pAR(p)
Sharp cutoffCuts off at lag qGeometrically decayingMA(q)
Both decayDecaysDecaysARMA(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.
← Previous
Stationarity
Open in the full reader, with the topic sidebar →