Quant Memo
Foundational

Correlation

Correlation is a single number from -1 to +1 that measures how strongly two quantities move together in a straight-line sense. It's the standardized cousin of covariance and the backbone of diversification.

Prerequisites: Variance, Intuitively

Correlation answers a question every portfolio manager asks: when one thing goes up, does the other tend to go up too, go down, or do its own thing? It squeezes that relationship into a single number between 1-1 and +1+1. A correlation of +1+1 means the two move in perfect lockstep, 1-1 means they move in exact opposition, and 00 means there's no straight-line relationship at all.

It's built from covariance, which measures whether two quantities tend to sit on the same side of their means at the same time:

Cov(X,Y)=E[(XμX)(YμY)].\mathrm{Cov}(X, Y) = E\big[(X - \mu_X)(Y - \mu_Y)\big].

Covariance has the same units problem as variance, its size depends on the scale of XX and YY, so it's hard to read. Correlation fixes that by dividing out both standard deviations, leaving a pure, unitless number:

ρ=Cov(X,Y)σXσY,1ρ1.\rho = \frac{\mathrm{Cov}(X, Y)}{\sigma_X\,\sigma_Y}, \qquad -1 \le \rho \le 1 .

Here μX,μY\mu_X, \mu_Y are the two means, σX,σY\sigma_X, \sigma_Y the two standard deviations, and ρ\rho (the Greek letter "rho") is the correlation.

r ≈ +0.9 r ≈ 0 r ≈ −0.9
Left: points hug a rising line (strong positive). Middle: a shapeless cloud (no correlation). Right: points hug a falling line (strong negative).

Those three snapshots are frozen. Drag ρ\rho below through the whole range and watch a single cloud of points respond: near +1+1 it collapses onto a rising line, at 00 it scatters into a shapeless blob, and near 1-1 it tightens onto a falling line. The r2r^2 readout — the share of the spread the line explains — climbs as you move away from zero in either direction.

Correlation explorer
X →Y ↑
ρ = 0.60r² = 0.36relationship: moderate positive

Correlation ρ\rho lives in [1,+1][-1, +1]. Its sign is the direction (do they move together or opposite?) and its magnitude is the tightness. ρ=0\rho = 0 means no linear link — the variables can still be strongly related in a curved way.

Worked example: computing it by hand

Take five paired observations: X=(1,2,3,4,5)X = (1,2,3,4,5) and Y=(2,1,4,3,5)Y = (2,1,4,3,5). Both have mean 33. Subtract the means to get the deviations:

XμX=(2,1,0,1,2),YμY=(1,2,1,0,2).X - \mu_X = (-2,-1,0,1,2), \qquad Y - \mu_Y = (-1,-2,1,0,2).

Multiply the pairs and average to get the covariance:

Cov(X,Y)=(2)+(2)+(0)+(0)+(4)5=85=1.6.\mathrm{Cov}(X,Y) = \frac{(2) + (2) + (0) + (0) + (4)}{5} = \frac{8}{5} = 1.6 .

Each variable has variance 4+1+0+1+45=2\tfrac{4+1+0+1+4}{5} = 2, so σX=σY=21.414\sigma_X = \sigma_Y = \sqrt{2} \approx 1.414. Divide:

ρ=1.622=1.62=0.8.\rho = \frac{1.6}{\sqrt{2}\,\sqrt{2}} = \frac{1.6}{2} = 0.8 .

A correlation of 0.80.8, strong and positive: these two mostly rise and fall together, though not perfectly.

Common pitfalls

  • Correlation is not causation. A high ρ\rho says two things move together, not that one drives the other. A hidden third factor often explains both.
  • It only sees straight lines. Correlation measures linear association. Two variables can be tightly linked by a curve (like Y=X2Y = X^2) and still show ρ0\rho \approx 0. Zero correlation does not mean independence.
  • Outliers can fake it. A single extreme pair can drag ρ\rho toward ±1\pm 1 or crush it toward 00. Always look at the scatter, never just the number.
  • It's unstable and regime-dependent. Estimated correlations wander over time, and in a crisis assets that looked uncorrelated can lurch together, exactly when diversification is supposed to help.

Correlation is where risk stops being about one asset and starts being about how assets combine. It flows directly into estimating covariance matrices, the raw material for diversification, portfolio variance, and every hedge built on the idea that two positions won't move as one.

Related concepts

Practice in interviews

Further reading

  • Wasserman, All of Statistics
  • Blitzstein & Hwang, Introduction to Probability, ch. 7
ShareTwitterLinkedIn