Correlation Graphs and Edge Thresholding
Turning a correlation matrix into a graph means drawing an edge between every pair of assets whose correlation clears some cutoff — a simple idea whose entire outcome hinges on where exactly that cutoff, the threshold, is set, since too low a bar draws a graph that is really just noise.
Prerequisites: Graphs as Data: Adjacency and Node Features
A correlation matrix of 500 stocks has roughly 125,000 distinct pairwise correlations — a dense grid of numbers that is technically complete but practically unreadable. Correlation graphs solve this by drawing an edge between two stocks only when their correlation clears a chosen cutoff, turning that unreadable grid into a sparse, visualizable network of genuinely related assets. The entire result — which clusters appear, how connected the graph looks, whether it says anything meaningful at all — depends on exactly where that cutoff, the threshold, is set.
The analogy: who counts as "close" on a map
Imagine you're told to draw a line between any two cities "close enough to commute between." Set the cutoff at 5 miles, and you get a sparse graph of genuinely walkable pairs. Set it at 500 miles, and nearly every city on the map connects to nearly every other — the graph becomes so dense it says nothing at all, since "close" has been defined so loosely it includes almost everything. A correlation graph works identically: the threshold is the "how close counts as connected" rule, and setting it wrong either produces a graph too sparse to reveal any structure, or so dense that it is really just a fully-connected blob wearing a graph's clothing.
Setting the threshold: an absolute cutoff, or a statistical one
The simplest approach uses an absolute cutoff: draw an edge between assets and if for some chosen threshold (say ). The problem is that correlations estimated from a finite sample of returns are noisy even when the true correlation is zero — with observations, a sample correlation of pure noise has standard error roughly , so a threshold set without accounting for sample size will draw plenty of "significant-looking" edges that are pure estimation noise.
A statistical threshold instead asks whether is significantly different from zero, using the standard test statistic:
In words: take the sample correlation, scale it by a factor that grows with the sample size and shrinks as the correlation itself gets closer to , and compare the result to a -distribution to get a p-value — an edge is drawn only if the correlation is statistically distinguishable from zero at, say, the 5% level, given how many observations went into estimating it.
Worked example 1: an absolute threshold drawing a noise edge
Two genuinely unrelated stocks, over a -day window, happen to show a sample correlation of purely by chance (return series drawn from independent processes will still show non-zero sample correlation over any finite window). An absolute threshold of draws an edge between them — a false connection driven entirely by sampling noise. Checking statistically instead: . With 58 degrees of freedom, a of gives a two-sided p-value around — this would actually still clear a standard 5% significance bar in isolation, illustrating a second, deeper problem: testing all 125,000 pairs in a 500-stock universe means thousands of true nulls will cross a 5% threshold by chance alone (multiple-testing), so a single pairwise p-value is not enough — thresholds need correction (e.g. requiring a much smaller p-value per pair) when applied across an entire matrix at once.
Worked example 2: same data, two thresholds, two very different graphs
Take a 10-stock universe (two "tech" names, three "energy" names, five unrelated names) with true within-sector correlation around and true cross-sector correlation around , estimated from trading days. At : only the genuinely related within-sector pairs clear the bar, producing a graph with two clean clusters (tech, energy) and five isolated nodes — a graph that visibly reflects real sector structure. At : nearly every pair, including cross-sector noise correlations, clears the bar, producing a near-fully-connected graph where the real sector clusters are buried in a sea of spurious edges and no longer visually distinguishable. Same underlying data, same true structure — a single threshold choice is the difference between a graph that reveals sector structure and one that hides it entirely.
The scatter above shows what a correlation of roughly actually looks like point by point — visibly noisy, not the tight relationship an "edge exists" label might suggest if the threshold were set too permissively.
A correlation graph draws an edge wherever pairwise correlation clears a chosen threshold. Set the threshold too low and noise correlations flood the graph with spurious edges; set it as a statistical significance test instead of a fixed number, and correct for the fact that testing thousands of pairs at once will produce many false positives by chance alone.
What this means in practice
Correlation graphs (and their close cousin, the minimum spanning tree, which keeps only each node's single strongest connection) are used to visualize market structure, detect sector rotation as clusters shift over time, and flag when previously uncorrelated assets suddenly connect (often a sign of a common shock or emerging risk factor). The threshold should never be chosen by eye to "look like a nice graph" — that is equivalent to p-hacking the network's appearance — and should instead be set from a significance test with a multiple-testing correction (like a Bonferroni-adjusted p-value cutoff) appropriate to how many pairs are being tested simultaneously.
Practice
- Recompute the -statistic in worked example 1 for the same but with observations instead of 60, and comment on how the smaller sample changes the conclusion.
- Explain in one sentence why testing 125,000 pairs at a plain 5% significance level per pair is guaranteed to produce many false-positive edges.
- Given the choice between an absolute threshold and a statistically-corrected one for a 500-asset universe, which would you pick, and why?
The common confusion is treating "correlation exceeds my threshold" as equivalent to "these assets are truly related." With enough asset pairs tested simultaneously, spurious correlations above almost any fixed threshold are guaranteed to appear by chance alone — a correlation graph built without a properly corrected significance threshold is often showing you the shape of estimation noise, not the shape of the market.
Related concepts
Practice in interviews
Further reading
- Mantegna, Hierarchical Structure in Financial Markets (1999)
- Bonanno, Caldarelli, Lillo & Mantegna, Topology of Correlation-Based Minimal Spanning Trees in Real and Model Markets (2003)