DOI: https://doi.org/10.31449/inf.v49i22.8510
تاريخ النشر: 2025-05-15
المؤلف: Zhenyun Du
الموضوع الرئيسي: طرق التنبؤ بسوق الأسهم
نظرة عامة
تستكشف هذه الدراسة فعالية نموذج هجين يجمع بين ARIMA و LSTM في توقعات سوق الأسهم، مع التأكيد على تفوقه على النماذج التقليدية في التعامل مع العلاقات غير الخطية المعقدة والاعتماديات طويلة الأجل. شملت المنهجية معالجة شاملة للبيانات، بما في ذلك استيفاء السلاسل الزمنية للقيم المفقودة، وتطبيع البيانات العددية إلى الفترة [0، 1]، وتقسيم التدريب والاختبار بنسبة 80:20. تم إجراء اختيار الميزات باستخدام تحليل الارتباط وتحليل المكونات الرئيسية (PCA) للاحتفاظ بالمؤشرات المهمة مثل الأسعار التاريخية والمؤشرات الاقتصادية مع تقليل الأبعاد. تتكون بنية LSTM من ثلاث طبقات مخفية تحتوي كل منها على 128 خلية عصبية، تستخدم تنشيط ReLU وتدمج طبقات الإسقاط للتخفيف من الإفراط في التكيف.
أظهرت النتائج أن النموذج الهجين تفوق بشكل كبير على النماذج التقليدية، محققًا متوسط خطأ تربيعي (MSE) قدره 0.01، وجذر متوسط الخطأ التربيعي (RMSE) قدره 0.11، ومعامل التحديد ($R^2$) قدره 0.93، ومتوسط الخطأ المطلق (MAE) قدره 0.07، مما يدل على قدرته على التقاط التقلبات قصيرة الأجل والاتجاهات طويلة الأجل بدقة في الأسواق المتقلبة. أكدت اختبارات الاستقرار الأداء المتسق عبر ظروف السوق المتغيرة، مع بقاء المتوسطات لمقاييس MSE و RMSE و $R^2$ و MAE تنافسية. على الرغم من أوقات التدريب الأطول (حوالي 140 دقيقة)، أظهر النموذج قدرات تنبؤية فعالة في الوقت الحقيقي، مع وقت اختبار قدره 0.6 ثانية فقط، مما يجعله مناسبًا للتداول عالي التردد. بالإضافة إلى ذلك، كشفت تحليل أهمية الميزات عن تركيز أكبر على تغييرات الأسعار بدلاً من حجم التداول، مما يشير إلى براعة النموذج في تفسير مشاعر السوق.
مقدمة
تسلط مقدمة هذه الورقة البحثية الضوء على تعقيدات توقعات سوق الأسهم، التي تتأثر بعوامل مختلفة بما في ذلك تقلبات الأسعار وأحجام التداول. توفر الطرق التقليدية، مثل التحليل الأساسي والتحليل الفني، رؤى أولية ولكنها غالبًا ما تفشل في الدقة بسبب التعقيد الفطري للسوق. أدت التطورات الأخيرة في تكنولوجيا المعلومات، وخاصة في البيانات الضخمة والذكاء الاصطناعي، إلى زيادة الطلب على طرق التنبؤ الأكثر موثوقية. تؤكد الورقة على إمكانية دمج تحليل السلاسل الزمنية التقليدية، وبشكل خاص ARIMA، مع تقنيات التعلم الآلي المتقدمة مثل شبكات الذاكرة طويلة وقصيرة الأجل (LSTM) لتعزيز دقة التنبؤ والتعميم.
يهدف النموذج الهجين المقترح إلى الاستفادة من نقاط القوة لكل من ARIMA و LSTM، حيث يلتقط ARIMA الاتجاهات الخطية بينما يتناول LSTM العلاقات غير الخطية والاعتماديات طويلة الأجل في بيانات سوق الأسهم. لا يسعى هذا النهج فقط إلى تحسين أداء التنبؤ ولكن أيضًا يدمج دمج الميزات متعددة الأبعاد، موحدًا أنواع البيانات المختلفة مثل المؤشرات الفنية والعوامل الاقتصادية الكلية. توضح الدراسة المنهجية لتنفيذ هذا النموذج الهجين، بما في ذلك تقنيات معالجة البيانات لتعزيز تدريب النموذج والتخفيف من المشكلات مثل القيم الشاذة. بشكل عام، تهدف الأبحاث إلى تقديم إطار شامل لتوقعات سوق الأسهم يعالج قيود الطرق الحالية ويتكيف مع تعقيدات البيانات المالية الحديثة.
طرق
في هذا القسم، توضح الأبحاث المنهجيات المستخدمة لتوقعات سوق الأسهم، مع التركيز على كل من تحليل السلاسل الزمنية التقليدية وتقنيات التعلم الآلي الحديثة. يتم تسليط الضوء على نموذج المتوسط المتحرك التكاملي الذاتي (ARIMA) كطريقة أساسية لنمذجة بيانات السلاسل الزمنية الثابتة، مما يلتقط الاتجاهات والتقلبات الموسمية بشكل فعال. ومع ذلك، يتم الاعتراف بحدوده في التعامل مع البيانات غير الخطية والمتقلبة. يتم أيضًا مناقشة طرق تقليدية أخرى، مثل التنعيم الأسي (ETS)، وARIMA المعدلة موسميًا (SARIMA)، ونماذج ARCH/GARCH، مع التركيز على نقاط القوة والضعف الخاصة بها في معالجة تعقيدات بيانات سوق الأسهم.
تنتقل الورقة إلى طرق التعلم الآلي، مشيرة إلى زيادة اعتماد هذه الطرق بسبب التقدم في القدرة الحاسوبية. يتم فحص تقنيات مثل آلات الدعم الشعاعي (SVM)، والغابات العشوائية (RF)، والشبكات العصبية (NN) لقدراتها في إدارة البيانات عالية الأبعاد وغير الخطية. بشكل ملحوظ، يتم تقديم شبكات الذاكرة طويلة وقصيرة الأجل (LSTM) والشبكات العصبية التلافيفية (CNN) كتحسينات كبيرة في التعلم العميق، مما يظهر أداءً متفوقًا في التقاط الاعتماديات طويلة الأجل والميزات المحلية في بيانات سوق الأسهم. يختتم القسم بوصف التصميم التجريبي، الذي يقارن النموذج الهجين المقترح – الذي يدمج ARIMA و LSTM – مع نماذج أساسية مختلفة، بما في ذلك ARIMA و LSTM و RF و الانحدار الشعاعي (SVR) و XGBoost. تشمل مقاييس التقييم المستخدمة متوسط الخطأ التربيعي (MSE) وجذر متوسط الخطأ التربيعي (RMSE) ومعامل التحديد ($R^2$)، مما يضمن تقييمًا شاملاً لأداء النموذج.
نتائج
تشير النتائج المقدمة في هذا القسم إلى أن النموذج الهجين يتفوق بشكل كبير على النماذج الأساسية في توقع أسعار الأسهم، كما يتضح من تحليل التصور في الشكل 4. بينما يتطلب النموذج الهجين وقت تدريب أطول يبلغ حوالي 140 دقيقة مقارنةً بدقيقتين لنموذج ARIMA و 120 دقيقة لنموذج LSTM، فإنه يظهر كفاءة اختبار متفوقة مع وقت اختبار قدره 0.6 ثانية. تعتبر هذه القدرة السريعة على الاختبار ميزة خاصة في سيناريوهات التداول عالي التردد حيث تكون التنبؤات في الوقت الحقيقي حاسمة. على العكس من ذلك، بالنسبة للتطبيقات ذات التحديثات البطيئة للبيانات، مثل تحليل الاستثمار طويل الأجل، قد يكون وقت التدريب الأطول للنموذج الهجين مقبولًا مقابل دقته الأعلى في التنبؤ.
يتفوق النموذج الهجين عبر أربعة مقاييس تقييم رئيسية: متوسط الخطأ التربيعي (MSE)، وجذر متوسط الخطأ التربيعي (RMSE)، ومعامل التحديد (R²)، ومتوسط الخطأ المطلق (MAE). تشير قيم MSE و RMSE المنخفضة إلى خطأ تنبؤ ضئيل، مما يعكس دقة النموذج العالية. بالإضافة إلى ذلك، تشير قيمة R² الأعلى إلى أن النموذج الهجين يلتقط فعليًا تباين البيانات، مما يظهر قدرته القوية على التعميم. يتم دعم استقرار النموذج بشكل أكبر من خلال MAE المنخفض، مما يدل على أداء تنبؤ متسق. تشير العلاقات المتبادلة بين هذه المقاييس إلى أن التحسينات في مجال واحد، مثل تقليل MSE، غالبًا ما ترتبط بتحسينات في مجالات أخرى، مما يعزز فعالية النموذج الهجين بشكل عام في توقع أسعار الأسهم.
نقاش
في قسم النقاش من الورقة البحثية، يقوم المؤلفون بتحليل مشهد منهجيات توقع سوق الأسهم، مصنفين إياها إلى تحليل السلاسل الزمنية التقليدية وطرق التعلم الآلي الحديثة. تُلاحظ الطرق التقليدية، مثل ARIMA و GARCH، لفعاليتها في ظروف السوق المستقرة ولكنها تواجه صعوبة مع التعقيدات وغير الخطيات الموجودة خلال الفترات المتقلبة، مثل انهيارات السوق. على النقيض من ذلك، أظهرت تقنيات التعلم الآلي، وخاصة نماذج التعلم العميق مثل شبكات الذاكرة طويلة وقصيرة الأجل (LSTM)، أداءً متفوقًا في التقاط العلاقات غير الخطية والتكيف مع الطبيعة الديناميكية لبيانات سوق الأسهم. يبرز المؤلفون مزايا النماذج الهجينة التي تدمج بين ARIMA و LSTM، والتي تستفيد من نقاط القوة في النمذجة الخطية والتعرف على الأنماط غير الخطية، على التوالي.
يجمع النموذج الهجين المقترح بين قدرات التنبؤ الخطية لـ ARIMA مع قدرة LSTM على نمذجة الديناميات غير الخطية من خلال أولاً إنشاء توقع خطي باستخدام ARIMA، ثم استخدام المتبقيات من هذا التوقع كمدخلات لشبكة LSTM. لا يعزز هذا النهج دقة التنبؤ فحسب، بل يسمح أيضًا بإدماج ميزات متعددة الأبعاد، بما في ذلك المؤشرات الاقتصادية الكلية وأحجام التداول، من خلال آلية دمج الميزات. يؤكد المؤلفون على أهمية تقنيات اختيار الميزات وتقليل الأبعاد الدقيقة، مثل تحليل الارتباط وتحليل المكونات الرئيسية (PCA)، لضمان أن النموذج يلتقط بشكل فعال العوامل ذات الصلة التي تؤثر على تقلبات سوق الأسهم. تظهر النتائج تحسينات كبيرة في دقة التنبؤ عبر مقاييس الأداء المختلفة، مما يؤكد قوة ومرونة النموذج الهجين في ظروف السوق المختلفة.
DOI: https://doi.org/10.31449/inf.v49i22.8510
Publication Date: 2025-05-15
Author(s): Zhenyun Du
Primary Topic: Stock Market Forecasting Methods
Overview
This study investigates the efficacy of a hybrid model combining ARIMA and LSTM for stock market forecasting, emphasizing its superiority over traditional models in handling complex nonlinear relationships and long-term dependencies. The methodology involved comprehensive data preprocessing, including time series interpolation for missing values, normalization of numerical data to the [0, 1] interval, and an 80:20 training-test split. Feature selection was performed using correlation analysis and principal component analysis (PCA) to retain significant predictors such as historical prices and economic indicators while reducing dimensionality. The LSTM architecture comprised three hidden layers with 128 neurons each, utilizing ReLU activation and incorporating dropout layers to mitigate overfitting.
Results demonstrated that the hybrid model significantly outperformed traditional models, achieving a mean square error (MSE) of 0.01, root mean square error (RMSE) of 0.11, coefficient of determination ($R^2$) of 0.93, and mean absolute error (MAE) of 0.07, indicating its capability to accurately capture both short-term fluctuations and long-term trends in volatile markets. Stability tests confirmed consistent performance across varying market conditions, with average metrics of MSE, RMSE, $R^2$, and MAE remaining competitive. Despite longer training times (approximately 140 minutes), the model exhibited efficient real-time prediction capabilities, with a test time of only 0.6 seconds, making it suitable for high-frequency trading. Additionally, feature importance analysis revealed a greater emphasis on price changes rather than trading volume, suggesting the model’s adeptness at interpreting market sentiment.
Introduction
The introduction of this research paper highlights the complexities of stock market predictions, which are influenced by various factors including price fluctuations and trading volumes. Traditional methods, such as fundamental and technical analysis, provide preliminary insights but often fall short in accuracy due to the market’s inherent complexity. Recent advancements in information technology, particularly in big data and artificial intelligence, have led to increased demand for more reliable forecasting methods. The paper emphasizes the potential of combining traditional time series analysis, specifically ARIMA, with advanced machine learning techniques like Long Short-Term Memory (LSTM) networks to enhance prediction accuracy and generalization.
The proposed hybrid model aims to leverage the strengths of both ARIMA and LSTM, where ARIMA captures linear trends while LSTM addresses nonlinear relationships and long-term dependencies in stock market data. This approach not only seeks to improve forecasting performance but also incorporates multi-dimensional feature fusion, integrating various data types such as technical indicators and macroeconomic factors. The study outlines the methodology for implementing this hybrid model, including data preprocessing techniques to enhance model training and mitigate issues such as outliers. Overall, the research aims to provide a comprehensive framework for stock market prediction that addresses the limitations of existing methods and adapts to the complexities of modern financial data.
Methods
In this section, the research outlines the methodologies employed for stock market forecasting, focusing on both traditional time series analysis and modern machine learning techniques. The autoregressive integrated moving average (ARIMA) model is highlighted as a foundational method for modeling stationary time series data, effectively capturing trends and seasonal fluctuations. However, its limitations in handling nonlinear and volatile data are acknowledged. Other traditional methods, such as exponential smoothing (ETS), seasonally adjusted ARIMA (SARIMA), and ARCH/GARCH models, are also discussed, with emphasis on their respective strengths and weaknesses in addressing the complexities of stock market data.
The paper transitions to machine learning approaches, noting the increasing adoption of these methods due to advancements in computational power. Techniques such as Support Vector Machines (SVM), Random Forests (RF), and Neural Networks (NN) are examined for their capabilities in managing high-dimensional and nonlinear data. Notably, Long Short-Term Memory (LSTM) networks and Convolutional Neural Networks (CNN) are presented as significant advancements in deep learning, demonstrating superior performance in capturing long-term dependencies and local features in stock market data. The section concludes with a description of the experimental design, which compares the proposed hybrid model—integrating ARIMA and LSTM—with various baseline models, including ARIMA, LSTM, RF, Support Vector Regression (SVR), and XGBoost. The evaluation metrics employed include mean square error (MSE), root mean square error (RMSE), and the coefficient of determination ($R^2$), ensuring a comprehensive assessment of model performance.
Results
The results presented in this section indicate that the hybrid model significantly outperforms baseline models in stock price prediction, as evidenced by the visualization analysis in Figure 4. While the hybrid model requires a longer training time of approximately 140 minutes compared to the ARIMA model’s 2 minutes and the LSTM model’s 120 minutes, it demonstrates superior testing efficiency with a testing time of 0.6 seconds. This rapid testing capability is particularly advantageous in high-frequency trading scenarios where real-time predictions are critical. Conversely, for applications with slower data updates, such as long-term investment analysis, the hybrid model’s longer training time may be acceptable in exchange for its higher prediction accuracy.
The hybrid model excels across four key evaluation metrics: mean square error (MSE), root mean square error (RMSE), coefficient of determination (R²), and mean absolute error (MAE). Lower MSE and RMSE values indicate minimal prediction error, reflecting the model’s high accuracy. Additionally, a higher R² value signifies that the hybrid model effectively captures data variability, showcasing its strong generalization ability. The stability of the model is further supported by a lower MAE, indicating consistent prediction performance. The interrelationships among these metrics suggest that improvements in one area, such as reduced MSE, are often associated with enhancements in others, reinforcing the hybrid model’s overall effectiveness in stock price prediction.
Discussion
In the discussion section of the research paper, the authors analyze the landscape of stock market prediction methodologies, categorizing them into traditional time series analysis and modern machine learning approaches. Traditional methods, such as ARIMA and GARCH, are noted for their effectiveness in stable market conditions but struggle with the complexities and nonlinearities present during volatile periods, such as market crashes. In contrast, machine learning techniques, particularly deep learning models like Long Short-Term Memory (LSTM) networks, have shown superior performance in capturing nonlinear relationships and adapting to the dynamic nature of stock market data. The authors highlight the advantages of hybrid models that integrate both ARIMA and LSTM, which leverage the strengths of linear modeling and nonlinear pattern recognition, respectively.
The proposed hybrid model combines ARIMA’s linear forecasting capabilities with LSTM’s ability to model nonlinear dynamics by first generating a linear prediction with ARIMA, then using the residuals from this prediction as inputs for the LSTM network. This approach not only enhances prediction accuracy but also allows for the incorporation of multi-dimensional features, including macroeconomic indicators and trading volumes, through a feature fusion mechanism. The authors emphasize the importance of rigorous feature selection and dimensionality reduction techniques, such as correlation analysis and Principal Component Analysis (PCA), to ensure that the model effectively captures the relevant factors influencing stock market fluctuations. The results demonstrate significant improvements in prediction accuracy across various performance metrics, confirming the robustness and adaptability of the hybrid model in different market conditions.
