Statistical Financial Networks and Filtered Correlation Graphs
The Mantegna pipeline converts a noisy correlation matrix into a distance metric and extracts a minimum spanning tree that reveals market structure, sector relationships, and crisis dynamics that sector labels alone do not capture.
Statistical Financial Networks and Filtered Correlation Graphs
The Mantegna pipeline converts a noisy correlation matrix into a distance metric and extracts a minimum spanning tree that reveals market structure, sector relationships, and crisis dynamics that sector labels alone do not capture.
Why This Matters
A pairwise correlation matrix for $N$ assets contains $N(N-1)/2$ entries. For 500 stocks, that is 124,750 correlations, most of which are noisy, difficult to interpret directly, and dominated by estimation error. Raw correlation matrices are dense, high-dimensional objects that obscure the underlying structure they encode.
Filtered correlation graphs solve this by keeping only the most informative edges. The minimum spanning tree (MST) reduces the full correlation matrix to exactly $N-1$ edges that connect all assets with minimum total distance. The planar maximally filtered graph (PMFG) retains $3(N-2)$ edges while preserving planarity and keeping the MST as a subgraph. Both methods transform an unwieldy matrix into a graph that can be visualized, clustered, and analyzed with the centrality tools from the preceding primer [ref:F48PPCMR].
Knowledge-graph feature engineering typically focuses on text-derived and filing-derived graphs, but correlation-based statistical networks provide a complementary source of graph-derived features built purely from return data. This primer covers the construction pipeline and its financial interpretation.
The Mantegna Distance
Correlation measures similarity, but graph algorithms require distances. Mantegna (1999) introduced a transformation that converts correlations into a proper Euclidean metric [ref:EUGZBS72]:
$$ d(i, j) = \sqrt{2(1 - \rho_{ij})} $$
where $\rho_{ij}$ is the Pearson correlation between the log returns of assets $i$ and $j$ over a given window.
This distance has four key properties:
- $d(i, j) = 0$ when $\rho_{ij} = 1$ (perfectly correlated assets are distance zero)
- $d(i, j) = \sqrt{2}$ when $\rho_{ij} = 0$ (uncorrelated assets)
- $d(i, j) = 2$ when $\rho_{ij} = -1$ (perfectly anti-correlated assets are maximally distant)
- The triangle inequality holds, making $d$ a valid metric
This is necessary because graph algorithms for MST construction (Kruskal's, Prim's) require edge weights that satisfy metric properties. Using raw correlations directly would violate these requirements and produce meaningless trees.
The Minimum Spanning Tree
Given the $N \times N$ distance matrix $D$, the MST is the tree that connects all $N$ nodes with exactly $N-1$ edges and minimum total edge weight:
$$ \text{MST} = \arg\min_{T \in \mathcal{T}} \sum_{(i,j) \in T} d(i,j) $$
where $\mathcal{T}$ is the set of all spanning trees of the complete graph.
Mantegna demonstrated on the 30 stocks of the Dow Jones Industrial Average that the MST recovers economically meaningful clustering: oil companies group together, consumer-product companies group together, and the links between clusters reveal cross-sector relationships that GICS sector labels do not capture [ref:EUGZBS72].
The MST is equivalent to single-linkage hierarchical clustering applied to the distance matrix. This connection is the foundation for the Hierarchical Risk Parity (HRP) method, which uses the correlation-based dendrogram to construct diversified portfolios without inverting the covariance matrix [ref:WLNC7HUN].
The Planar Maximally Filtered Graph
The MST keeps only $N-1$ edges, which is aggressive filtering. Local structures like cliques, loops, and sub-sector groupings are discarded. The PMFG retains more topology by keeping $3(N-2)$ edges while preserving planarity (the graph can be drawn on a plane without edge crossings) [ref:F48PPCMR].
The PMFG contains the MST as a subgraph, so it preserves all the hierarchical structure the MST captures while adding richer local connectivity. For financial applications, this means:
- Sub-sector structure becomes visible. The MST may show that all technology stocks form one branch, but the PMFG can reveal that semiconductor stocks form a tight clique within that branch.
- Local connectivity measures (clustering coefficients, clique membership) become meaningful.
- Hub identification is more robust because hubs retain their local connections rather than being reduced to tree branches.
The trade-off is interpretability: the MST is a tree and easy to visualize, while the PMFG is a denser planar graph that requires more careful layout and analysis.
Worked Example: From Correlation to MST
Consider five assets with the following correlation matrix estimated from six months of daily returns:
| A | B | C | D | E | |
|---|---|---|---|---|---|
| A | 1.00 | 0.82 | 0.15 | 0.10 | 0.18 |
| B | 0.82 | 1.00 | 0.20 | 0.12 | 0.22 |
| C | 0.15 | 0.20 | 1.00 | 0.75 | 0.70 |
| D | 0.10 | 0.12 | 0.75 | 1.00 | 0.68 |
| E | 0.18 | 0.22 | 0.70 | 0.68 | 1.00 |
Step 1: Compute Mantegna distances. $d(A,B) = \sqrt{2(1-0.82)} = 0.60$. $d(C,D) = \sqrt{2(1-0.75)} = 0.71$. $d(A,C) = \sqrt{2(1-0.15)} = 1.30$.
Step 2: Build the MST. Starting from the shortest edge, add edges that do not create a cycle:
- A--B (0.60): connects A and B
- C--D (0.71): connects C and D
- C--E (0.77): connects E to the C-D component
- B--E (1.25): connects the two components
The MST has four edges connecting five nodes. Assets A and B form one cluster; C, D, and E form another. The bridge is B--E, revealing that B is the sector boundary node.
Step 3: Interpret. The two clusters correspond to what might be two different sectors. The MST identifies B as the node linking the clusters, which would be invisible from looking at individual correlations.
Crisis Dynamics and Topology Changes
The MST is not static. When computed over rolling windows, its topology changes with market conditions. During market stress:
- Average distance drops. Correlations increase across the board, pulling the Mantegna distances shorter and compressing the tree.
- Peripheral nodes migrate toward central hubs. Assets that were loosely connected in calm markets become tightly linked to a few dominant nodes.
- Distinct clusters merge. Sector-specific groupings break down as the "correlation one" regime takes hold.
These dynamics serve as systemic-risk early-warning signals. A shrinking MST total length (the sum of all edge weights) indicates rising correlation and decreasing diversification potential [ref:F48PPCMR] [ref:IMDV5XDV]. Monitoring MST length over rolling windows provides a regime indicator that complements traditional volatility-based measures.
Practical Guidance
- Use log returns, not price levels, for correlation estimation. Price-level correlations are spurious for non-stationary series.
- Choose the rolling window carefully. Short windows (60 days) capture regime shifts quickly but produce noisy correlations. Longer windows (250 days) are more stable but lag regime changes. The choice is an estimation trade-off with no universal answer [ref:F48PPCMR].
- Correlations are point estimates with estimation error. For 500 assets over 250 days, the correlation matrix has far more free parameters than observations. Random matrix theory provides tools for separating signal from noise, but the MST inherits whatever estimation error the correlations carry.
- The MST is sensitive to single-edge changes. Adding or removing one observation day can flip which edges are included. Bootstrapping the MST (resampling the return series and recomputing) reveals which edges are stable and which are artifacts of sampling noise.
- Sector labels serve as a sanity check, not ground truth. If the MST consistently separates known sector peers, extraction is working. If it groups unrelated assets, investigate the correlation estimates.
- The PMFG is strictly more informative than the MST but requires more analysis effort. For portfolio construction and hierarchical clustering, the MST is usually sufficient. For local-structure analysis (identifying sub-sector cliques, computing local clustering coefficients), the PMFG is preferable.
Where It Fits in ML4T
Chapter 23 references statistical networks as a source of graph-derived features complementing text-based knowledge graphs. The MST hierarchy connects directly to the Hierarchical Risk Parity method covered in Chapter 17's portfolio construction material [ref:WLNC7HUN]. The centrality measures from the preceding primer apply to MST and PMFG topology as well: hub nodes in the MST represent sector leaders or market proxies. The dynamic evolution of these filtered graphs over rolling windows feeds into the structural-change detection covered in the next primer topic.
Register to Read
Sign up for a free account to access all 61 primer articles.
Create Free AccountAlready have an account? Sign in