Schur Complementary Allocation

Calculate the Schur Complementary Allocation weights, which run from Hierarchical Risk Parity (\(\gamma = 0\)) towards the minimum variance portfolio (\(\gamma\) near 1).

HRP splits every cluster between its two halves by their own variances and ignores how the two halves move together; the minimum variance portfolio uses exactly that, through the Schur complements of the inverse covariance matrix, but becomes unstable when the covariance matrix is noisy. Schur Complementary Allocation augments the covariance block of each half with a share \(\gamma\) of what the other half tells about it, and then splits as HRP does on the augmented blocks.

For a cluster split into halves with covariance blocks A and D and the block B between them, the formula is as follows:

\[A_{c} = A - \gamma B D^{- 1} B'\] \[\tilde{A} = (I - \gamma B D^{- 1} M')^{- 1} A_{c},\;\; \text{made symmetric, with } M \text{ the step-up matrix that spreads the assets of the other half over those of this one (the identity for halves of equal size)},\;\; \text{so that}\; \tilde{A}^{- 1} 1 = A_{c}^{- 1}(1 - \gamma B D^{- 1} \;\text{M'1}),\;\; \text{the minimum variance weights of the half up to a scale}\] \[\alpha = 1 - \frac{\nu(\tilde{A})}{\nu(\tilde{A}) + \nu(\tilde{D})},\;\; \text{the share of the first half, with } \nu \text{ the variance of the inverse variance portfolio of a block}\]

The halves are then split further on à and D̃. The assets are clustered and ordered as in Hierarchical Risk Parity, so \(\gamma = 0\) gives its weights.

Also known as: Schur complementary portfolio, Schur allocation.

Example · AAPL, MSFT, JNJ, XOM · 2021 to 2025

Install the Finance Toolkit with pip install financetoolkit -U, then call get_schur_complementary_weights:

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["AAPL", "MSFT", "JNJ", "XOM"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
)

toolkit.portfolio.get_schur_complementary_weights(gamma=0.5)

Or, with the Finance Toolkit MCP set up, ask an AI assistant such as Claude or ChatGPT:

How would Schur complementary allocation, halfway between hierarchical risk parity and minimum variance, weight Apple, Microsoft, Johnson & Johnson and ExxonMobil, based on 2021 to 2025?

Which returns:

Parameters

get_schur_complementary_weights accepts the following parameters.

ParameterTypeDescriptionExample
gammafloatHow much of the covariance between the halves of a cluster the splits use, between 0 (Hierarchical Risk Parity) and 1. Defaults to 0.5.0.5
linkage_methodstrThe linkage of the hierarchical clustering, as in Hierarchical Risk Parity. Options are: “single” (single linkage), “complete” (complete linkage), “average” (average linkage), “ward” (Ward’s method), “dbht” (the Directed Bubble Hierarchical Tree of Song, Di Matteo and Aste, 2012). Defaults to “single”."single"
codependencestrThe codependence the assets are clustered on (see get_hierarchical_risk_parity_weights). Defaults to. Options are: “pearson” (the linear correlation of the covariance matrix), “spearman” (the rank correlation of the returns, Spearman, 1904), “kendall” (the rank correlation \(\tau_{b}\) of the returns, Kendall, 1938), “gerber” (co-movements beyond half a standard deviation, Gerber et al., 2022), “detoned” (the correlation without the market component, López de Prado, 2020), “distance” (the distance correlation, Székely et al., 2007, through √(1 - dCor)), “mutual_information” (through the variation of information, Meilă, 2007), “lower_tail” (how often two assets fall into their lowest 5% of returns together, through -ln \(\lambda\)), “absolute_angular” (\(\vert \rho \vert\) through \(\sqrt{1 - \vert \rho \vert}\), López de Prado, 2020), “squared_angular” (\(\rho^{2}\) through \(\sqrt{1 - \rho^{2}}\), López de Prado, 2020), “gnpr” (the rank co-movement and the difference between the return distributions, \(\theta = 0.5\), Marti et al., 2016). Defaults to “pearson”."pearson"
periodstrThe frequency of the returns. Options are: “daily” (daily returns), “weekly” (weekly returns), “monthly” (monthly returns), “quarterly” (quarterly returns), “yearly” (yearly returns). Defaults to “daily”."weekly"
covariancestrThe estimator of the covariance matrix (see get_hierarchical_risk_parity_weights). A shrinkage estimator such as “ledoit_wolf” keeps the augmented blocks positive definite at a higher gamma. Defaults to. Options are: “sample” (the sample covariance, ddof=1), “ledoit_wolf” (shrunk towards the scaled identity, Ledoit and Wolf, 2004), “ledoit_wolf_constant_correlation” (shrunk towards the average correlation, Ledoit and Wolf, 2004), “ledoit_wolf_single_factor” (shrunk towards the covariance that the benchmark as a single factor implies, Ledoit and Wolf, 2003), “oas” (Oracle Approximating Shrinkage, Chen et al., 2010), “shrunk” (a fixed 10% towards the scaled identity), “semicovariance” (the co-movement below a zero return, Estrada, 2008), “exponential” (exponentially weighted, recent periods weigh most, RiskMetrics), “denoised” (the eigenvalues of the correlation matrix that random returns could produce averaged, Laloux et al., 2000), “denoised_spectral” (those eigenvalues set to zero), “denoised_shrink” (the noise correlations shrunk towards their diagonal, López de Prado, 2020), “gerber” (co-movements beyond half a standard deviation, Gerber et al., 2022), “factor” (the covariance of the Fama and French five factor model with OLS loadings, Fama and French, 1993), “minimum_covariance_determinant” (the reweighted covariance of the half of the periods with the smallest covariance determinant, robust to outliers, Rousseeuw and Van Driessen, 1999), “jlogo” (the sparse inverse covariance on the TMFG planar graph of the correlations, Barfuss et al., 2016), “geodesic” (10% towards the scaled identity along the geodesic of the positive definite matrices, Bhatia, 2007), “regime_adjusted_ew” (exponentially weighted with a half-life of 40 periods, rescaled by the recent realized against predicted risk, Paleologo, 2025), “nercome” (eigenvectors from one part of the periods and the variances along them from the other, averaged over random splits, Lam, 2016), “ccc_garch” (the next-period covariance of GARCH(1, 1) volatilities with constant correlations, Bollerslev, 1990), “mm” (the robust MM-estimator, Maronna et al., 2019), “rocke” (Rocke’s robust S-estimator, Maronna et al., 2019). Defaults to “sample”."sample"
covariance_spanintThe span in periods of the exponentially weighted covariance; the weight of a period halves after about span / 2.9 periods. Defaults to 180.180
minimum_weightfloat | dict[str, float]The lowest weight of every asset, or per asset, e.g. {“AAPL”: 0.05} (the others keep 0); it cannot be negative. Defaults to 0.0
maximum_weightfloat | dict[str, float]The highest weight of every asset, or per asset, e.g. {“AAPL”: 0.3} (the others keep 1). Defaults to 1.1
include_benchmarkboolWhether to include the benchmark as an asset. Defaults to False.True
roundingint | NoneThe number of decimals to round the results to. Defaults to None, which uses the Toolkit’s rounding.2
show_columnsstr | list[str] | NoneThe columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column.None, which keeps every column

References

  • Paper Cotton, P. (2024). “Schur Complementary Allocation: A Unification of Hierarchical Risk Parity and Minimum Variance Portfolios.” arXiv 2411.05807.
  • Paper López de Prado, M. (2016). “Building Diversified Portfolios that Outperform Out of Sample.” The Journal of Portfolio Management, 42(4), 59-69.
  • Library Referenced against skfolio’s SchurComplementary
Share