DOI: https://doi.org/10.3390/analytics4010005
تاريخ النشر: 2025-02-11
المؤلف: Olamilekan Shobayo وآخرون
الموضوع الرئيسي: طرق التنبؤ بسوق الأسهم
نظرة عامة
تقيّم هذه الدراسة الأداء التنبؤي لثلاثة نماذج—الانحدار باستخدام الدعم المتجه (SVR)، والشبكات العصبية المتكررة (RNN)، وذاكرة طويلة وقصيرة الأجل (LSTM)—باستخدام مجموعة بيانات مؤشر NGX الشامل. تم تقييم النماذج من خلال مقاييس خطأ متنوعة، بما في ذلك متوسط الخطأ المطلق (MAE)، ومتوسط الخطأ التربيعي (MSE)، وجذر متوسط مربع الخطأ (RMSE)، ومتوسط نسبة الخطأ (MPE)، وقيم R-squared. تفوقت LSTM على النماذج الأخرى، محققة قيمة R-squared تبلغ 0.993 مع نافذة زمنية مدتها 60 يومًا، خاصة عند دمج بيانات السوق الذاتية والمؤشرات الفنية. في المقابل، أظهر SVR أداءً موثوقًا في ظل ظروف أبسط لكنه واجه صعوبة مع الأنماط المعقدة، بينما واجه RNN قيودًا بسبب مشكلة التدرج المتلاشي.
تشير النتائج إلى أنه بينما يمكن أن يكون SVR وRNN فعالين في سيناريوهات معينة، فإن LSTM هو النموذج الأكثر قوة لتنبؤ أسعار الأسهم، حيث حقق أدنى قيم لـ MSE (0.000343) وRMSE (0.018522). يُعزى هذا الأداء المتفوق إلى قدرة LSTM على إدارة الاعتماديات طويلة الأجل، مما يجعله بارعًا بشكل خاص في التنقل في ظروف السوق المتقلبة. تقترح الدراسة أن دمج بيانات خارجية إضافية، مثل مشاعر الأخبار المالية، يمكن أن يعزز دقة التنبؤ لنماذج التعلم العميق، مما يوفر رؤى قيمة للمستثمرين والمحللين الماليين.
مقدمة
تتناول مقدمة هذه الدراسة التحديات المتعلقة بتنبؤ أسعار سوق الأسهم، مع التأكيد على قيود نماذج التنبؤ التقليدية مثل الانحدار الخطي وARIMA في التقاط الاعتماديات غير الخطية والتسلسلية الموجودة في البيانات المالية. لمواجهة هذه القضايا، تستكشف البحث فعالية تقنيات التعلم الآلي (ML) والتعلم العميق (DL)، مع مقارنة خاصة بين نماذج الانحدار باستخدام الدعم المتجه (SVR)، والشبكات العصبية المتكررة (RNN)، وذاكرة طويلة وقصيرة الأجل (LSTM) باستخدام مؤشر NGX الشامل كبيانات. يتم مناقشة نقاط القوة والضعف لكل نموذج، مع الإشارة إلى أن SVR يتميز بقوته في مجموعات البيانات الصغيرة، بينما يتم تسليط الضوء على RNN وLSTM لقدراتهما في التعامل مع البيانات التسلسلية، حيث تتغلب LSTM على مشكلة التدرج المتلاشي في RNN.
تضع الدراسة نفسها في سياق النظريات المالية، وخاصة فرضية السوق الفعالة (EMH) وفرضية الأسواق التكيفية (AMH). بينما تفترض EMH أن أسعار الأصول تعكس جميع المعلومات المتاحة، مما يشير إلى قوة تنبؤية محدودة من البيانات التاريخية، تقدم AMH منظورًا أكثر ديناميكية، مما يسمح بإمكانية وجود عدم كفاءة في السوق يمكن استغلالها بواسطة نماذج ML. تهدف الدراسة إلى إظهار كيف يمكن لهذه النماذج التقاط مثل هذه عدم الكفاءة، خاصة خلال ظروف السوق المتقلبة. تشير النتائج إلى أن LSTM يتفوق بشكل كبير على SVR وRNN في توقع أسعار الأسهم على مدى 30 يومًا و60 يومًا، محققًا قيمة R-squared تبلغ 0.993، مما يبرز فعاليته في التنقل عبر تعقيدات التنبؤ المالي.
طرق
في هذه الدراسة، يتم استخدام بيانات الأسعار التاريخية من مؤشر جميع الأسهم في بورصة نيجيريا (NGX) لتحليل أداء واتجاه سوق الأسهم النيجيري. تعتبر NGX بمثابة مؤشر مرجعي شامل، يجسد إجمالي القيمة السوقية لجميع الأسهم المدرجة في البورصة. تتيح هذه الطريقة المنهجية فحصًا دقيقًا لاتجاهات السوق والديناميات، مما يوفر رؤى حول الصحة العامة والحركات داخل سوق الأسهم النيجيري.
نتائج
تقدم نتائج الدراسة تقييمًا لثلاثة نماذج تنبؤية—الانحدار باستخدام الدعم المتجه (SVR)، والشبكات العصبية المتكررة (RNN)، وذاكرة طويلة وقصيرة الأجل (LSTM)—المطبقة على بيانات تاريخية من بورصة نيجيريا. كان الهدف الأساسي هو توقع مؤشر NGX الشامل.
تم تقييم أداء هذه النماذج بناءً على دقتها التنبؤية، مع إجراء مقارنات لتحديد أي نموذج حقق أكثر التنبؤات موثوقية. تشير النتائج إلى أن كل نموذج له نقاط قوة مميزة، مما يشير إلى أن اختيار النموذج قد يعتمد على متطلبات التنبؤ المحددة وخصائص البيانات. يبرز التحليل الإضافي للنتائج إمكانيات هذه التقنيات في التنبؤ بأسواق المال.
مناقشة
تسلط قسم المناقشة في ورقة البحث الضوء على عدة مساهمات ونتائج رئيسية تتعلق بتنبؤ السلاسل الزمنية في الأسواق المالية باستخدام نماذج التعلم الآلي. يكشف تحليل مقارن للانحدار باستخدام الدعم المتجه (SVR)، والشبكات العصبية المتكررة (RNN)، وذاكرة طويلة وقصيرة الأجل (LSTM) أن LSTM يتفوق على كل من SVR وRNN، خاصة في التعامل مع الاعتماديات طويلة الأجل والعلاقات غير الخطية المعقدة في بيانات أسعار الأسهم. تؤكد الدراسة على أهمية دمج المتغيرات الخارجية، مثل حجم التداول المتوازن (OBV)، مما يعزز الدقة التنبؤية. بالإضافة إلى ذلك، يتم التأكيد على تطبيق ضبط المعلمات المتقدمة من خلال Optuna واستخدام التحقق المتقاطع للسلاسل الزمنية (TimeSeriesSplit) كأمور حاسمة لتحسين أداء النموذج وضمان تقييم موثوق.
تعتبر الآثار العملية لهذا البحث كبيرة، حيث أن تحديد LSTM كنموذج الأكثر فعالية لتنبؤ أسعار الأسهم يوفر رؤى قيمة للمتداولين والمستثمرين، مما يسهل اتخاذ قرارات أكثر اطلاعًا وتحسين استراتيجيات التداول الخوارزمية. تسهم النتائج أيضًا في تحسين ممارسات إدارة المخاطر داخل المؤسسات المالية من خلال تمكين تطوير نماذج تنبؤية أكثر دقة. علاوة على ذلك، تعتبر الدراسة معيارًا للمحترفين في المالية الكمية وتقدم قيمة تعليمية لأولئك المهتمين بعلم البيانات المالية، موضحة تطبيق تقنيات التعلم الآلي في سيناريوهات العالم الحقيقي. بشكل عام، تملأ هذه الدراسة فجوة في الأدبيات من خلال إظهار فعالية LSTM المدمجة مع مؤشرات فنية متعددة، مما يعزز مجال التحليلات التنبؤية في المالية.
DOI: https://doi.org/10.3390/analytics4010005
Publication Date: 2025-02-11
Author(s): Olamilekan Shobayo et al.
Primary Topic: Stock Market Forecasting Methods
Overview
This study evaluates the predictive performance of three models—Support Vector Regression (SVR), Recurrent Neural Networks (RNN), and Long Short-Term Memory (LSTM)—using the NGX All-Share Index dataset. The models were assessed through various error metrics, including Mean Absolute Error (MAE), Mean Squared Error (MSE), Root Mean Square Error (RMSE), Mean Percentage Error (MPE), and R-squared values. LSTM outperformed the other models, achieving an R-squared value of 0.993 with a 60-day time window, particularly when incorporating endogenous market data and technical indicators. In contrast, SVR demonstrated reliable performance under simpler conditions but struggled with complex patterns, while RNN faced limitations due to the vanishing gradient problem.
The findings indicate that while SVR and RNN can be effective in specific scenarios, LSTM is the most robust model for stock price prediction, yielding the lowest MSE (0.000343) and RMSE (0.018522) values. This superior performance is attributed to LSTM’s capability to manage long-term dependencies, making it particularly adept at navigating volatile market conditions. The study suggests that integrating additional exogenous data, such as financial news sentiment, could further enhance the predictive accuracy of deep learning models, providing valuable insights for investors and financial analysts.
Introduction
The introduction of this study addresses the challenges of predicting stock market prices, emphasizing the limitations of traditional forecasting models like linear regression and ARIMA in capturing the nonlinear and sequential dependencies inherent in financial data. To tackle these issues, the research explores the effectiveness of machine learning (ML) and deep learning (DL) techniques, specifically comparing Support Vector Regression (SVR), Recurrent Neural Networks (RNN), and Long Short-Term Memory (LSTM) models using the NGX All-Share Index as a dataset. Each model’s strengths and weaknesses are discussed, with SVR noted for its robustness in small datasets, while RNN and LSTM are highlighted for their capabilities in handling sequential data, with LSTM overcoming RNN’s vanishing gradient problem.
The study situates itself within the context of financial theories, particularly the Efficient Market Hypothesis (EMH) and the Adaptive Markets Hypothesis (AMH). While EMH posits that asset prices reflect all available information, suggesting limited predictive power from historical data, AMH offers a more dynamic perspective, allowing for the possibility of market inefficiencies that can be exploited by ML models. The research aims to demonstrate how these models can capture such inefficiencies, particularly during volatile market conditions. Results indicate that LSTM significantly outperforms SVR and RNN in predicting stock prices over 30-day and 60-day windows, achieving an R-squared value of 0.993, thereby underscoring its effectiveness in navigating the complexities of financial forecasting.
Methods
In this study, historical price data from the Nigerian Stock Exchange All-Share Index (NGX) is utilized to analyze the performance and trajectory of the Nigerian stock market. The NGX serves as a comprehensive benchmark index, encapsulating the total market capitalization of all equities listed on the exchange. This methodological approach allows for a detailed examination of market trends and dynamics, providing insights into the overall health and movements within the Nigerian equity market.
Results
The results of the study present an evaluation of three predictive models—Support Vector Regression (SVR), Recurrent Neural Networks (RNN), and Long Short-Term Memory (LSTM)—applied to historical data from the Nigerian Stock Exchange. The primary objective was to forecast the NGX All-Share Index.
The performance of these models was assessed based on their predictive accuracy, with comparisons drawn to determine which model yielded the most reliable forecasts. The findings indicate that each model has distinct strengths, suggesting that the choice of model may depend on specific forecasting requirements and data characteristics. Further analysis of the results highlights the potential of these machine learning techniques in financial market predictions.
Discussion
The discussion section of the research paper highlights several key contributions and findings related to time-series forecasting in financial markets using machine learning models. A comparative analysis of Support Vector Regression (SVR), Recurrent Neural Networks (RNN), and Long Short-Term Memory (LSTM) networks reveals that LSTM outperforms both SVR and RNN, particularly in handling long-term dependencies and complex non-linear relationships in stock price data. The study emphasizes the significance of incorporating exogenous variables, such as On-Balance Volume (OBV), which enhances predictive accuracy. Additionally, the application of advanced hyperparameter tuning through Optuna and the use of time-series cross-validation (TimeSeriesSplit) are underscored as critical for optimizing model performance and ensuring robust evaluation.
The practical implications of this research are substantial, as the identification of LSTM as the most effective model for stock price forecasting provides valuable insights for traders and investors, facilitating more informed decision-making and improved algorithmic trading strategies. The findings also contribute to better risk management practices within financial institutions by enabling the development of more accurate predictive models. Furthermore, the study serves as a benchmark for quantitative finance professionals and offers educational value for those interested in financial data science, illustrating the application of machine learning techniques in real-world scenarios. Overall, this research fills a gap in the literature by demonstrating the effectiveness of LSTM combined with multiple technical indicators, thereby advancing the field of predictive analytics in finance.
