Different measures of covariances

Suppose I have two random time series variables, $$X$$ and~$$Y,$$ with a particular realization $$x_{t}$$ and $$y_{t}.$$ Suppose I find that $$cov\left(X,Y\right)>0.$$ What does this imply for i) $$cov(\triangle X,\triangle Y)$$ where $$\triangle$$ is the (first) difference operator with respect to time $$t$$ and ii) $$cov(\triangle log(X),\triangle log(Y))$$ where the $$\triangle log$$ corresponds to approximate percentage change in $$X$$ and $$Y$$ across adjacent time periods.What is the intuition? An example would be very helpful.

• – Noah
Commented May 26 at 22:35

I will work with correlations, as covariances can be altered simply by rescaling all the examples.

With respect to sub-question i: Nothing. Consider the following two examples.

First, $$X = Y$$. In this case, $$\mathrm{cor}(X,Y) = 1$$ and $$\mathrm{cor}(\Delta X, \Delta Y) = 1$$ as well.

Second, a series such as $$\Delta X = C + (1,2,\dots, 100)$$, with $$\Delta Y = C - (1,2, \dots, 100)$$. Clearly, $$\mathrm{cor}(\Delta X, \Delta Y) = -1$$, but as $$C \to \infty$$, $$\mathrm{cor}(X,Y) \to 1$$. For a coded version of this example:

dx <- 1000 + 1:100
dy <- 1000 - 1:100
x <- 1 + cumsum(dx)
y <- 1 + cumsum(dy)

> cor(x,y)
[1] 0.9996651
> cor(dx,dy)
[1] -1


Clearly, we can get any correlation for $$(\Delta X, \Delta Y)$$ given a positive correlation between $$X$$ and $$Y$$ by working with examples such as these.

What is happening here? The trend itself dominates the differences between the trends, so the two series are highly correlated because they both trend upwards, but one trend is increasing, and the other may be increasing or decreasing (but not going negative). In the first case, the two trends are both a) positive and b) increasing, so both the original series and the trends are highly positively correlated, but in the second, they are both a) positive and b) one is increasing, one is decreasing, so, although the original series are still positively correlated, the trends are negatively correlated.

With respect to sub-question ii), there is also no relationship. We can engage in a similar pair of examples as above.

First, if $$X=Y$$, then $$\Delta \ln X = \Delta \ln Y$$, so both correlations are equal to one.

Second, consider the code fragment that implements an example very similar in spirit to the one above:

dlnx <- 2 + (1:100)/1000
dlny <- 2 - (1:100)/1000

x <- exp(cumsum(dlnx))
y <- exp(cumsum(dlny))

> cor(x,y)
[1] 0.9996189
> cor(dx,dy)
[1] -1


From these examples, it should be clear that simply knowing there is a positive correlation (covariance) between two variables tells us nothing about the correlations between their first differences or their log differences.

• Note that what jbowman showed above is the exact reason why log(price) series are differenced before analyzed. If this is not done, then it can look as if they are strongly correlated when this is only due to trending. Of course, this can also be true of other series besides log(prices ) but my experience is with that case. Commented May 27 at 3:07
• Got it! Could another way of saying this be that the "level" effect of X,Y might dominate any "difference" effect? The reason I have been confused is because a regression of Y=Xb+e will deliver identical estimates of b in first differences.. Commented May 27 at 23:10
• Not quite... it's that the trend effect can dominate small differences between the trends, so that the two series are highly correlated because they both trend upwards, but one trend is increasing and the other may be increasing or decreasing (but not going negative). In the first case, the two trends are both a) positive and b) increasing, so they are highly positively correlated, but in the second, they are both a) positive and b) one is increasing, one is decreasing, so they are negatively correlated. Commented May 27 at 23:39
• @mlofton RIght. But then just because two series are trending positively should not disqualify their positive covariance, right? Commented Jun 2 at 14:32
• It means that the covariance might well be due to a third factor, not any actual relationship between the two variables themselves. Prices are a good example—prices of almost everything tend to go up over a long period of time, but this doesn't mean that the long-run prices of sugar and lithium have any real relationship with each other. Commented Jun 2 at 14:47