StatsBase crosscor standard deviation does not have lags applied

In StatsBase.crosscor!() why is the standard deviation for normalisation calculated before the lag is applied to the input vectors, rather than after?
This doesn’t appear to follow a standard correlation formula.

Cross-Correlation with StatsBase crosscor answer does not make sense

This is a common source of confusion, see issues

2 Likes