Leveraging Markowitz, random forest, and XGBoost for optimal diversification of South African stock portfolios
The challenge for investors is the uncertainty of investing in a diversified portfolio using traditional techniques. This research project aimed to investigate and compare the effectiveness of two traditional Markowitz models and two machine learning techniques in optimizing diversified stock portfolios. The Markowitz models employed were the modern portfolio theory efficient frontier and quadratic mean-variance programming. The machine learning models utilized were the random forest classifier and the Extreme Gradient Boosting classifier. South African historical stock market time series listed companies on the Johannesburg Stock Exchange were analyzed to identify patterns and allocate stock weights to inform optimal stock portfolio diversification decisions. This minimizes risk while maximizing returns. Furthermore, the results are benchmarked against the JSE Top 40 Index. The portfolio generated by the eXtreme Gradient Boosting model performed the best, achieving a Sharpe ratio of 1.44. It is followed by the portfolio generated by the Random Forest classifier with a Sharpe ratio equal to 1.30. The portfolios generated by Modern Portfolio Theory Efficient Frontier and Quadratic Mean-Variance Programming had Sharpe ratios of 0.89 and 0.41, respectively. However, the JSE Top 40 Index portfolio had the lowest Sharpe ratio of 0.35. These results confirm the superiority of machine learning models over traditional Markowitz models. However, traditional models remain fundamental in understanding the principles of portfolio diversification. Machine learning models may be prioritized by investors primarily because of their ability to capture stochastic insights and market dynamics.
Authors
- Modisane Seitshiro (ORCID: https://orcid.org/0000-0001-9557-3714)
- Esau Moyoweshumba
Institutions
- African Institute for Mathematical Sciences (ZA)
- North-West University (ZA)
- National Institute for Theoretical Physics (ZA)
Publication Details
- Journal
- Data Science in Finance and Economics
- Published
- 2025-01-01
- DOI
- https://doi.org/10.3934/dsfe.2025010
- Citations
- 1
- Primary Topic
- Financial Risk and Volatility Modeling
- Type
- article
- Field-Weighted Citation Impact
- 2.21