I have $N$ time series which have unknown time offsets relative to each other. I want to estimate the $(N - 1)$ time offsets, $\tau_{i,i+1}$, which maximise the sum of the cross-correlations between the time series. How should I do this?
Notes:
The MathWorks documentation provides an example of this. However, this example aligns the time series one-by-one, and does not make use of the redundant information from the $N(N - 1)/2$ cross-correlations, so it is not the best possible solution.