EconStatsCraft › Correlogram (ACF / PACF)

Correlogram (ACF / PACF)

Autocorrelation and partial autocorrelation with Ljung–Box tests. Use it to choose the AR and MA orders of an ARIMA model.

What it needs

The intuition

The ACF asks "how much does today resemble k days ago?" - but that includes everything transmitted through the days in between. The PACF strips those out and asks about the DIRECT link only. An AR(1) has an ACF that decays forever (yesterday affects today, which affects tomorrow) but a PACF that cuts off after lag 1, because there is no direct channel beyond one period.

When to use it

Before fitting ARIMA, and after fitting anything to a time series to check the residuals are white noise.

Where the estimator comes from

\rho_k=\gamma_k/\gamma_0 where \gamma_k=\operatorname{Cov}(y_t,y_{t-k}). The partial autocorrelation \phi_{kk} is the coefficient on y_{t-k} in a regression of y_t on all lags up to k, obtained recursively by the Durbin–Levinson algorithm. Ljung–Box aggregates the first m autocorrelations: Q=n(n+2)\sum_{k=1}^{m}\hat{\rho}_k^2/(n-k), asymptotically \chi^2(m).

The model

\rho_k=\frac{\operatorname{Cov}(y_t,y_{t-k})}{\operatorname{Var}(y_t)}\qquad Q=n(n+2)\sum_{k=1}^{m}\frac{\hat{\rho}_k^{2}}{n-k}

What it assumes

Statistical properties

How to read the output

A worked reading

ACF significant to lag 6, PACF cutting off after lag 2, on a series that the unit-root test called I(0). That is an AR(2) signature: start from ARIMA(2,0,0) and let BIC check whether an MA term improves it.

Symptom → diagnosis → what to do

If you see thisIt meansDo this
ACF decays very slowly, stays positiveUnit rootDifference first, then re-read the correlogram
ACF cuts off after q, PACF decaysMoving averageMA(q)
PACF cuts off after p, ACF decaysAutoregressiveAR(p)
Both decay geometricallyMixedARMA - use information criteria to choose orders
Large negative spike at lag 1 after differencingOver-differencedReduce d by one
Spikes at 4, 8, 12 (quarterly)SeasonalityAdd seasonal terms or seasonally difference

Common mistakes

Where to read this properly

See also

This is step 2 of Box–Jenkins. Step 1 is the unit-root test that sets d; step 3 is ARIMA estimation.

Related Time series - one series

Time-varying coefficients (Kalman) · Unit root tests · ARIMA / SARIMA · Rolling-origin cross-validation · Theta method · Unobserved components · STL forecasting · Forecast combination · Markov regime switching · Change frequency (resample) · ARCH / GARCH volatility · Decompose & filter · Spectral analysis · Exponential smoothing · Forecast accuracy

All analyses

Charts

Line chart · Area chart · Bar chart · Stacked bar · Scatter plot · Bubble chart · Histogram · Box plot · Pie chart · Heat map · Rebased to 100 · Lorenz curve and Gini

Maps

World map · Bivariate map · Flow map · India - state map · India - district map

Explore

Descriptive statistics · Summary by group · Two-way table · Classical statistical tests

Regression

Multiple regression (OLS) · Logit / Probit · Tobit (censored) · Truncated regression · Multinomial logit · Ordered logit / probit · Quantile regression · Poisson / Negative binomial

Time series - one series

Time-varying coefficients (Kalman) · Unit root tests · Correlogram (ACF / PACF) · ARIMA / SARIMA · Rolling-origin cross-validation · Theta method · Unobserved components · STL forecasting · Forecast combination · Markov regime switching · Change frequency (resample) · ARCH / GARCH volatility · Decompose & filter · Spectral analysis · Exponential smoothing · Forecast accuracy

Time series - several series

Yield curve (Nelson–Siegel / Svensson) · Dynamic factor model · Dynamic regression (ARIMAX) · Structural VAR · VAR · Granger causality · Cointegration · VECM · ARDL & bounds test

Panel data

Panel regression · Panel cointegration tests · Heterogeneous panel: Mean Group & PMG · Gravity model of trade · Dynamic panel GMM · Panel diagnostics · Panel unit-root tests

Multivariate statistics

Principal components (PCA) · Factor analysis · Cluster analysis

Marketing research

Conjoint analysis · MaxDiff (best–worst scaling) · TURF - reach of a product line · Price sensitivity (Van Westendorp) · Market basket analysis · Perceptual map · Scale reliability (Cronbach’s alpha) · Key driver analysis

Causal

Spatial autocorrelation · Spatial regression · Heckman selection · Instrumental variables (2SLS) · Difference-in-differences · Staggered difference-in-differences · Regression discontinuity · Matching & weighting · Oaxaca–Blinder decomposition

Finance & risk

Black–Scholes option pricing · Bond price, duration & convexity · Merton distance to default · EMI / home loan planner · CAPM / beta estimation · Multi-factor model · Portfolio optimization · Value at Risk & Expected Shortfall · Performance & drawdown · Time value of money & NPV/IRR · Equity valuation (DDM, FCF, residual income) · Cost of capital (WACC) · Binomial option pricing · Option strategies (payoff & profit) · Forwards, futures & swaps · Credit risk & Basel capital · Extreme value theory (tail risk)

Actuarial

Life table · Life annuity · Life insurance pricing · Chain ladder reserving · Buhlmann credibility · Survival analysis · Mortality graduation · Aggregate loss model · Ruin probability · Multi-state Markov model · Loss severity fitting

Tests & breaks

Monte Carlo experiment · F-test, Wald & Chow · Structural breaks & stability

Machine learning

Regression vs machine learning · Ridge / Lasso / Elastic Net · Random forest · Gradient boosting

Open the workspace →

Starting engine…

EconStatsCraft rigorous, plain-spoken econometrics

Econometrics that explains itself.

Regression, panel data, time series and the whole battery of tests. Every result is followed by a verdict you can defend.

Load a dataset to see it here.