الاستفادة من ماركويتز، والغابات العشوائية، وXGBoost لتحقيق التنويع الأمثل لمحافظ الأسهم في جنوب أفريقيا Leveraging Markowitz, random forest, and XGBoost for optimal diversification of South African stock portfolios

شارك:
المجلة: Data Science in Finance and Economics، المجلد: 5، العدد: 2
DOI: https://doi.org/10.3934/dsfe.2025010
تاريخ النشر: 2025-01-01
المؤلف: Esau Moyoweshumba وآخرون
الموضوع الرئيسي: المخاطر وتحسين المحفظة الاستثمارية

نظرة عامة

تبحث هذه الدراسة في فعالية نماذج ماركويت التقليدية وتقنيات التعلم الآلي في تحسين محافظ الأسهم المتنوعة. على وجه التحديد، تقارن بين نهجين من ماركويت – نظرية المحفظة الحديثة وحدود الكفاءة وبرمجة التباين التربيعي – مع نموذجين من التعلم الآلي: مصنف الغابة العشوائية ومصنف تعزيز التدرج المتطرف (XGBoost). استخدمت التحليلات بيانات سوق الأسهم التاريخية من بورصة جوهانسبرغ لتحديد الأنماط وتخصيص أوزان الأسهم، بهدف تقليل المخاطر مع زيادة العوائد.

تكشف النتائج أن المحفظة التي تم إنشاؤها بواسطة نموذج XGBoost تفوقت على الآخرين، محققة نسبة شارب تبلغ 1.44، تليها مصنف الغابة العشوائية عند 1.30. بالمقابل، حققت نماذج ماركويت نسب شارب أقل تبلغ 0.89 و0.41، بينما كانت محفظة مؤشر JSE Top 40 هي الأدنى عند 0.35. تؤكد هذه النتائج تفوق نماذج التعلم الآلي في تحسين المحافظ، مما يبرز قدرتها على التقاط الديناميكيات المعقدة للسوق. ومع ذلك، تظل النماذج التقليدية ضرورية لفهم مبادئ تنويع المحفظة، مما يشير إلى أن المستثمرين قد يستفيدون من دمج كلا النهجين في استراتيجياتهم.

مقدمة

تؤكد مقدمة هذه الورقة البحثية على الأهمية الحاسمة لتنويع المحفظة الأمثل في المالية، لا سيما في إدارة الاستثمار، حيث تلعب دورًا استراتيجيًا في توجيه قرارات الاستثمار الضرورية للتنمية الاقتصادية. تتماشى هذه الدراسة مع أهداف التنمية المستدامة (SDGs) التي وضعتها الأمم المتحدة، مستهدفة بشكل خاص تقليل الفقر (SDG 1)، والعمل اللائق والنمو الاقتصادي (SDG 8)، والصناعية المستدامة (SDG 9). تحفز هذه الأهداف المعنيين للبحث عن استراتيجيات استثمارية تعظم العوائد مع تقليل المخاطر المالية، وهي تحدٍ يتعقد بسبب التبادل المعقد بين المخاطر والعوائد في تحسين المحفظة.

تهدف الدراسة إلى بناء وتحسين محفظة أسهم متنوعة من خلال مقارنة نماذج ماركويت التقليدية مع تقنيات التعلم الآلي. تشمل الأهداف الرئيسية استخدام الحدود الكفؤة لتحسين المحفظة، وتوظيف تقنيتين من ماركويت لتقليل المخاطر، وتطوير طرق التعلم الآلي لتحديد محفظة مثالية بناءً على أعلى نسبة شارب. تسهم الدراسة في المجال من خلال مقارنة منهجيات كلا النهجين بشكل منهجي، ودمج استراتيجيات تقليل المخاطر التقليدية مع طرق التعلم الآلي المبتكرة، وتطبيق هذه النماذج على سلسلة زمنية ذات صلة من الأسهم من 1 يناير 2018 إلى 30 يونيو 2024. يضمن هذا النهج أن تكون النتائج قوية وتعكس الديناميكيات الحالية للسوق، مما يؤدي في النهاية إلى استراتيجية استثمار أكثر فعالية. تم هيكلة الورقة لتشمل مراجعة أدبية، ومنهجية مفصلة، وتحليل النتائج، واستنتاج يلخص النتائج.

طرق

في هذا القسم، يوضح المؤلفون المنهجيات المستخدمة لتحقيق أهداف الدراسة، بما في ذلك مصادر البيانات، وخطوات المعالجة المسبقة، والتقنيات التحليلية. تستخدم الدراسة نماذج مالية تقليدية، وتحديدًا الحدود الكفؤة وتحسين التباين التربيعي (QMVP)، لتأسيس قاعدة للمقارنة. بالإضافة إلى ذلك، يتم تنفيذ نماذج التعلم الآلي المتقدمة، بما في ذلك الغابة العشوائية وتعزيز التدرج المتطرف، لتعزيز دقة التنبؤ وتحسين الأداء. يسمح هذا النهج المزدوج بتقييم شامل لكل من المنهجيات الكلاسيكية والمعاصرة في سياق الدراسة.

