تصنيف إشارات تداول الأسهم المعتمد على الغابات العشوائية متعددة المتغيرات لسوق الأسهم الهندية Multivariate random forest-based stock trading signal classification for the Indian equity market

شارك:
المجلة: Accounting، المجلد: 12، العدد: 4
DOI: https://doi.org/10.5267/j.ac.2026.9.001
تاريخ النشر: 2026-01-01
المؤلف: Somnath Hase وآخرون
الموضوع الرئيسي: طرق التنبؤ بسوق الأسهم

نظرة عامة

تقدم هذه الدراسة نموذج غابة عشوائية متعددة المتغيرات (MRF) مصمم لتصنيف إشارات تداول الأسهم في سوق الأسهم الهندي. من خلال استخدام مصنفات غابة عشوائية منفصلة مصممة لتناسب الخصائص الفريدة للشركات الفردية، تستفيد الدراسة من أخذ عينات البوتستراب واختيار الميزات العشوائية لكشف العلاقات المعقدة بين مؤشرات فنية مختلفة، مثل التقلبات، والمتوسطات المتحركة، ومؤشرات الزخم (EMA، RSI، MACD). النهج الجماعي يقلل بشكل فعال من التباين المرتبط بأشجار القرار الفردية، مما يقلل من الإفراط في التخصيص ويدير الطبيعة عالية الأبعاد لبيانات السلاسل الزمنية المالية.

يظهر النموذج دقة تصنيف عامة جديرة بالثناء تبلغ 84%، مع درجات F1 تبلغ 0.84، 0.86، و0.78 لفئات الشراء، والاحتفاظ، والبيع، على التوالي. تشير هذه النتائج إلى إطار عمل مضبوط جيدًا قادر على معالجة عدم توازن الفئات النموذجية في ديناميكيات السوق. ومع ذلك، تختلف مستويات الثقة للإشارات المولدة، حيث تحقق إشارات الشراء مستوى عالٍ يبلغ 89.5% وإشارات البيع عند 62.0%، مما يشير إلى أن فعالية النموذج تعتمد على الظروف السائدة في السوق. تشمل اتجاهات البحث المستقبلية دمج المتغيرات الاقتصادية الكلية الخارجية وتحليل المشاعر لتعزيز دقة تصنيف جانب البيع وتعزيز قوة النموذج عبر بيئات السوق المتقلبة.

مقدمة

تسلط مقدمة ورقة البحث الضوء على تعقيدات التنبؤ بسوق الأسهم، مع التأكيد على تأثير العوامل الاقتصادية والسياسية والاجتماعية المختلفة على أسعار الأسهم. تعتبر التنبؤات الدقيقة ضرورية للمستثمرين، حيث يمكن أن تخفف من المخاطر وتعزز العوائد بينما توفر رؤى حول الاتجاهات الاقتصادية الأوسع (Shubhrata et al., n.d.; Ampomah et al., 2021). لقد أحدث ظهور التعلم الآلي (ML) ثورة في التنبؤ المالي من خلال تمكين تحديد الأنماط الدقيقة داخل مجموعات البيانات الكبيرة، وغالبًا ما يتفوق على الأساليب التحليلية التقليدية. على وجه التحديد، تستخدم طريقة الغابة العشوائية، وهي تقنية تصنيف تحت الإشراف، مجموعة من أشجار القرار لمكافحة الإفراط في التخصيص من خلال تجميع البوتستراب (bagging)، الذي يختار عشوائيًا مجموعات فرعية من الميزات (Aloud, n.d.; Nti et al., 2019).

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

طرق

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

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

مناقشة

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

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

Journal: Accounting, Volume: 12, Issue: 4
DOI: https://doi.org/10.5267/j.ac.2026.9.001
Publication Date: 2026-01-01
Author(s): Somnath Hase et al.
Primary Topic: Stock Market Forecasting Methods

Overview

