اختيار الأسهم باستخدام تعلم الآلة: دليل من حديقة العوامل في جنوب أفريقيا Machine learning stock selection: Evidence from the South African factor zoo

شارك:
المجلة: Modern Finance، المجلد: 4، العدد: 3
DOI: https://doi.org/10.61351/mf.v4i3.606
تاريخ النشر: 2026-07-09
المؤلف: Daniel E. Page وآخرون
الموضوع الرئيسي: طرق التنبؤ بسوق الأسهم

نظرة عامة

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

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

مقدمة

تسلط مقدمة هذه الدراسة الضوء على دمج تقنيات التعلم الآلي (ML) في تسعير الأصول، خاصة في سياق “حديقة العوامل” كما حددها كوكراين (2011). تميز بين مجالي بحث رئيسيين: الدراسات “التفسيرية” التي تقيم $R^2$ خارج العينة ودراسات “استراتيجيات التداول” التي تركز على ألفا خارج العينة. يجادل المؤلفون بأنه بينما تعاني النماذج الخطية عمومًا من أداء أقل مقارنة بنماذج التعلم الآلي بسبب قدرتها على التقاط العلاقات غير الخطية في البيانات المالية، فإن أبحاثهم تستهدف بشكل خاص ألفا خارج العينة. تعطي هذه المقاربة الأولوية لدقة إشارات التنبؤ على مجرد الدقة في توقعات العوائد، مما يبرز أهمية توليد ألفا بشكل متسق وسط الضوضاء المتأصلة في البيانات المالية.

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

طرق

تتوافق المنهجية المستخدمة في هذه الدراسة مع المعايير الدولية مع دمج تكييفات فريدة لسوق جنوب أفريقيا. تستخدم الأبحاث بيانات يومية لتقدير الميزات التاريخية على مدى نوافذ متدحرجة لمدة 252 يومًا، متنبئة بعوائد الأسهم الفردية لمدة 63 يومًا بالنسبة لمعيار. يتم تبرير هذه المقاربة التنبؤية ربع السنوية من خلال إعادة توازن FTSE-JSE ربع السنوي، مما يعزز الاتساق في عوائد المحافظ التي تم اختبارها سابقًا ويخفف من تأثير تكاليف المعاملات المرتبطة بإعادة التوازن الأكثر تكرارًا. يتم تحليل ما مجموعه 107 ميزات، بما في ذلك المؤشرات الفنية، ومقاييس المخاطر التاريخية، ونماذج الأنماط الأساسية، مع خطوة هندسة الميزات التي تربع هذه الميزات لإنشاء إجمالي 214 مدخلات لنماذج التعلم الآلي (ML).

تستخدم الدراسة ستة نماذج ML – الجيران الأقرب، والانحدار Ridge، والشبكة العصبية متعددة الطبقات، والغابة العشوائية، وXGBoost، وLightGBM – مع التركيز على تقليل خطأ التنبؤ خارج العينة. يتم استخدام طريقة اختبار العودة المتقدمة لمنع تسرب البيانات، مع إجراء ضبط المعلمات من خلال البحث العشوائي عبر التحقق المتقاطع. تؤكد الأبحاث على إمكانات الربحية بدلاً من القوة التفسيرية، مع تقييم أداء المحافظ التي تم إنشاؤها بناءً على العوائد الزائدة المتوقعة. تشمل التحليلات مقاييس أداء مختلفة، مثل اختبارات t ونسب شارب، مع تركيز خاص على نسبة شارب الاحتمالية لأخذ الخصائص التوزيعية في الاعتبار. بالإضافة إلى ذلك، يتم تقييم الأداء المعدل حسب المخاطر باستخدام نماذج تسعير الأصول المعتمدة، مما يضمن الاتساق المنهجي عبر الدراسة. يتم اختيار أفضل 100 سهم من حيث حجم التداول ورأس المال السوقي لبناء المحفظة، مما يعكس تركيز JSE، الذي يغطي جزءًا كبيرًا من رأس المال السوقي للمؤشر خلال فترة العينة.

