Spearman and Kendall Rank Correlation
Two ways to measure how consistently two variables move together in rank order rather than in a straight line — catching monotonic but curved relationships that ordinary Pearson correlation can badly underestimate.
Prerequisites: Rank Transforms and Uniformisation, Confidence Intervals
A momentum signal and next-month return might be strongly related — high signal values almost always precede higher returns — but the relationship could be curved rather than a straight line (say, returns rise steeply for low-to-medium signal values and then level off at the top). Ordinary Pearson correlation is a measure of linear association and can report a modest, unimpressive number even when the two variables are moving together almost perfectly, just not along a straight line. Spearman and Kendall correlation fix this by working with ranks instead of raw values, capturing any consistently increasing (or decreasing) relationship, straight or curved.
An analogy: judges who agree on order, not on scores
Two judges scoring a diving competition might give wildly different numeric scores — one is generous, one is strict, one uses a compressed scale — and a straight-line correlation of their raw scores might look weak just because of these scaling differences. But if you instead ask "do they agree on the order of the divers," the answer could be a resounding yes: both judges rank the same diver first, the same diver last, and so on all the way through. Rank correlation ignores the raw numbers entirely and asks only whether the order implied by one variable matches the order implied by the other — exactly the question that matters when you only care whether high values of go with high values of , not exactly how high.
The idea, one symbol at a time
Spearman's rho is just the ordinary Pearson correlation computed on the ranks of and instead of their raw values:
a shortcut formula valid when there are no tied ranks. In plain English: is how far apart the two rankings place observation ; if the rankings agree almost everywhere, the 's are small and is close to 1. Kendall's tau instead counts pairs directly:
where a pair of observations is concordant if the one with the higher also has the higher , and discordant if not. In plain English: tau is the fraction of all possible pairs that agree in ordering, minus the fraction that disagree — 1.0 means every pair agrees, means every pair disagrees, 0 means agreement and disagreement are equally common.
Worked example 1: Spearman by hand
Suppose 5 stocks ranked by a momentum signal (1=highest) and by subsequent return (1=highest): signal ranks pair with return ranks . Differences: , so , summing to 4. — a strong positive rank association, even though the exact return numbers behind these ranks might have a curved, non-straight-line relationship with the signal that a Pearson correlation on raw values would understate.
Worked example 2: Kendall's tau on the same data
Using the same 5 pairs (signal rank, return rank): . There are pairs total. Checking each: comparing and — signal rank 1<2 but return rank 2>1, discordant. Comparing and — both increase, concordant. Working through all 10 pairs carefully gives 8 concordant and 2 discordant (the two involving the -vs- crossing and the -vs- crossing). . Note Kendall's tau (0.6) and Spearman's rho (0.8) both confirm strong positive association but land on different numeric scales — they answer closely related but not identical questions, and are not meant to be compared directly to each other.
The scatter above shows Pearson-style linear correlation for reference — drag rho and notice how it describes straight-line clustering specifically; rank correlation instead asks only whether points trend consistently upward or downward, even along a bend, which a fixed linear rho parameter can't fully illustrate.
What this means in practice
Rank correlations are standard for evaluating trading signals, precisely because what usually matters is whether higher signal values predict higher returns in order — the basis for portfolio construction by ranking and bucketing — not whether the relationship is exactly linear. Spearman and Kendall are also far less sensitive to a few extreme outlier observations than Pearson correlation, since a single huge value can only ever occupy one rank position no matter how extreme it is in raw terms.
Spearman's rho is Pearson correlation computed on ranks; Kendall's tau is the fraction of concordant minus discordant pairs. Both measure whether two variables move consistently in the same (or opposite) order, catching curved-but-monotonic relationships that a straight-line Pearson correlation can badly understate.
Rank correlation measures monotonic association only — if the true relationship rises and then falls (a genuine U-shape or inverted-U, common when a signal works well in moderation but reverses at extremes), both Spearman and Kendall can report a correlation near zero even though the variables are very strongly related, because the ranking swings back and forth rather than moving consistently in one direction. A near-zero rank correlation rules out monotonic dependence, not dependence altogether — see Distance Correlation for a measure that catches this case too.
Related concepts
Practice in interviews
Further reading
- Kendall, Rank Correlation Methods
- Hollander, Wolfe & Chicken, Nonparametric Statistical Methods, ch. 8