# Can I use the geometric mean instead of the arithmetic mean to calculate the covariance between yields of different stocks?

so I have closing prices for 2 different stocks and I want to analyze the covariance between their yields. The first thing I did was figure out the yields so I can compare those.

Now I can use the arithmetic mean to calculate the covariance between, but shouldn't I be using the geometric mean when analyzing yields? I've tried both, and both lead to almost exactly the same result (about 2.4% difference). Which one should I use in my paper?

I'm leaning towards the geometric mean as it seems more correct to me, but I couldn't find anyone else having done the same so far.

(If I take the first closing price I have and multiply it by the geometric means to the n-th power, n being the trading days up until the last closing price I have, I get the exact closing price on that day, as I should. If I do the same with the arithmetic mean, I get an error of almost 70€. That's why I'm leaning toward the geometric mean even for things like variance and covariance.)

Best regards, and thanks in advance!

Edit: Regarding the yields: I have a bunch of closing prices, say for example,

1. 6754.20
2. 6764.83
3. 6766.67
4. 6655.63

and I calculated their daily yield as the closing price divided by the closing price of the previous day, minus 1. (e.g. 6754.20/6764.83-1 = -0.00157..)

• Using the geometric mean would, of course, not compute the covariance, since covariance is defined as using the arithmetic mean. That said, if you computed the covariance of the logarithms of the yields, that would yield something like the logarithm of what you are asking for. Without knowing what a yield is, it is not clear to me if that calculation would make any sense. – Thomas Andrews Jul 1 '12 at 15:22
• I added some info regarding the way I calculated the yields. Basically what I meant it to be is the daily growth in %. I think that should be right. The question I'm asking myself is whether it makes any sense to calculate the covariance based on those yields, as the arithmetic mean is obviously the wrong way to interpret growth factors like these, right? Thanks for your help! – Felix Jul 1 '12 at 18:26
• Normally what you are calling "yield" is called price return (in this case, daily price return). Also make sure you're computing the price of the later day minus the prior day, not vice versa (that is, subtracting 1 after dividing is equivalent to subtracting the prices, then normalizing to the prior day's price). – ely Jul 4 '12 at 19:50

Taking the geometric mean of "yield" quantities like $6754.20/6764.83-1$ in your example would be a bad idea. Should a stock have the same closing price for two days in a row, its yield turns into zero, turning the geometric mean into zero, regardless of what happened on other days. Negative yields will be a problem too.
But if you wanted to work with ratios $6754.20/6764.83$, the geometric mean makes sense enough. As Thomas Andrews noted, the switch to geometric mean amounts to taking logarithms of your data: that is, $\log (6764.83/6754.20)$, $\log (6766.67/6764.83)$, and so on. For $x$ close to $1$, $\log x\approx x-1$, which is why the effect is minor. An attractive feature of the logarithms of ratios, alluded to in your parenthetical remark, is that their arithmetic mean depends only on the prices of the first and last days of the observation period.