yabte.utilities.portopt
Minimum Variance
Calculate portfolio weights by minimizing variance.
That is to minimize the following expression subject to various constraints.
\[\frac{1}{2} w' \Sigma w\]Typical constraints are achieving a target return, i.e. \(w' \mu = r\), and that all weights sum to one, i.e. \(\Sigma_i w_i = 1\).
- yabte.utilities.portopt.minimum_variance.minimum_variance(Sigma: ndarray, mu: ndarray, r: float) ndarray[source]
Calculate weights using Lagrangian multipliers and algebraic closed form solution.
Inverse Variance
Hierarchical Risk Parity
Calculate portfolio weights with hierarchical risk parity.
That is to employ hierarchical tree clustering on the correlation distance matrix and quasi-diagonalisation followed by recursive bisection to determine the weights. See [LP] for further details.
References
[LP]López de Prado, M. (2016). Building Diversified Portfolios that Outperform Out of Sample. The Journal of Portfolio Management, 42(4), 59–69. https://doi.org/10.3905/jpm.2016.42.4.059