optimizer
Nested Clustered Optimization (NCO)
A two-step optimizer that first clusters assets, optimizes inside each cluster, then optimizes across clusters using cluster-level statistics.
Nested Clustered Optimization (NCO) is a two-stage portfolio method: it groups assets into clusters of similar behavior, optimizes inside each cluster, then optimizes across the clusters as if each were a single asset. Marcos Lopez de Prado published it in 2019 as a way to make optimization steadier when there are many assets and the covariance matrix is noisy.
Stage one clusters the assets by correlation distance. Stage two solves a small optimization inside each cluster, for example the minimum-variance mix of the cluster's members, so that each cluster behaves like one synthetic asset with its own variance. Stage three solves a second optimization across those synthetic assets. A stock's final weight is its weight inside its cluster multiplied by its cluster's weight in the portfolio. Because each step works with a smaller matrix, NCO can reduce sensitivity to local estimation errors, although a change inside one cluster still shifts that cluster's variance and with it the weights across the whole portfolio.
NCO aims for steadier weights than one large optimization, with fewer extreme bets driven by estimation noise, while still using covariance information that pure clustering methods set aside. The outcome depends on how the clusters are formed: too few clusters lose detail, and too many bring the noise back. In its minimum-variance form it ignores expected returns, so it favors low-risk groupings.
Example with illustrative numbers: a 100-stock universe is split into about 10 clusters. Inside the bank cluster, Stock A gets 25% of the cluster's weight, and across clusters the bank cluster gets 12% of the portfolio. Stock A's final weight is 25% of 12%, or 3%.
On GNG, the Portfolio Optimizer's Nested Clustered Optimization engine clusters your universe with Ward linkage into roughly the square root of the number of names (about 10 clusters for 100 stocks) and finds the minimum-variance mix inside each cluster. It then runs a minimum-variance allocation across the clusters using each cluster's variance and treating the clusters as uncorrelated with one another in that step. Your single-name cap is applied to the final weights, and the engine does not apply sector limits or a yield floor. It sits in the robust diversification group next to HRP, HERC and Risk Parity.
Ledoit-Wolf Shrinkage tackles the same noise problem from the estimation side, and Hierarchical Equal Risk Contribution (HERC) is a clustering method that never inverts the covariance matrix.
Related terms
More optimizer terms
Get full access to GNG Research
Create a free account to access portfolio tracking, advanced tools, and more.