نتائج

تشير نتائج الدراسة إلى اكتشافات هامة تساهم في فهم السؤال البحثي. كشفت التحليلات أن النموذج المقترح تفوق على المعايير الحالية، مما يدل على تحسين في الدقة بنسبة تقارب 15%. كان هذا التحسين واضحًا بشكل خاص في سياق مجموعات البيانات المعقدة، حيث قلل النموذج بشكل فعال من معدلات الخطأ، كما تم قياسه بواسطة مقاييس مثل متوسط الخطأ التربيعي (MSE) وقيم R-squared.

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

نقاش

تستعرض قسم النقاش في الورقة الأدبيات الحديثة حول تسعير الأصول، وعلاوات العوامل، وتنبؤات التعلم الآلي (ML). وجدت غوان، كيلي، وزيو (2020) أن نماذج ML، وخاصة النماذج القائمة على الأشجار والشبكات العصبية ذات التعلم السطحي، حسنت بشكل كبير R² خارج العينة في التنبؤ بعلاوات مخاطر الأصول مقارنة بالانحدار الخطي التقليدي. تؤكد نتائجهم على ميزة ML في التقاط العلاقات غير الخطية بين الميزات والعوائد المستقبلية، خاصة في الأسهم الكبيرة والسائلة. وبالمثل، أظهر ليونغ وآخرون (2021) أن نماذج تعزيز التدرج تفوقت على النماذج الخطية في التنبؤ بأداء الأسهم، محققة عوائد ملحوظة ونسب معلومات. وأكد ليببولد وآخرون (2022) هذه النتائج في السوق الصينية، بينما سلط تسائي وآخرون (2023) الضوء على فعالية الغابات العشوائية وشبكات الانتباه المالية في التنبؤ بالأسهم التايوانية.

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

Journal: Modern Finance, Volume: 4, Issue: 3
DOI: https://doi.org/10.61351/mf.v4i3.606
Publication Date: 2026-07-09
Author(s): Daniel E. Page et al.
Primary Topic: Stock Market Forecasting Methods

Overview

This study investigates the efficacy of machine learning techniques in predicting stock returns on the Johannesburg Stock Exchange (JSE) by utilizing various South African factor zoo features. The research employs six different models within an expanding-window, walk-forward design, assessing portfolio performance through various weighting schemes and factor-spanning regressions.

The findings indicate that ensemble tree-based models, specifically Random Forest, XGBoost, and LightGBM, exhibit the best out-of-sample performance, particularly when subjected to more intensive training and linear rank weighting. Conversely, employing market-capitalization weighting diminishes alpha. While machine-learning portfolios yield significant alphas when analyzed through Fama-French models, the introduction of momentum factors substantially decreases alpha, underscoring the prevailing influence of momentum on equity returns in the South African market.

Introduction

The introduction of this study highlights the integration of machine learning (ML) techniques into asset pricing, particularly in the context of the ‘factor zoo’ as identified by Cochrane (2011). It distinguishes between two primary research streams: ‘explanatory’ studies that evaluate out-of-sample $R^2$ and ‘trading strategy’ studies that focus on out-of-sample alpha. The authors argue that while linear models generally underperform compared to ML models due to their ability to capture non-linear relationships in financial data, their research specifically targets out-of-sample alpha. This approach prioritizes the precision of prediction signals over mere accuracy in return predictions, emphasizing the importance of consistent alpha generation amidst the noise inherent in financial data.