This research presents a Multivariate Random Forest (MRF) model designed for stock trading signal classification within the Indian equity market. By employing separate Random Forest classifiers tailored to the unique characteristics of individual companies, the study leverages bootstrap sampling and random feature selection to uncover complex relationships among various technical indicators, such as volatility, moving averages, and momentum indicators (EMA, RSI, MACD). The ensemble approach effectively reduces the variance associated with individual decision trees, thereby mitigating overfitting and managing the high-dimensional nature of financial time series data.

The model demonstrates a commendable overall classification accuracy of 84%, with F1-scores of 0.84, 0.86, and 0.78 for the BUY, HOLD, and SELL classes, respectively. These results indicate a well-calibrated framework capable of addressing class imbalances typical in market dynamics. However, the confidence levels for generated signals vary, with buy-side signals achieving a high of 89.5% and sell-side signals at 62.0%, suggesting that model effectiveness is contingent on prevailing market conditions. Future research directions include the integration of external macroeconomic variables and sentiment analysis to enhance sell-side classification accuracy and bolster model robustness across fluctuating market environments.

Introduction

The introduction of the research paper highlights the complexities of stock market forecasting, emphasizing the influence of various economic, political, and social factors on stock prices. Accurate predictions are crucial for investors, as they can mitigate risks and enhance returns while providing insights into broader economic trends (Shubhrata et al., n.d.; Ampomah et al., 2021). The advent of machine learning (ML) has revolutionized financial forecasting by enabling the identification of subtle patterns within large datasets, often outperforming traditional analytical methods. Specifically, the random forest method, a supervised classification technique, utilizes an ensemble of decision trees to combat overfitting through bootstrap aggregating (bagging), which randomly selects subsets of features (Aloud, n.d.; Nti et al., 2019).

Additionally, the section discusses the importance of class balance and domain sampling in financial asset modeling. It notes that historical target class distributions can reveal imbalances, often resulting from macroeconomic trends or market conditions. The analysis indicates a predominance of the HOLD state with 1,417 instances, compared to 620 BUY and 538 SELL signals, reflecting typical market behavior where price consolidations are more frequent than clear directional trends. This understanding of class distribution is vital for improving model training and forecasting accuracy.

Methods

The research employs the Random Forest algorithm, a robust machine learning technique that utilizes an ensemble of decision trees to enhance classification accuracy and reliability. Each tree in the ensemble is trained on different random subsets of the data, and their predictions are aggregated through a voting mechanism for classification tasks or averaging for regression tasks. The Gini impurity criterion is used to determine the optimal feature splits, enabling effective class separation. For instance, in predicting trading signals, each tree outputs a signal of either 1 (buy) or 0 (sell), with the final decision being based on the majority vote among the trees.

The experimental results section provides an in-depth analysis of the multivariate Random Forest model’s performance in forecasting various classes of financial assets. This predictive framework leverages historical equity data to generate market signals, demonstrating the model’s capability in financial forecasting. The findings underscore the effectiveness of the Random Forest approach in enhancing prediction accuracy within the financial domain.

Discussion

The discussion section of the research paper outlines the development and evaluation of a Multivariate Random Forest-based machine learning model aimed at predicting stock trading signals in the Indian equity market. The model utilizes a comprehensive dataset that includes historical stock prices and macroeconomic indicators, enabling it to identify complex market trends. Key technical indicators such as Moving Averages (MA), Relative Strength Index (RSI), and Moving Average Convergence Divergence (MACD) were engineered to enhance the model’s predictive capabilities. The preprocessing steps involved handling missing data, normalizing features, and employing a sliding window approach to convert time-series data into supervised learning samples.

The model’s performance was rigorously evaluated using metrics like Mean Absolute Error (MAE), Mean Absolute Percentage Error (MAPE), and F1-scores, achieving an overall classification accuracy of 84%. The results indicated strong predictive capabilities, particularly in consumer-facing sectors, while performance was notably lower in sectors influenced by non-technical factors. The study highlights the model’s ability to manage class imbalances effectively, providing reliable trading signals (Buy, Hold, Sell) with varying confidence levels. Future research directions include integrating external macroeconomic variables and sentiment analysis to further enhance prediction accuracy, particularly for sell-side signals.