Cross- correlation between two non-stationary time series

I have two time series that are growing together. I want to measure if these series are growing similarly together with some lag.

Originally, I was thinking I would just take the cross-correlation between the two time series. However, I had not realized that the given that these two series are growing means that they are not stationary!! cross-correlation is only defined for stationary series, correct? Is there another simple method that I can use to capture the similarity, dependent on some lag, of the two time series?

I'm not interested in modelling the series but rather just capturing the similarity between the two.

• hi: you would need to de-trend them and then calculate the cross-correlation. ( which needs stationarity of the two processes ). the problem is that the standard de-trending approach assumes a constant slope. if you the series that doesn't have a constant slope then it's a problem because there's no easy way to figure out what the trend is so that it can be removed. others hopefully can say something more useful. generally, most ( if not all ?, I'm not sure ) procedures are going to require stationarity unless you look at using an ecm-cointegration approach which doesn't require it. – mlofton Jul 16 '15 at 19:23
• one correction: kalman filtering is another approach that wouldn't require stationarity. but like ecms-cointegration, it's another world altogether. I recommend enders for basic time series and Hamilton for heavy details on almost every time-series topic ( and good references in the back of each chapter for even more depth ). good luck. – mlofton Jul 16 '15 at 19:45
• I kind of feel like cross-correlation or cross-covariance shold still be a meaningful value as it is just a measure of how the series travel together. It can measure it at time t both series have large values and time t+1 one has small and the other one has large values (i.e not very much correlation). This is especially true if both series are in the same scale. Am I missing something? – DanRoDuq Jul 16 '15 at 20:09
• M intuition is that calculating cross-correlation without de-trending causes the same problems as running a regression on two trending series. there's no constant variance ( it's increasing over time ) so all the standard-classical statistical tools go out the window. if you take two series that are trending and regress one on the other, you'll often obtain significant t-stats even when there's no relationship. ( it's called spurious regression )., I think you'll have that same problem here if you don't de-trend. But hopefully others will chime in. – mlofton Jul 17 '15 at 15:43
• Hi: More simply speaking, ( keep the topic on your issue rather than spurious regression ), you need a constant mean for cross-correlation to have any reasonable meaning and you don't have a constant mean in a trending series. I hope that helps and simplifies the issue. – mlofton Jul 17 '15 at 15:47