Hello financial experts :)

I recently got interested in portfolio optimization. I'm still learning. As I'm familiar with python I started experimenting a little in JupyterNotebooks with riskfolio. I used this tutorial: Hierarchical Risk Parity (HRP) Portfolio Optimization to get the weights. Now I would like to include the market cap as factor. Sadly the docs and the maintainer weren't very helpful / beginner friendly. Maybe some of you are able to help me answer some questions that came up.

I have the market caps like this:

market_cap_weights = np.array([mcap / np.sum(mcaps) for mcap in mcaps])
  1. Is Black Litterman the right approach to include the market cap? There is an example notebook. It uses pretty complex views though and it seems too advanced / has to much settings for my usage? It would be great if someone could point me on how to use them for simple market cap weights.
  2. If BL is not the right approach what is?

Grateful for any help. Thank you.


1 Answer 1


I think approaches that you suggest are incompatible.

Risk contribution (or risk parity/HRP) is portfolio construction method that takes the volatility and correlation of securities, along with a desired contribution to risk, and generates the weights of the portfolio.

Black-Litterman is related to mean-variance optimization. In a simple form, it can take the market portfolio and turn that into a forecasted return or alpha. If you were to feed that back into mean-variance optimization, the result would be the market portfolio. From there, the "market alpha" is typically blended with views to produce a deviation from the market portfolio.

Market cap weighting is another portfolio construction method that simple weights the securities by their relative market caps.

If you want to incorporate market cap into the risk contribution methodology, you could create sub-portfolios using market cap weighting and then blend them using risk contribution for example. e.g. at heirarchy 2 use market cap weighting and at heirarchy 1 use risk contribution.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.