Machine Learning Portfolio Optimization: Hierarchical Risk Parity and Modern Portfolio Theory
Total Page:16
File Type:pdf, Size:1020Kb
Master’s Degree in Corporate Finance Department of Business and Management - Chair of Risk Management Machine Learning Portfolio Optimization: Hierarchical Risk Parity and Modern Portfolio Theory SUPERVISOR Professor Francesco Cerri CO - SUPERVISOR Professor Marco Vulpiani CANDIDATE Luca Bechis 709261 ACADEMIC YEAR 2019 ‒ 2020 Machine Learning Portfolio Optimization: Hierarchical Risk Parity and Modern Portfolio Theory To Eugenio 1 Machine Learning Portfolio Optimization: Hierarchical Risk Parity and Modern Portfolio Theory Table of Contents Introduction .......................................................................................................................................................... 4 1.THE DEVELOPMENT OF MODERN PORTFOLIO THEORY ................................................................. 8 1.1. Markowitz Portfolio Theory .......................................................................................................................... 8 1.1.1. The Mean-Variance portfolio model ...................................................................................................... 9 1.1.2. The efficient frontier ............................................................................................................................ 13 1.2. The Capital Asset Pricing Model (CAPM)……………………………………………………………… .. 16 1.2.1. A graphical representation of the CAPM…………………………………………………………… .. 18 1.2.2. Critiques of the Capital Asset Pricing theory ....................................................................................... 20 1.3. The Traditional Risk-Based Approaches ..................................................................................................... 22 1.3.1. Risk-based portfolio properties ............................................................................................................ 25 1.3.2. The equally risk contribution portfolio strategy (ERC) ........................................................................ 26 1.3.3. The naïve portfolio strategy – Equally weighted allocation (EW) ...................................................... 29 1.3.4. The global minimum variance strategy (GMV) .................................................................................. 31 1.3.5. The maximum diversification portfolio (MDP) .................................................................................. 33 1.3.6. The maximum sharpe ratio portfolio (MSP) ....................................................................................... 35 1.3.7. The inverse volatility portfolio (IV) .................................................................................................... 35 1.3.8. Market-capitalization portfolio-cap-weighted (MCWP) ..................................................................... 36 1.4. Portfolio Performance Evaluation Techniques ............................................................................................ 37 1.4.1. Sharpe ratio ........................................................................................................................................... 37 1.4.2. Sortino ratio .......................................................................................................................................... 38 1.4.3. Treynor ratio ......................................................................................................................................... 39 1.4.4. Value at risk and the expected shortfall ................................................................................................ 40 1.4.5. The maximum drawdown ..................................................................................................................... 48 1.5. Efficient Frontier Optimization in Python: Maximum Sharpe Ratio vs Minimum Volatility ..................... 49 2. THE HIERARCHICAL RISK PARITY PORTFOLIO OPTIMIZATION ............................................... 63 2.1. The Hierarchical Structure ........................................................................................................................... 63 2.2. The Problem with Quadratic Programming: The Critical Line Algorithm (CLA) ...................................... 64 2.2.1. The framework ..................................................................................................................................... 65 2.2.2. A practical application of the critical line algorithm ........................................................................... 67 2.3. The Hierarchical Risk Parity Portfolio ........................................................................................................ 78 2 Machine Learning Portfolio Optimization: Hierarchical Risk Parity and Modern Portfolio Theory 2.3.1. Tree clustering ...................................................................................................................................... 79 2.3.2. Quasi-diagonalization ........................................................................................................................... 84 2.3.3. Recursive bisection ............................................................................................................................... 86 2.4. The HRP Portfolio Optimization in Python: A Practical Application ......................................................... 90 3. EMPIRICAL HIERARCHICAL RISK PARITY PORTFOLIO ANALYSIS .......................................... 98 3.1. Data Description .......................................................................................................................................... 98 3.1.1. The choice of the index: the Dow Jones Industrial Average ................................................................ 98 3.1.2. The all ETFs portfolio ........................................................................................................................ 105 3.2. Methodology .............................................................................................................................................. 108 3.3 Empirical Results ........................................................................................................................................ 112 3.3.1. The Dow Jones Index portfolio results ............................................................................................... 114 3.3.2. The ETF portfolio results ................................................................................................................... 129 Conclusions ...................................................................................................................................................... 132 Executive Summary ....................................................................................................................................... 135 Bibliography ..................................................................................................................................................... 147 Sitography ........................................................................................................................................................ 152 3 Machine Learning Portfolio Optimization: Hierarchical Risk Parity and Modern Portfolio Theory INTRODUCTION The Portfolio allocation strategy and construction is perhaps one of the most challenging and frequent issues in the asset management industry. Every day, millions of investors around the world seek to maximize their investment in order to achieve their most important financial goals: investing for retirement, buying a house, paying for college or simply earning returns in excess of a particular market benchmark. They try to build up portfolios today that can deliver the financial outcomes they need in the future. A brilliant 24 years old economist, Harry Markowitz, with the publication of his famous paper “Portfolio Selection” in 1952, marked a milestone in the portfolio theory by introducing the mean-variance portfolio allocation approach. Regarded the father of Modern Portfolio Theory (MPT), Markowitz was the first scholar recognizing that various levels of risks are associated with different optimal portfolios depending on the investor’s risk-return preferences. His mean- variance approach was revolutionary since it provided scholars and asset managers with an intuitive quantitative framework to adopt. Before Markowitz work, investment managers usually considered the optimal portfolio as the one achieving the highest expected return. Since it is enormously difficult to optimally allocate a portfolio with the highest expected return, investors should reconsider distributing their resources across alternative investments to build a more diversified portfolio. Furthermore, Markowitz argued that investors, when allocating their wealth, should be interested in only two distinct yet interrelated elements: the expected return of an investment and the risk of the same. According to the mean-variance environment, everyone faces a trade-off when constructing his/her optimal portfolio. Indeed, there is a one to one direct relationship between the variance and the return of an investment. Risk-averse investors would be willing to give up a bit of return in change of safer portfolios, while risk-seeking people want to maximize the expected return no matter the variance. Markowitz argued that the only efficient portfolios are those that for any given amount of volatility, have the highest possible