Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Chapter 9 — ACF and PACF

In previous chapters, we introduced dependence, persistence, and stationarity.

We now develop two of the most important tools in time series analysis:

These tools help us understand:


Learning Objectives

By the end of this chapter, you should be able to:


9.1 Correlation Across Time

In time series analysis, we study relationships such as:

Corr(Xt,Xth)Corr(X_t, X_{t-h})

where (h) is the lag.


9.2 Autocovariance and ACF

For a weakly stationary process:

γ(h)=Cov(Xt,Xth)\gamma(h) = Cov(X_t, X_{t-h})

The autocorrelation function (ACF) is:

ρ(h)=γ(h)γ(0)\rho(h) = \frac{\gamma(h)}{\gamma(0)}

where (\gamma(0) = Var(X_t)).


9.3 White Noise: No Dependence

Simulation

Source
import numpy as np
import matplotlib.pyplot as plt
from statsmodels.graphics.tsaplots import plot_acf, plot_pacf

np.random.seed(10101)

wn = np.random.normal(0, 1, 300)

plt.figure(figsize=(10,4))
plt.plot(wn)
plt.title("White Noise")
plt.savefig("figs/ch9/wn.png", dpi=300, bbox_inches="tight")
plt.close()   # replace with plt.show()
White Noise

ACF and PACF

Source
fig, ax = plt.subplots(1,2, figsize=(10,4))

plot_acf(wn, lags=30, ax=ax[0])
ax[0].set_title("ACF (White Noise)")

plot_pacf(wn, lags=30, ax=ax[1], method="ywm")
ax[1].set_title("PACF (White Noise)")

plt.savefig("figs/ch9/wn_acf_pacf.png", dpi=300, bbox_inches="tight")
plt.close()   # replace with plt.show()
ACF PACF

9.4 Persistent Series: Random Walk

Simulation

Source
np.random.seed(123)

w = np.random.normal(0, 1, 300)
x = np.cumsum(w)

plt.figure(figsize=(10,4))
plt.plot(x)
plt.title("Random Walk")

plt.savefig("figs/ch9/rw.png", dpi=300, bbox_inches="tight")
plt.close()   # replace with plt.show()
Random Walk

ACF and PACF

Source
fig, ax = plt.subplots(1,2, figsize=(10,4))

plot_acf(x, lags=40, ax=ax[0])
ax[0].set_title("ACF (Random Walk)")

plot_pacf(x, lags=40, ax=ax[1], method="ywm")
ax[1].set_title("PACF (Random Walk)")

plt.tight_layout()

plt.savefig("figs/ch9/rw_acf_pacf.png", dpi=300, bbox_inches="tight")
plt.close()   # replace with plt.show()
ACF PACF

9.5 Interpreting ACF Patterns

White Noise

Persistent Series

Oscillatory Behavior


9.6 Partial Autocorrelation (PACF)

The ACF measures total dependence, including indirect effects.

The PACF isolates direct dependence.


9.7 ACF vs PACF (Intuition)


9.8 Visual Comparison

Source
np.random.seed(42)

# AR(1)
phi = 0.7
ar = np.zeros(300)

for t in range(1, 300):
    ar[t] = phi * ar[t-1] + np.random.normal()

fig, ax = plt.subplots(2,2, figsize=(10,6))

plot_acf(ar, lags=30, ax=ax[0,0])
ax[0,0].set_title("ACF (AR(1))")

plot_pacf(ar, lags=30, ax=ax[0,1], method="ywm")
ax[0,1].set_title("PACF (AR(1))")

plot_acf(wn, lags=30, ax=ax[1,0])
ax[1,0].set_title("ACF (White Noise)")

plot_pacf(wn, lags=30, ax=ax[1,1], method="ywm")
ax[1,1].set_title("PACF (White Noise)")

plt.tight_layout()

plt.savefig("figs/ch9/acf_pacf_.png", dpi=300, bbox_inches="tight")
plt.close()   # replace with plt.show()
ACF PACF

9.9 Model Identification (Rule of Thumb)

ModelACFPACF
AR(p)decayscuts off at p
MA(q)cuts off at qdecays
ARMAdecaysdecays
White noisenonenone

9.10 Confidence Bands

ACF/PACF plots include approximate bounds:

±2T\pm \frac{2}{\sqrt{T}}

9.11 Economic and Financial Insight


9.12 Looking Ahead

ACF and PACF help diagnose dependence patterns.

Next, we study:

which explain whether persistence is temporary or permanent.


Key Takeaways

Concept Check

Basic

  1. What is autocorrelation?

  2. What does the autocorrelation function (ACF) measure?

  3. What is a lag?


Intuition

  1. Why do we examine correlations across time in a time series?

  2. What does a high autocorrelation at lag 1 suggest?

  3. What does it mean if autocorrelations decay slowly?


Intermediate

  1. What is the difference between:

    • ACF

    • PACF

  2. Why is PACF useful in time series analysis?

  3. What does it mean if autocorrelations are close to zero at all lags?


Interpretation

  1. What pattern would you expect in the ACF of:


Challenge

  1. Suppose the ACF shows strong values at many lags.


Interpretation & Practice

  1. ACF values are close to zero at all lags.

    • What type of process is this likely?

    • Why?

  2. ACF shows a large value at lag 1, then quickly drops to zero.

    • What does this suggest about dependence?

    • What type of process might generate this?

  3. ACF decays slowly over many lags.

    • What does this indicate?

    • Why might this suggest nonstationarity?

  4. PACF shows a sharp cutoff after lag 1.

    • What does this imply?

    • Why is this useful for model identification?

  5. ACF alternates between positive and negative values.

    • What type of behavior might this indicate?

    • What does this suggest about the series dynamics?


Finance Interpretation

  1. A return series shows very low autocorrelation.

    • What does this imply about predictability?

    • How does this relate to market efficiency?

  2. A volatility series shows strong autocorrelation.

    • What does this suggest?

    • Why is this important in finance?


Challenge

  1. Suppose both ACF and PACF show no clear pattern.

    • What type of process might this be?

    • Why is model identification difficult in this case?


Numerical Practice

Identifying Autocorrelation

  1. Consider the following series:

    2, 4, 6, 8, 10


  1. Consider:

    3, −1, 2, −2, 1, 0


Lag Interpretation

  1. Suppose:

Corr(Xt,Xt1)=0.8Corr(X_t, X_{t-1}) = 0.8

  1. Suppose:

Corr(Xt,Xt1)0Corr(X_t, X_{t-1}) \approx 0

ACF Patterns

  1. Match the pattern:

To the likely process:


Challenge

  1. Suppose a series has:




Appendix 9A — Understanding PACF

The PACF can be interpreted as the correlation between:

after removing the effect of intermediate lags.

This can be obtained by:

  1. Regressing XtX_t on intermediate lags

  2. Regressing XthX_{t-h} on the same variables

  3. Taking the correlation between residuals