# Is cross-correlation valid for time-series such as these (with trends)?

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

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?

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

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) )