نتائج

في هذه الدراسة البحثية، كان الهدف الرئيسي هو تطوير محفظة أسهم متنوعة مثالية للمستثمرين في جنوب إفريقيا من خلال استخدام كل من النماذج التقليدية ونماذج التعلم الآلي. تم تقييم المحافظ بناءً على نسبة شارب، التي تقيس العوائد المعدلة حسب المخاطر، وتمت مقارنة أدائها بمحفظة تتكون من أفضل أربعين شركة في بورصة جوهانسبرغ (JSE). شمل التحليل فحصًا تفصيليًا لبيانات السلاسل الزمنية، وتحليل استكشافي، وإحصائيات ملخصة، تلاها بناء محافظ متنوعة، بما في ذلك تلك المستندة إلى نهج التباين التربيعي، وتصنيف الغابة العشوائية، وتعزيز التدرج المتطرف (XGBoost).

كشفت النتائج الرئيسية أن نموذج XGBoost أنتج المحفظة الأكثر ملاءمة، محققًا عائدًا قدره 26.33% ونسبة شارب تبلغ 1.43، مما يدل على تفوقه بين النماذج المختبرة. جاء نموذج الغابة العشوائية (RF) في المرتبة الثانية، محققًا عائدًا قدره 22.38% ونسبة شارب تبلغ 1.30، وبالتالي تفوق على النماذج التقليدية. تسلط هذه النتائج الضوء على فعالية تقنيات التعلم الآلي في تحسين المحافظ ضمن سياق سوق الأسهم في جنوب إفريقيا.

مناقشة

تسلط قسم المناقشة في الورقة البحثية الضوء على التحديات المستمرة في تحسين تنويع محافظ الأسهم، وهي قضية حاسمة للمستثمرين الذين يسعون إلى تعظيم العوائد مع تقليل المخاطر المالية. يشير المؤلفون إلى النظريات الأساسية في إدارة المحافظ، ولا سيما نظرية المحفظة الحديثة لماركويت (MPT)، التي تؤكد على أهمية التنويع لتخفيف المخاطر من خلال تخصيص رأس المال عبر أسهم متنوعة. على الرغم من مزايا التنويع، يشير المؤلفون إلى أنه يمكن أن يؤدي إلى تقليل العوائد الإجمالية بمرور الوقت. لقد دمجت التطورات الأخيرة في تحسين المحافظ تقنيات التعلم الآلي، التي أظهرت أداءً متفوقًا مقارنة بالنماذج التقليدية. على سبيل المثال، حددت دراسات أويكون (2024) وسوتين (2024) مصنفات الدعم (SVC) كنماذج الأكثر فعالية في تحسين عوائد محافظ الأسهم، بينما أظهرت دراسات كومار (2024) فعالية التعلم المعزز في إدارة المحافظ الديناميكية.

تناقش الورقة أيضًا المنهجية المستخدمة في بناء محفظة مثالية، باستخدام بيانات سوق الأسهم التاريخية من 26 شركة عبر سبعة قطاعات في بورصة جوهانسبرغ. يوضح المؤلفون عملية إعداد البيانات، بما في ذلك حساب العوائد اليومية وإنشاء مصفوفة التباين والتغاير لتقييم المخاطر. تتضمن عملية التحسين برمجة تربيعية لتحقيق توازن بين العوائد المتوقعة والمخاطر، مع قيود تضمن أن تساوي الأوزان الإجمالية واحدًا وأن لا يحدث بيع قصير. تؤكد النتائج على أهمية تعظيم العوائد المعدلة حسب المخاطر وتبرز الانتقال من MPT التقليدية إلى نماذج التعلم الآلي الأكثر تطورًا، التي يتم اعتمادها بشكل متزايد لتحسين المحافظ في التحليل المالي المعاصر.

Journal: Data Science in Finance and Economics, Volume: 5, Issue: 2
DOI: https://doi.org/10.3934/dsfe.2025010
Publication Date: 2025-01-01
Author(s): Esau Moyoweshumba et al.
Primary Topic: Risk and Portfolio Optimization

Overview

This research investigates the effectiveness of traditional Markowitz models and machine learning techniques in optimizing diversified stock portfolios. Specifically, it compares two Markowitz approaches—modern portfolio theory efficient frontier and quadratic mean-variance programming—with two machine learning models: random forest classifier and Extreme Gradient Boosting (XGBoost) classifier. The analysis utilized historical stock market data from the Johannesburg Stock Exchange to identify patterns and allocate stock weights, aiming to minimize risk while maximizing returns.

