DOI: https://doi.org/10.54254/2754-1169/91/20241031
تاريخ النشر: 2024-06-18
المؤلف: Xinye Sha
الموضوع الرئيسي: طرق التنبؤ بسوق الأسهم
نظرة عامة
تقدم هذه الورقة البحثية خوارزمية جديدة للتنبؤ بالسلاسل الزمنية تدمج تحسين الخوارزمية الجينية (GA) مع شبكة الذاكرة طويلة وقصيرة المدى (LSTM) للتنبؤ بأسعار الأسهم، مع معالجة التحديات التي تطرحها عصر البيانات الكبيرة. تبدأ المنهجية بتحليل إحصائي وصفي لبيانات الأسهم، تليها بناء وتدريب نموذج GA-LSTM. تؤدي عملية التحسين إلى تقليل كبير في متوسط الخطأ المطلق (MAE) من 0.11 إلى 0.01، مما يشير إلى تحسين دقة التنبؤ. يظهر النموذج قدرات تعميم قوية، حيث تظهر نتائج مجموعة الاختبار MAE قدره 2.41، ومتوسط الخطأ التربيعي (MSE) قدره 9.84، وجذر متوسط الخطأ التربيعي (RMSE) قدره 3.13، ومعامل التحديد (R²) قدره 0.87.
تشير النتائج إلى أن خوارزمية GA-LSTM المحسّنة تلتقط بفعالية اتجاهات وقيم أسعار الأسهم، مما يظهر موثوقيتها ودقتها في مهام التنبؤ. لا تعزز هذه الطريقة المبتكرة أداء التنبؤ فحسب، بل تسلط الضوء أيضًا على الفوائد التآزرية لدمج قدرات البحث العالمية لـ GA مع نقاط قوة نمذجة السلاسل الزمنية لـ LSTM. إن تداعيات هذا البحث مهمة لتحليل السوق المالية، حيث توفر رؤى قيمة حول التنبؤ بأسعار الأسهم في سياق تقنيات الحوسبة المتقدمة وتحليلات البيانات الكبيرة.
مقدمة
تناقش مقدمة الورقة البحثية تطور التنبؤ بأسعار الأسهم، مع تسليط الضوء على اعتماده التاريخي على التحليل الأساسي، والتحليل الفني، ومشاعر السوق. مع التقدم في تكنولوجيا الكمبيوتر وظهور البيانات الكبيرة، اكتسبت خوارزميات السلاسل الزمنية أهمية في هذا المجال. هذه الخوارزميات، التي تقوم بنمذجة وتحليل البيانات بترتيب زمني، تمكن المحللين والمستثمرين من اكتشاف أنماط أسعار الأسهم التاريخية وإجراء تنبؤات مستنيرة حول التحركات المستقبلية. تشمل طرق السلاسل الزمنية البارزة المتوسطات المتحركة، والتنعيم الأسي، ونموذج ARIMA، وشبكات الذاكرة طويلة وقصيرة المدى (LSTM).
تؤكد الورقة على قابلية التكيف والمرونة لخوارزميات السلاسل الزمنية، التي يمكن أن تتكيف مع ظروف السوق المتغيرة بشكل أكثر فعالية من طرق التنبؤ التقليدية. من خلال دمج بيانات أسعار الأسهم التاريخية بالإضافة إلى المؤشرات الاقتصادية الكلية، والاتجاهات الصناعية، والبيانات المالية للشركات، تعزز هذه الخوارزميات دقة التنبؤ وتخفف من المخاطر. تقدم الدراسة نهجًا مبتكرًا يجمع بين تحسين الخوارزمية الجينية (GA) وLSTM لتنبؤ أسعار الأسهم، مما يوفر أداة علمية وفعالة لاتخاذ قرارات الاستثمار.
النتائج
في هذا القسم، يقدم المؤلفون نتائج نموذجهم لتنبؤ أسعار الأسهم، الذي يستخدم خوارزمية سلسلة زمنية محسّنة بواسطة خوارزمية جينية (GA) بالتزامن مع شبكات الذاكرة طويلة وقصيرة المدى (LSTM). تم تقسيم مجموعة البيانات إلى مجموعة تدريب (2016-2021) ومجموعة اختبار (2021-2022). تم تدريب النموذج على مدى 100 عصر باستخدام Python 3.10، وتم تقييم أدائه باستخدام مقاييس مثل متوسط الخطأ التربيعي (MSE)، ومتوسط الخطأ المطلق (MAE)، ومتوسط الخطأ المطلق كنسبة مئوية (MAPE).
تشير النتائج إلى تحسين كبير في دقة التنبؤ للنموذج، كما يتضح من انخفاض MAE من 0.11 إلى 0.01، مما يشير إلى التقارب نحو أسعار الأسهم الفعلية. توضح التمثيلات الرسومية لقيم مجموعة الاختبار مقابل القيم المتوقعة توافقًا وثيقًا، مما يؤكد فعالية النموذج في التقاط كل من الاتجاه والقيمة لأسعار الأسهم. بالإضافة إلى ذلك، يتم تلخيص مقاييس الأداء لمجموعة الاختبار، بما في ذلك MAE وMSE وRMSE ومعامل التحديد (R²)، في الجدول 3، مما يدعم قدرة النموذج القوية على التعميم.
المناقشة
في هذه الدراسة، يتم اقتراح نموذج للتنبؤ بالسلاسل الزمنية يجمع بين تحسين الخوارزمية الجينية (GA) وشبكات الذاكرة طويلة وقصيرة المدى (LSTM) للتنبؤ بأسعار الأسهم لشركة خدمات مالية متعددة الجنسيات مقرها الولايات المتحدة، المشار إليها باسم “Global Fin Corp.” تمتد مجموعة البيانات من 25 مايو 2006 إلى 11 أكتوبر 2021، وتضم مؤشرات أسعار الأسهم اليومية مثل أسعار الافتتاح، والارتفاع، والانخفاض، والإغلاق. تكشف الملخصات الإحصائية للبيانات عن خصائص أساسية، بينما يتم استخدام GA لتحسين المعلمات الفائقة لنموذج LSTM، مما يعزز أدائه التنبؤي.
تدمج المنهجية قدرات البحث العالمية لـ GA مع نقاط قوة معالجة البيانات التسلسلية لـ LSTM. يقوم GA بتحسين المعلمات الفائقة مثل معدل التعلم وهندسة الشبكة، بينما تلتقط LSTM الاعتماديات طويلة الأجل في بيانات أسعار الأسهم. تشير النتائج إلى تحسين كبير في دقة التنبؤ، مع انخفاض متوسط الخطأ المطلق (MAE) من 0.11 إلى 0.01 خلال التدريب، وMAE لمجموعة الاختبار قدره 2.41، ومتوسط الخطأ التربيعي (MSE) قدره 9.84، وجذر متوسط الخطأ التربيعي (RMSE) قدره 3.13، وقيمة R² قدرها 0.87. تظهر هذه الطريقة المبتكرة فعالية دمج GA وLSTM لتنبؤ أسعار الأسهم، مما يوفر رؤى قيمة للتنبؤ المالي في عصر البيانات الكبيرة وتقنيات الحوسبة المتقدمة.
DOI: https://doi.org/10.54254/2754-1169/91/20241031
Publication Date: 2024-06-18
Author(s): Xinye Sha
Primary Topic: Stock Market Forecasting Methods
Overview
This research paper presents a novel time series forecasting algorithm that integrates Genetic Algorithm (GA) optimization with Long Short-Term Memory Network (LSTM) to predict stock prices, addressing the challenges posed by the big data era. The methodology begins with descriptive statistical analysis of stock data, followed by the construction and training of the GA-LSTM model. The optimization process leads to a significant reduction in the mean absolute error (MAE) from 0.11 to 0.01, indicating improved prediction accuracy. The model demonstrates strong generalization capabilities, with test set results showing an MAE of 2.41, mean squared error (MSE) of 9.84, root mean squared error (RMSE) of 3.13, and a coefficient of determination (R²) of 0.87.
The findings suggest that the GA-LSTM optimized algorithm effectively captures stock price trends and values, showcasing its reliability and accuracy in forecasting tasks. This innovative approach not only enhances prediction performance but also highlights the synergistic benefits of combining GA’s global search capabilities with LSTM’s time series modeling strengths. The implications of this research are significant for financial market analysis, providing valuable insights into stock price prediction in the context of advanced computational techniques and big data analytics.
Introduction
The introduction of the research paper discusses the evolution of stock price forecasting, highlighting its historical reliance on fundamental analysis, technical analysis, and market sentiment. With advancements in computer technology and the emergence of big data, time series algorithms have gained prominence in this field. These algorithms, which model and analyze data in chronological order, enable analysts and investors to uncover historical stock price patterns and make informed predictions about future movements. Notable time series methods include moving averages, exponential smoothing, the ARIMA model, and Long Short-Term Memory Networks (LSTM).
The paper emphasizes the adaptability and flexibility of time series algorithms, which can adjust to changing market conditions more effectively than traditional forecasting methods. By incorporating not only historical stock price data but also macroeconomic indicators, industry trends, and company financials, these algorithms enhance forecast accuracy and mitigate risks. The study introduces a novel approach that combines Genetic Algorithm (GA) optimization with LSTM for stock price forecasting, offering a scientific and effective tool for investment decision-making.
Results
In this section, the authors present the results of their stock price prediction model, which utilizes a time series algorithm optimized by a Genetic Algorithm (GA) in conjunction with Long Short-Term Memory (LSTM) networks. The dataset was divided into a training set (2016-2021) and a test set (2021-2022). The model was trained over 100 epochs using Python 3.10, and its performance was evaluated using metrics such as Mean Squared Error (MSE), Mean Absolute Error (MAE), and Mean Absolute Percentage Error (MAPE).
The results indicate a significant improvement in the model’s predictive accuracy, as evidenced by the MAE decreasing from 0.11 to 0.01, suggesting convergence towards the actual stock prices. The graphical representation of the test set values against the predicted values demonstrates a close alignment, confirming the model’s effectiveness in capturing both the trend and value of stock prices. Additionally, the performance metrics for the test set, including MAE, MSE, Root Mean Squared Error (RMSE), and the coefficient of determination (R²), are summarized in Table 3, further supporting the model’s strong generalization capability.
Discussion
In this study, a time series forecasting model combining Genetic Algorithm (GA) optimization and Long Short-Term Memory (LSTM) networks is proposed for predicting stock prices of a US-based multinational financial services company, referred to as “Global Fin Corp.” The dataset spans from May 25, 2006, to October 11, 2021, and includes daily stock price indicators such as opening, high, low, and closing prices. Statistical summaries of the data reveal essential characteristics, while the GA is employed to optimize hyperparameters of the LSTM model, enhancing its predictive performance.
The methodology integrates the global search capabilities of GA with the sequential data processing strengths of LSTM. The GA optimizes hyperparameters such as learning rate and network architecture, while the LSTM captures long-term dependencies in the stock price data. The results indicate a significant improvement in prediction accuracy, with a decrease in Mean Absolute Error (MAE) from 0.11 to 0.01 during training, and a test set MAE of 2.41, Mean Squared Error (MSE) of 9.84, Root Mean Squared Error (RMSE) of 3.13, and an R² value of 0.87. This innovative approach demonstrates the effectiveness of combining GA and LSTM for stock price prediction, offering valuable insights for financial forecasting in the era of big data and advanced computational techniques.
