Lyrics
Analyzin' two time series, we gotta find
Which one be followin' di other in time
Identify di leadin', laggin' flow
Many methods, we got to know
Cross-Correlation Function
Di Cross-Correlation Function, it measures di scene
Between two time series, it's di mean
As a function of di lag, one relative to di other
Help identify lead-lag, one behind di other
Steps:
Compute di cross-correlation, dat's di vibe
Between di two time series, side by side
Identify di lag, cross-correlation maximized
Positive lag means first series leads, second series lags behind
Granger Causality Test
Granger causality test, it’s a quest
Determine if one series can predict di rest
Not imply true causality, but helps di relations
Identify lead-lag, between di vibrations
Steps:
Formulate hypotheses, null an' alternative
Null:
𝑋
X don't Granger-cause
𝑌
Y, that's declarative
Alternative:
𝑋
X Granger-cause
𝑌
Y, it’s decisive
Fit a VAR model, perform di test, be precise
Dynamic Time Warping (DTW)
Dynamic Time Warping, algorithm it be
Measures similarity, in time series, you see
May vary in speed, align in non-linear fashion
Useful to identify, which series follows which, no distraction
Steps:
Apply DTW algorithm, to di time series
Analyze di warping path, understand di theories
Di alignment, lead-lag patterns clear
Which series follows which, no need to fear
Lead-Lag Regression
Lead-lag regression, a method to mention
Fit a model, regression, pay attention
One time series regressed, on lagged values of di other
Analyze coefficients, di lead-lag discover
Steps:
Create lagged versions, of di second series, man
Fit regression model, first series as di main plan
Dependent variable, second series lagged be
Analyze coefficients, significance, di lead-lag we see
Outro
Analyzin' time series, we find di flow
Lead-lag relations, now we know
Methods and steps, laid out in rhyme
Power of analysis, standin' test of time