Statistics Glossary → Cross-correlation function (CCF)
Cross-correlation function (CCF)concept
A function that computes the correlation between two time series when one is shifted relative to the other by different lags, showing which series moves ahead of the other and by how many periods.
For a lag k, the cross-correlation is defined as r(k) = cor(x[t + k], y[t]). k takes positive and negative values: a large correlation at some positive k suggests that x moves like y does, k periods later, so y leads x; a large correlation at a negative k suggests the opposite. The CCF is therefore used to find leading indicators and to explore lagged relationships between two series. Limits of roughly ±2/√n show the random fluctuation expected between unrelated series.
An important trap is that if both series carry strong autocorrelation or trends of their own, large cross-correlations appear at many lags even when there is no real relationship between them. Before interpreting, the series should therefore be made stationary (for example by differencing) and preferably pre-whitened, that is, an ARIMA filter fitted to x should be applied to both series. Cross-correlation does not show causation; at most it suggests that one series carries information about the other's future.
An everyday example
An ice-cream company looks at the relationship between air temperature and sales. In weekly data, the cross-correlation peaks at the lag where sales follow temperature one week behind. This suggests that sales rise in the week after a hot week (perhaps because shops restock), but because both series are seasonal, the seasonal effect should be removed first.
In MerQur
In the Time Series analysis, the 'Cross-correlation (CCF) series' option gives r(k) = cor(x[t + k], y[t]) at lags k = -K..K for the chosen second series.
Analyses where this concept appears
Related concepts
Autocorrelation (ACF) and partial autocorrelation (PACF) functions