Topological Risk Parity
Tree-Based Long/Short Portfolio Construction
Portfolio construction is one of the most studied problems in quantitative finance, yet it’s still surprisingly hard to get it done in practice. Mean-variance optimization is notoriously unstable. We talk about how to make it stable here:
Rather than trying to fix a method, you can also go down the route of using specially designed portfolio optimization techniques that don’t suffer from instability as much. Hierarchical Risk Parity (HRP) is one of the most popular such techniques, replacing the covariance inverse with a recursive clustering procedure that is more robust by construction. But even HRP has its limitations; It’s designed to be long-only, and it takes no signal input whatsoever. It’s a pure risk allocation method. Any alpha you’ve worked so hard to generate is completely ignored by it.
This matters enormously for stat-arb and long-short strategies, where both the signal and the risk structure are crucial. What you want is a portfolio construction method that uses market structure to shape position sizes while preserving signal direction. That is exactly what Topological Risk Parity (TRP), introduced by Nayar, Ainasse, and Kulkarni (2026), is designed to do.
In this article, we implement TRP from scratch in Python on a crypto universe. We also implement the Semi-Supervised variant of TRP, which allows you to impose an economic prior on the hierarchy, like forcing BTC to be the market root and major L1s as the second layer. We then apply Random Matrix Theory (RMT) to further improve TRP across every performance metric!
What you’ll learn:
What Topological Risk Parity is and why it outperforms HRP for long-short strategies
How to build a Minimum Spanning Tree from a correlation matrix and what it reveals about market structure
How Random Matrix Theory separates genuine economic signals from statistical noise in correlation matrices
How to denoise a correlation matrix using Ledoit-Wolf shrinkage and hard thresholding
How to implement TRP from scratch in Python, including the Semi-Supervised variant with economic anchoring
I write about quantitative trading the way it’s actually practiced:
Robust models and portfolios, combining signals and strategies, understanding the assumptions behind your models.
More broadly, I write about:
Statistical and cross-sectional arbitrage
Managing multiple strategies and signals
Risk and capital allocation
Research tooling and methodology
In-depth model assumptions and derivations
If this way of thinking resonates, you’ll probably like what I publish.


