Quant Memo
Core

Asset Network Graphs and Minimum Spanning Trees

A full correlation matrix over hundreds of assets is too dense to read at a glance — a minimum spanning tree keeps only the strongest connection needed to link every asset into one network, turning an unreadable matrix into a picture of market structure.

Prerequisites: Graph Theory Basics, Correlation Graphs and Edge Thresholding

Take the pairwise correlation matrix of 500 stocks' returns and you get almost 125,000 numbers — technically all the information about how the market co-moves, and practically useless to look at directly. A minimum spanning tree (MST) compresses that firehose into something a human can actually read: it keeps only the n1n-1 strongest connections needed to link all nn assets into a single connected network, throwing away every redundant or weaker link.

Turn correlation into a distance (assets that move together are "close," assets that don't are "far"), then find the tree of connections that links every asset to the network using the smallest total distance possible. The result is one edge per asset, chosen to be its strongest surviving link to the rest of the market — a skeleton of market structure instead of a wall of numbers.

From correlation to a tree

Correlation isn't quite a distance — two things being perfectly correlated should mean zero distance, and the standard conversion is dij=2(1ρij)d_{ij} = \sqrt{2(1 - \rho_{ij})}, where ρij\rho_{ij} is the correlation between assets ii and jj. In words: perfectly correlated assets (ρ=1\rho=1) get distance 0, uncorrelated assets (ρ=0\rho=0) get distance 2\sqrt{2}, and perfectly anti-correlated assets (ρ=1\rho=-1) get the maximum distance of 2 — closer co-movement becomes a shorter distance, matching the intuition that similar assets should sit near each other in the network.

With every pair of assets now a distance, an algorithm like Kruskal's or Prim's builds the MST: repeatedly add the shortest remaining edge that doesn't create a cycle, until every asset is connected. The result has exactly n1n-1 edges for nn assets — the minimum possible to connect everything — chosen so that the total distance across all edges is as small as it can possibly be.

bank A bank B bank C insurer D insurer E tech F tech G tech H utility I long edge = weak link
Banks and tech names each connect through short, strong edges into visible clusters; a utility stock only connects through one long, weak edge — a natural outlier.

Worked example

Building an MST over 30 large-cap US stocks using six months of daily returns, three regional banks connect to each other through very short edges (d0.35d \approx 0.35, meaning ρ0.94\rho \approx 0.94), forming a tight cluster; five technology names connect through slightly longer edges (d0.55d \approx 0.55, ρ0.85\rho \approx 0.85); and one gold-mining stock connects to the rest of the tree through the single longest edge in the whole graph (d1.25d \approx 1.25, ρ0.22\rho \approx 0.22) — its only viable link to a market it barely co-moves with. A risk manager reading this tree immediately sees that the gold miner is the position least correlated with everything else, useful information for diversification that would have been buried in a 30-by-30 correlation matrix.

What this means in practice

MSTs are used to visualize sector clustering, to spot genuinely diversifying assets (long, weak edges), and as a first pass before more detailed community-detection algorithms, since the tree's branches are usually a rough preview of the clusters those algorithms will later find formally. An MST recomputed before and after a market stress event is also a standard way to show that correlations tighten in a crisis — the tree visibly compresses, with edge distances shrinking across the board as everything starts moving together.

An MST only keeps the single strongest surviving connection per asset, so it can hide meaningfully strong secondary relationships — two stocks might be highly correlated with each other but the tree-building process never draws that edge if each already has an even stronger link elsewhere. Treat the MST as a skeleton of structure, not a complete map of correlation.

Related concepts

Practice in interviews

Further reading

  • Mantegna, 'Hierarchical Structure in Financial Markets' (1999)
  • Tumminello et al., 'Correlation, Hierarchies, and Networks in Financial Markets' (2010)
ShareTwitterLinkedIn