← Correlation and diversification

Lesson 2 of 25 · 7 min

What a correlation coefficient is, computed

The number is a ratio of three sums, and in an eight-month sample one month can move it by fifteen points.

Correlation is usually described rather than computed, which leaves the impression that it is a property of two assets. It is an output of a sample. Computing one by hand, once, changes how every later figure in this track reads.

The recipe has three steps. Subtract each series' own mean from each of its observations, giving deviations. Multiply the two deviations together in each period and add those products up. Then divide that total by the square root of the product of the two series' summed squared deviations. The division is what forces the answer into the range from minus one to plus one; without it you would have covariance, which lesson 8 takes up.

r = Sab / square root of (Saa x Sbb)

r
The correlation coefficient for this pair over this sample. Always between -1 and +1.
a
The first holding's return in each period of the sample.
b
The second holding's return in the same periods.
Sab
Add up, across every period, (a minus the mean of a) times (b minus the mean of b).
Saa
Add up, across every period, (a minus the mean of a) squared.
Sbb
Add up, across every period, (b minus the mean of b) squared.

Eight monthly returns for holding A: 3.2, minus 1.8, 4.6, 2.1, minus 3.4, 5.0, minus 0.7 and 2.9 percent. For holding B: 1.9, minus 0.4, 2.8, 3.6, minus 2.2, 2.4, 1.1 and 0.6 percent. The means are 11.9 divided by 8 = 1.4875 and 9.8 divided by 8 = 1.2250. Working through the deviations gives Sab = 33.1125, Saa = 66.8088 and Sbb = 24.7350. The square root of 66.8088 times 24.7350 is 40.6511, so r = 33.1125 divided by 40.6511 = 0.8146.

Now look at where that came from. Month five, in which both holdings fell together, contributed a product of 16.7397 — 50.55 percent of the entire numerator. Remove that single month and the same pair measures 0.6609. One observation out of eight moved the answer by fifteen points, and nothing about either holding changed.

A correlation is not a fact about two assets. It is a fact about two assets and a specific list of periods, and short lists are dominated by their largest month.

Key terms

Correlation coefficient
A scale-free measure of how two return series moved together over a sample, running from -1 for exact opposition to +1 for exact agreement.
Deviation
One observation minus its own series' mean. Correlation is built entirely from deviations, never from the raw returns.
Sample dependence
The fact that a correlation belongs to the periods it was computed on. Change the periods and the number changes, with no change in the holdings.

Worked example

One correlation, computed from end to end

Eight monthly returns. A: 3.2, -1.8, 4.6, 2.1, -3.4, 5.0, -0.7, 2.9. B: 1.9, -0.4, 2.8, 3.6, -2.2, 2.4, 1.1, 0.6. All figures illustrative percentages.

Means of A and B
1.4875% and 1.2250%

11.9 / 8 and 9.8 / 8.

Sab, the summed products of the deviations
33.1125
Saa and Sbb
66.8088 and 24.7350
Square root of Saa x Sbb
40.6511

Square root of 1,652.52.

Correlation
0.8146

33.1125 / 40.6511.

Correlation with month five removed
0.6609

That month alone supplied 50.55% of Sab.

Every figure here came from the sixteen numbers in the setup. The last row is the one worth remembering: a seven-month sample of the same pair gives a materially different answer.

Check yourself

For a pair of holdings over a sample you compute Sab = 18.4, Saa = 42.5 and Sbb = 21.8. What is the correlation?

Saved in this browser only. No account, nothing sent anywhere.

Educational only. Nothing in this lesson is investment, legal or tax advice, or a recommendation to enter into any transaction. Figures are illustrative and computed from the inputs stated in the lesson.

Dhruv Intelligence provides informational and educational intelligence only. Nothing on this site constitutes investment, legal, tax, or financial advice, or a recommendation to buy, sell, or hold any security or to enter into any transaction. All decisions remain solely those of the user. Dhruv Intelligence is not a registered investment adviser or broker-dealer.

Dhruv Intelligence™, MACH11™, and Monk Score™ are unregistered trademarks of Dhruv Intelligence, Inc. USPTO intent-to-use applications are pending for Dhruv Intelligence™ and MACH11™. None of the marks has registered. Patent Pending (US Provisional, 2026).

© 2026 Dhruv Intelligence, Inc. All rights reserved. · The fixed point.

New York, NY · San Jose, CA · Miami Beach, FL · Salt Lake City, UT

A SOC 1 and SOC 2 Type 1 audit is in progress with Thoropass, engaged August 13, 2026. No report has been issued. · Contact: info@dhruvintelligence.ai

Institutional Access →