Regime-based Asset allocation: Dynamic Portfolio Optimization with Hidden Markov Models

Christian Stolborg & Mathias Jørgensen

Student thesis: Master thesis


The purpose of the thesis is to research whether Hidden Markov models (HMM) can be combined with a dynamic asset allocation strategy to control the maximum drawdown and the overall risk of a portfolio. As such, two-state Gaussian HMMs will be trained with time-varying parameters using both maximum-likelihood and jump estimation procedures. This is followed by an involved simulation study focused on testing whether the models are able to converge towards the true parameters when the data is simulated from a mixture of Gaussian and t-distributions. The analysis finds strong convergence for both models when the data is simulated from the Gaussian distribution, however, when training the models on data simulated from a mixture of t-distributions, the jump model is found to be more robust. Furthermore, by extending on the previous literature by Rydén et. al (1998), Bulla (2011) and Nystrup (2017), the thesis examines how the models replicate the stylized facts of financial returns. The results show that both models are able to somewhat reproduce the stylized facts, although the jump model achieves better results, particularly when it comes to reproducing the long memory of financial returns. In the final section, the analysis combines the HMMs with a model predictive control (MPC) framework, in which the primary objective is risk control, mostly evaluated through a reduction in drawdowns and standard deviations. The analysis finds that the implementation of a dynamic regime-based approach with daily portfolio rebalancings does not lead to a loss in mean-variance efficiency, even after trading costs. Lastly, the portfolio exercise finds a substantial improvement in performance measured through Sharpe and Calmar ratios, when the MPC portfolios are benchmarked against alternative portfolios. Finally, the authors contribute to the literature by publishing the open-source package HMMpy† , since there do not currently exist any packages for training HMMs using the jump estimation approach.

EducationsMSc in Finance and Investments, (Graduate Programme) Final Thesis
Publication date2021
Number of pages119