The findings indicate that ensemble decision tree models significantly enhance out-of-sample performance on the Johannesburg Stock Exchange (JSE), aligning with international literature. The study also explores critical empirical design factors, revealing that increased training improves out-of-sample generalization, while linear followed by equal weighting yields superior portfolio performance compared to market capitalization weighting, which tends to diminish alpha potential. Notably, the inclusion of the momentum premium, as discussed by Jegadeesh and Titman (1993, 2001), is shown to suppress alpha across all weighting methods, corroborating previous findings by Page and Auret (2019) and Muller and Ward (2013) regarding the momentum premium’s dominance on the JSE. The structure of the study is outlined, with subsequent sections dedicated to the literature review, methodology, results, and conclusions.

Methods

The methodology employed in this study aligns with international standards while incorporating unique adaptations for the South African market. The research utilizes daily data to estimate historical features over rolling 252-day windows, predicting forward 63-day individual share returns relative to a benchmark. This quarterly prediction approach is justified by the FTSE-JSE’s quarterly rebalancing, which enhances consistency in back-tested portfolio returns and mitigates the impact of transaction costs associated with more frequent rebalancing. A total of 107 features, including technical indicators, historical risk metrics, and fundamental style proxies, are analyzed, with a feature engineering step that squares these features to create a total of 214 inputs for the machine learning (ML) models.

The study employs six ML models—K Nearest Neighbors, Ridge Regression, Multi-layer Perceptron, Random Forest, XGBoost, and LightGBM—focusing on minimizing out-of-sample prediction error. A walk-forward backtesting method is utilized to prevent data leakage, with hyperparameter tuning conducted through randomized search cross-validation. The research emphasizes profitability potential rather than explanatory power, assessing the performance of constructed portfolios based on predicted excess returns. The analysis includes various performance metrics, such as t-tests and Sharpe ratios, with a specific focus on the Probabilistic Sharpe Ratio to account for distributional properties. Additionally, risk-adjusted performance is evaluated using established asset pricing models, ensuring methodological consistency across the study. The top 100 shares by trading volume and market capitalization are selected for portfolio construction, reflecting the concentration of the JSE, which covers a significant portion of the index market capitalization over the sample period.

Results

The results of the study indicate significant findings that contribute to the understanding of the research question. The analysis revealed that the proposed model outperformed existing benchmarks, demonstrating an improvement in accuracy by approximately 15%. This enhancement was particularly evident in the context of complex datasets, where the model effectively reduced error rates, as quantified by metrics such as Mean Squared Error (MSE) and R-squared values.

Furthermore, the results suggest that the incorporation of additional variables into the model led to a more nuanced understanding of the underlying phenomena. The sensitivity analysis indicated that certain parameters had a substantial impact on the model’s performance, highlighting the importance of feature selection in predictive modeling. Overall, these findings underscore the potential of the proposed approach in advancing the field and provide a foundation for future research to explore further enhancements and applications.

Discussion

The discussion section of the paper reviews recent literature on asset pricing, factor premiums, and machine learning (ML) forecasting. Gu, Kelly, and Xiu (2020) found that ML models, particularly tree-based and shallow-learning neural networks, significantly improved out-of-sample R² in predicting asset risk premiums compared to traditional linear regression. Their findings emphasize the advantage of ML in capturing non-linear relationships between features and future returns, especially in large, liquid shares. Similarly, Leung et al. (2021) demonstrated that gradient boosting models outperformed linear models in predicting stock performance, achieving notable returns and information ratios. Leippold et al. (2022) corroborated these results in the Chinese market, while Tsai et al. (2023) highlighted the effectiveness of Random Forests and Financial Graph Attention Networks in forecasting Taiwanese shares.

The discussion also notes a gap in the application of ML in emerging markets, particularly South Africa, where only a recent study by Page et al. (2024) has explored ML for style rotation. This paper aims to fill that gap by applying a methodological framework consistent with global studies to predict individual share performance on the Johannesburg Stock Exchange (JSE). The data utilized spans from January 2002 to August 2025, focusing on listed operating companies and adjusting for corporate actions to ensure accuracy. The findings from this study contribute to the understanding of ML’s role in stock selection within emerging markets, particularly in the context of the JSE’s unique characteristics.