robertmartin8 / PyPortfolioOpt

Financial portfolio optimisation in python, including classical efficient frontier, Black-Litterman, Hierarchical Risk Parity
https://pyportfolioopt.readthedocs.io/
MIT License
4.24k stars 927 forks source link

idzorek_method for Black Litterman (possible error in the formula) #560

Open adalseno opened 9 months ago

adalseno commented 9 months ago

Describe the bug It's not a bug, but I think the formula is not accurate (line 386): omega = tau * alpha * P_view @ cov_matrix @ P_view.T # formula (41)

Expected behavior According to the paper, the formula should be: $\alpha P \Sigma P^{\intercal}$

Code sample Thus, in my view, the code should be: omega = alpha * P_view @ cov_matrix @ P_view.T # formula (41)

Operating system, python version, PyPortfolioOpt version Not relevant

Additional context Am I wrong? Thank you very much for your work.

kirillsak commented 5 months ago

Hi Andrea,

I think this is to do with which implementation of the uncertainty matrix they are using. The methods comment mentions that the closed-form solution proposed by Jay Walter's-The Black-Litterman Model in Detail (2014) is used. This solution utilises tau.

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=1314585

baobach commented 5 months ago

Idzorek paper actually has $\tau$ in the formula for the Omega matrix - formula 8. In the paper, he assumed that $\tau = 0.025$ but you can take arbitrarily any number.