0
$\begingroup$

I have lots of pairs of timeseries e.g.:

Timeseries 1 Timeseries 2

I am trying to get an idea of how correlated they are (the black fit lines rather than the data themselves). I thought that one way to do this would be to cross-correlate them and if the correlation is highest (or lowest) when they overlap fully (i.e. there is no lag), then this would show me that there is some correlation (or anti-correlation).

When I do this, the highest (or lowest) correlation is very often at zero lag - but this just seem to be because when the time-series are not fully overlapping, the cross correlation is summing fewer data points.

Is it invalid for me to use cross-correlation in this way because there are trends in my data?

Is there something better I can do?

$\endgroup$
  • $\begingroup$ Build a multiple time series model? $\endgroup$ – kjetil b halvorsen Jul 1 '18 at 8:04
  • $\begingroup$ How are you fitting the lines? If the same model in both, could you statistically compare coefficients? $\endgroup$ – benxyzzy Jul 6 '18 at 19:56
0
$\begingroup$

Your approach is broadly valid.

It's not the case that:

this just seem to be because when the time-series are not fully overlapping, the cross correlation is summing fewer data points.

The value of the correlation does not depend on the N. Of course the accuracy of the estimate does depend on N, but not the expected value.

Another frequent approach in time series is also the check the correlation of the trend - often used in financial time series. Then each new data point i would be: ( x_t=i / x_t=(i-1) )

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.