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?