Distance Correlation and Nonlinear Dependence
A measure of dependence between two variables that is exactly zero if and only if the variables are truly independent — unlike Pearson or even rank correlation, which can both report zero for variables that are strongly, non-monotonically related.
Prerequisites: Spearman and Kendall Rank Correlation, Joint and Marginal Distributions
A volatility signal might be strongly related to next-day returns, but in a U-shape: very low and very high signal readings both precede big moves, while middling readings precede calm days. Pearson correlation between the signal and returns could easily come out near zero — a straight line fit through a U-shape has roughly zero slope. Spearman or Kendall rank correlation would also come out near zero, since the relationship isn't consistently increasing or decreasing either. Both classic tools would report "no relationship" for a signal that is, in fact, highly informative. Distance correlation is built specifically to catch this: it is zero if and only if the two variables are genuinely, fully independent, regardless of the shape of whatever relationship connects them.
An analogy: a lie detector for "no relationship"
Pearson correlation is like a lie detector that only checks for one specific kind of lie — straight-line deception. Rank correlation catches a slightly broader category — any consistently one-directional deception. But a genuinely clever dependence (a U-shape, a spiral, anything not monotonic) slips past both undetected, registering as "no relationship" when there clearly is one. Distance correlation instead checks something much more fundamental: it measures how far the joint behavior of the two variables is from what you'd expect if they had absolutely nothing to do with each other, using the geometry of pairwise distances between all the observations rather than any assumption about the shape of the relationship. If the variables are truly independent, this measure is provably, exactly zero — not just small, but zero.
The idea, one symbol at a time
For samples , compute all pairwise distances and , then "double-center" each matrix (subtract row and column means, add back the grand mean) to get and . The distance covariance is
and distance correlation normalizes it into a number between 0 and 1:
In plain English: instead of asking "do and move together on average" (Pearson) or "do their ranks move together" (Spearman), distance correlation asks "do the patterns of pairwise distances between observations in -space line up with the patterns of pairwise distances in -space" — a much more general notion of "moving together" that captures curves, U-shapes, and any other dependence structure, because it's built from the full geometry of how observations relate to each other, not from a single assumed direction.
Worked example 1: a symmetric U-shape by hand
Suppose 5 values of a signal and next-day volatility — a perfect, deterministic U-shaped relationship. Pearson correlation here is exactly 0 (by the symmetry of a parabola around its vertex — positive and negative 's cancel in the covariance sum). Spearman's rho is also close to 0 for the same reason: rank order doesn't move consistently in one direction. But distance correlation between and computed on this data comes out well above 0 (in fact, for exactly this symmetric parabolic setup, standard references report – for many such configurations) — correctly flagging that is, in fact, a deterministic function of , just not a monotonic one.
Worked example 2: true independence
Now suppose and are genuinely unrelated — say is a signal value and is a random number generated independently of it, with no functional relationship whatsoever. Both Pearson correlation and distance correlation will be close to zero here, but only distance correlation carries the theoretical guarantee: as sample size grows, if and only if and are truly independent. Pearson correlation being near zero never carries that guarantee — it's consistent both with true independence and with many kinds of strong nonlinear dependence, which is exactly the ambiguity distance correlation is built to resolve.
What this means in practice
Distance correlation is used as a diagnostic screen when searching for potentially useful signals: a feature with high distance correlation to future returns but near-zero Pearson or Spearman correlation is a strong hint of a nonlinear, possibly non-monotonic relationship worth investigating with a more flexible model (a tree, a kernel method, a neural net) rather than a linear one. It's especially useful in factor research for flagging exactly the U-shaped or threshold-type relationships that a plain correlation screen would silently discard as "no signal."
Distance correlation measures dependence using the full geometry of pairwise distances rather than assuming a linear or even monotonic relationship, and it is zero if and only if the two variables are truly independent — catching U-shapes, thresholds, and other nonlinear dependence that Pearson and rank correlation can miss entirely.
A high distance correlation tells you that two variables are related, but nothing about how — it doesn't tell you the direction, the shape, or whether the relationship is exploitable (a perfectly symmetric U-shape might have real information content on average but be practically useless for a directional trade). Distance correlation is a detection tool for the research stage, not a replacement for actually characterizing the relationship once you've found it.
Related concepts
Practice in interviews
Further reading
- Székely, Rizzo & Bakirov, 'Measuring and Testing Dependence by Correlation of Distances', Annals of Statistics
- Székely & Rizzo, 'Brownian Distance Covariance', Annals of Applied Statistics