The findings reveal that the portfolio generated by the XGBoost model outperformed the others, achieving a Sharpe ratio of 1.44, followed by the random forest classifier at 1.30. In contrast, the Markowitz models yielded lower Sharpe ratios of 0.89 and 0.41, while the JSE Top 40 Index portfolio had the lowest at 0.35. These results underscore the superiority of machine learning models in portfolio optimization, highlighting their capacity to capture complex market dynamics. Nonetheless, traditional models remain essential for understanding portfolio diversification principles, suggesting that investors may benefit from integrating both approaches in their strategies.

Introduction

The introduction of this research paper emphasizes the critical importance of optimal portfolio diversification in finance, particularly in investment management, as it plays a strategic role in guiding investment decisions essential for economic development. This study aligns with the Sustainable Development Goals (SDGs) established by the United Nations, specifically targeting poverty reduction (SDG 1), decent work and economic growth (SDG 8), and sustainable industrialization (SDG 9). These goals motivate stakeholders to seek investment strategies that maximize returns while minimizing financial risks, a challenge that is compounded by the complex trade-off between risk and return in portfolio optimization.

The research aims to construct and optimize a diversified stock portfolio by comparing traditional Markowitz models with machine learning techniques. Key objectives include utilizing the efficient frontier to optimize the portfolio, employing two Markowitz techniques for risk minimization, and developing machine learning methods to identify an optimal portfolio based on the highest Sharpe ratio. The study contributes to the field by systematically comparing the strengths of both approaches, integrating traditional risk-minimization strategies with innovative machine learning methods, and applying these models to a relevant stock time series from January 1, 2018, to June 30, 2024. This approach ensures that the findings are robust and reflective of current market dynamics, ultimately leading to a more effective investment strategy. The paper is structured to include a literature review, detailed methodology, results analysis, and a conclusion summarizing the findings.

Methods

In this section, the authors detail the methodologies employed to fulfill the study’s objectives, encompassing data sources, pre-processing steps, and analytical techniques. The research utilizes traditional financial models, specifically the efficient frontier and quadratic mean-variance optimization (QMVP), to establish a baseline for comparison. Additionally, advanced machine learning models, including random forest and eXtreme gradient boosting, are implemented to enhance predictive accuracy and optimize performance. This dual approach allows for a comprehensive evaluation of both classical and contemporary methodologies in the context of the study.

Results

In this research study, the primary aim was to develop an optimal diversified stock portfolio for South African investors by employing both traditional and machine-learning models. The portfolios were evaluated based on the Sharpe ratio, which measures risk-adjusted returns, and their performance was benchmarked against a portfolio comprising the top forty companies on the Johannesburg Stock Exchange (JSE). The analysis included a detailed examination of the time series data, exploratory analysis, and summary statistics, followed by the construction of various portfolios, including those based on the quadratic mean-variance approach, random forest classification, and eXtreme gradient boosting (XGBoost).

The key findings revealed that the XGBoost model produced the most favorable portfolio, achieving a return of 26.33% and a Sharpe ratio of 1.43, indicating its superiority among the models tested. The random forest (RF) model followed as the second-best, yielding a return of 22.38% and a Sharpe ratio of 1.30, thus outperforming traditional models. These results highlight the effectiveness of machine learning techniques in portfolio optimization within the South African stock market context.

Discussion

The discussion section of the research paper highlights the ongoing challenges of optimizing stock portfolio diversification, a critical concern for investors aiming to maximize returns while minimizing financial risk. The authors reference foundational theories in portfolio management, notably Markowitz’s Modern Portfolio Theory (MPT), which emphasizes the importance of diversification to mitigate risk through the allocation of capital across various stocks. Despite the advantages of diversification, the authors note that it can lead to reduced overall returns over time. Recent advancements in portfolio optimization have incorporated machine learning techniques, which have shown superior performance compared to traditional models. For instance, studies by Uykun (2024) and Sutiene et al. (2024) identified support vector classifiers (SVC) as the most effective models for optimizing stock portfolio returns, while Kumar et al. (2024) demonstrated the efficacy of reinforcement learning in dynamic portfolio management.

The paper also discusses the methodology employed in constructing an optimal portfolio, utilizing historical stock market data from 26 companies across seven sectors on the Johannesburg Stock Exchange. The authors detail the data preparation process, including the calculation of daily returns and the establishment of a variance-covariance matrix to assess risk. The optimization process involves quadratic programming to balance expected returns against risk, with constraints ensuring that total weights equal one and that no short selling occurs. The findings underscore the significance of maximizing risk-adjusted returns and highlight the transition from traditional MPT to more sophisticated machine learning models, which are increasingly being adopted for portfolio optimization in contemporary financial analysis.