Correlation and diversification

Correlation in investing explained: compute a correlation coefficient by hand, see why diversification needs it below 1, and why it rises in sell-offs.

Part of the Statistics for Investors and Traders track on Agenticks. About 12 minutes, written for a intermediate reader.

Read first: Volatility and standard deviation, Diversification in plain language.

Last reviewed .

Key takeaways

Correlation measures how closely two sets of numbers move together. For investors the numbers are usually returns: does one stock tend to rise in the months another rises? The usual measure, the correlation coefficient, often written r, runs from -1 to +1. +1: the two always move in the same direction, in perfect proportion. 0: no straight-line relationship at all. -1: they always move in opposite directions, in perfect proportion. Most pairs of stocks sit somewhere between 0 and +1, because many of the same forces, such as interest rates, the economy and market mood, push on all of them.

Correlation in one sentence

r = sum of (deviation of A x deviation of B) / square root of (sum of A's squared deviations x sum of B's squared deviations). The top asks whether A and B tend to be above or below their own averages at the same time; the bottom scales the answer so it always lands between -1 and +1.

Worked example: correlation of two stocks over five months

Illustrative monthly returns. Stock A: +3%, -1%, +2%, 0%, +1%. Stock B: +2%, -1%, +3%, 0%, +1%.

Means (each sums to 5, divided by 5)A: 1%, B: 1%
Deviations of A+2, -2, +1, -1, 0
Deviations of B+1, -2, +2, -1, 0
Products, month by month (A deviation x B deviation)2, 4, 2, 1, 0
Sum of products9
Sums of squared deviations (4 + 4 + 1 + 1 + 0 and 1 + 4 + 4 + 1 + 0)A: 10, B: 10
Bottom of the formula (square root of (10 x 10))10
Correlation0.9, a strong positive relationship

Five data points are far too few to trust a real correlation. They are used so every step can be checked by hand.

Diversification means spreading money across holdings so one bad result does less damage, and it works best with holdings that react to events differently from each other. Correlation is the measure of that difference. In 1952 Harry Markowitz showed that a portfolio's risk depends not only on how volatile each holding is but on how the holdings move together. Take two assets that each have 20% annual volatility, held half and half. The portfolio's volatility is the square root of (0.25 x 400 + 0.25 x 400 + 2 x 0.25 x r x 400), which simplifies to the square root of (200 + 200 x r). Watch what happens as r changes.

Worked example: the same two assets at different correlations

Two assets, each with 20% annual volatility, 50% of the money in each. Illustrative.

Correlation +1 (square root of 400)20.0%
Correlation +0.9 (square root of 380)19.5%
Correlation +0.5 (square root of 300)17.3%
Correlation 0 (square root of 200)14.1%
Correlation -1 (square root of 0)0%
Diversification benefitnone at +1, growing as correlation falls

Volatility figures are assumptions for illustration. Real correlations move around and are rarely as low as 0 for two stocks.

At a correlation of +1, splitting the money changes nothing: you hold the same risk twice. The benefit appears only when correlation is below 1, and it grows as correlation falls. At +0.9, like the two stocks in the first example, the gain is tiny: 20% becomes 19.5%. That is why owning ten stocks from one industry can do much less than its count suggests, and why the diversification lesson talks about spreading across genuinely different assets.

+1
Always move in the same direction, in proportion
+0.9
Strongly tend to move together
0
No straight-line relationship
-1
Always move in opposite directions, in proportion

Correlation is not a fixed property. It changes with the market, and it has a habit of rising in sell-offs. Studying monthly data for five large stock markets, François Longin and Bruno Solnik found that correlation between them increases in bear markets but not in bull markets. Assets that looked nicely unrelated in calm years can fall together in a crash, just when the diversification was supposed to help. There is a statistical wrinkle too. Kristin Forbes and Roberto Rigobon showed that measured correlation is conditional on volatility, so part of the jump seen in a crisis comes from the measurement itself. Either way the practical point is the same: a correlation estimated in quiet times is an optimistic guide to how holdings behave in a storm.

Diversification is weakest in a storm

The correlation that matters most is the one during a sell-off, and that is usually higher than the long-run average. Judge a mix of holdings by how they behaved together in their worst stretches, not only on average.

A high correlation says two things moved together. It does not say one caused the other. Two airline stocks may be highly correlated because fuel prices drive both, not because one airline's results move the other's. In markets, the hidden third factor is often the broad market itself, which is exactly what the regression lesson separates out with beta. And with enough pairs of data, some will correlate by pure chance. A correlation found by searching thousands of combinations is one of the easiest ways to fool yourself, the same trap described in the overfitting lesson.

One more trap: correlation only measures straight-line relationships. Suppose A returns -2, -1, 0, +1 and +2, and B is always A squared: 4, 1, 0, 1 and 4. B is completely determined by A, yet their correlation is zero. A's deviations are -2, -1, 0, +1, +2; B's mean is 2, so its deviations are +2, -1, -2, -1, +2; the products are -4, 1, 0, -1 and 4, which add up to 0. A payoff that gains whenever the market moves a lot in either direction, as some option positions do, can look uncorrelated with the market and still depend on it entirely. A correlation near zero means no straight-line link, not no link.

Two assets each have 20% volatility and a correlation of exactly +1. What happens to risk if you split money equally between them? Nothing: the portfolio's volatility stays at 20% The square root of (200 + 200 x 1) is the square root of 400, which is 20%.

You can read a correlation

You can now compute a correlation coefficient by hand, explain why diversification needs correlation below 1, and say why calm-period correlations can mislead.

Check your understanding

Stock A's deviations from its mean are +1 and -1. Stock B's are +2 and -2. What is their correlation?
+1. Products: 2 + 2 = 4. Sums of squares: 2 and 8, and the square root of 2 x 8 is 4. So r = 4 / 4 = +1.
Two assets each have 20% volatility, are held 50/50 and have a correlation of 0. What is the portfolio's volatility?
About 14.1%. The square root of (200 + 200 x 0) is the square root of 200, about 14.1%.
What did Longin and Solnik find about correlation between major stock markets?
It rises in bear markets but not in bull markets. Their study of five large stock markets found correlation rising with falling markets, just when diversification is most wanted.
Two stocks have a correlation of 0.8 over the past three years. What can you conclude?
They have tended to move in the same direction, but that alone does not show one causes the other. A shared driver, such as the whole market or the same input costs, can produce a high correlation.

Common questions

What does correlation mean in investing?
Correlation measures how consistently two investments' returns move together, on a scale from -1 to +1. A correlation near +1 means they tend to rise and fall together; near 0 means no straight-line relationship; near -1 means they tend to move in opposite directions.
Why does correlation matter for diversification?
Combining holdings only reduces risk when their correlation is below +1. Two assets with 20% volatility each, held 50/50, give a portfolio volatility of 20% at a correlation of +1 but about 14.1% at a correlation of 0.

Terms defined in this lesson

Continue

Sources

Written and reviewed by the Agenticks Learn editorial team. How we write and check lessons.

Agenticks Learn is general education. It is not financial, investment, tax or legal advice, it does not take your situation into account, and nothing on it is a recommendation to buy, sell or hold any security or to open any account. Examples use illustrative numbers. Investing involves risk, including losing money you put in, and past performance does not predict future results. Tax rules and limits change; the official sources linked in each lesson are the final word.