HomeMathematicsCross-Correlation Explorer: Finding Lead-Lag Relationships Between Two Time Series

Cross-Correlation Explorer: Finding Lead-Lag Relationships Between Two Time Series

Interactive 3D simulator: generate two related time series with a hidden lag between them, then watch the cross-correlation function (CCF) sweep across lags and pinpoint which series leads and by how many steps.

Mathematics3DAdvanced60 FPS📱 Mobile-adapted
time-series-analysis-mathematics ↗ Open standalone

This simulator builds two related synthetic time series — series A, and series B constructed as a lagged, noisy copy of A — then sweeps every candidate lag through the cross-correlation function (CCF) to find which series leads and by how many steps. The two series render as parallel 3D ribbons and the CCF values render as a color-coded instanced bar chart across the search window, with the tallest bar marking the detected lag. It is the exact tool time-series analysts reach for when two related signals (rainfall and river flow, ad spend and sales, one sensor and another downstream) need their lead-lag relationship measured rather than assumed, distinct from autocorrelation (which only ever compares a series to itself).

⚙ Under the hood

Generate two related synthetic time series with a hidden lag between them, then watch the cross-correlation function (CCF) sweep across lags in live 3D bar charts to pinpoint which series leads and by how many steps.

time seriescross-correlationlead-lagstatisticssignal analysisforecasting

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)