Unsupervised learning: clustering assets and correlation structure
ML · Chapter 412 min readAsked at Two Sigma, AQR, QuantCo, Citadel
Assumes Other supervised methods: kNN, SVMs and the kernel trick.
After this lesson you should be able to
- Choose a clustering method from the shape you expect.
- Convert a correlation into a valid distance.
- Say what EM does and where mixture models are used in finance.
Unsupervised methods look for structure without a target, and in finance the structure of interest is almost always the correlation matrix — which assets move together, and whether those groups are stable. Getting the distance right matters more than the choice of algorithm.
| Method | Assumes | Good for |
|---|---|---|
| k-means | Round, similar-sized, Euclidean clusters | Quick partitions of well-separated data |
| Hierarchical | A nested structure; no fixed | Correlation matrices, where nesting is natural |
| Gaussian mixture | Clusters are Gaussian, possibly elongated | Regime identification, soft assignment |
| DBSCAN | Clusters are dense regions of any shape | Outlier detection; no need to fix |
| PCA | Variance is the structure | Factor extraction, dimensionality reduction |
Equation 4.2
Correlation as a distance
The standard conversion. It is a proper metric — it satisfies the triangle inequality — which naive alternatives like do not.
- Distance zero: identical.
- Distance 2: maximally opposed.
Why the square root matters. It comes from geometry: if returns are standardised, the Euclidean distance between two assets’ return vectors is exactly times a constant. So this is not a convenient transformation but the actual distance in the space where the data live — which is why it satisfies the triangle inequality and why clustering with it produces groupings that behave sensibly. Feeding to a method that assumes a metric gives results that can violate transitivity in ways that are hard to notice and hard to defend.
The rest of this lesson is in Premium
You have read the opening. 10 more sections follow, including 4 worked examples and 3 quick checks.
Nothing is charged for 7 days, and you can cancel before then. Or read The law of large numbers and the central limit theorem in full, free.