توقع سعر الذهب باستخدام شبكة عصبية عميقة هجينة LSTM-أوتوencoder Forecasting gold price using hybrid deep neural network LSTM-autoencoder

شارك:
المجلة: Discover Artificial Intelligence، المجلد: 5، العدد: 1
DOI: https://doi.org/10.1007/s44163-025-00464-w
تاريخ النشر: 2025-10-22
المؤلف: Agampreet Saini وآخرون
الموضوع الرئيسي: طرق التنبؤ بسوق الأسهم

نظرة عامة

تبحث ورقة البحث في فعالية نماذج التعلم العميق المختلفة في توقع أسعار الذهب، والتي تعتبر مؤشرات حاسمة للصحة الاقتصادية. تقيم الدراسة نماذج مثل الذاكرة طويلة وقصيرة الأجل (LSTM)، والشبكات العصبية التلافيفية (CNN)، ونموذج هجين من LSTM-CNN، وتقترح في النهاية نموذج LSTM-Autoencoder. تستخدم التحليل بيانات أسبوعية تمتد من سبتمبر 2000 إلى يناير 2024 وتفحص تأثير العوامل الخارجية، بما في ذلك الدولار الأمريكي، والفضة، وأسعار النفط الخام. تشير النتائج إلى أن أسعار الذهب التاريخية هي الأكثر موثوقية في التنبؤ، حيث أظهر نموذج LSTM-Autoencoder دقة متفوقة وانخفاض في خطأ التنبؤ مقارنة بالنماذج الأخرى.

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

مقدمة

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

مع التقدم في القدرات الحاسوبية، ظهرت تقنيات التعلم الآلي مثل آلات تعزيز التدرج (GBM)، وآلات الدعم الناقل (SVM)، والغابات العشوائية، مما يوفر مرونة أكبر ودقة تنبؤية محسنة. ومع ذلك، تتطلب هذه الطرق غالبًا هندسة ميزات واسعة ولا تأخذ في الاعتبار بشكل جوهري الاعتماد التسلسلي المميز لبيانات السلاسل الزمنية. لقد حولت نماذج التعلم العميق، وخاصة الشبكات العصبية طويلة وقصيرة الأجل (LSTM) والشبكات العصبية التلافيفية (CNN)، التنبؤ المالي من خلال التقاط الاعتماد على المدى الطويل بشكل فعال وتعزيز الدقة من خلال تعلم الميزات المحلية. تقترح هذه الدراسة إطارًا شاملاً يستخدم LSTM وCNN ونموذج LSTM-Autoencoder الهجين الجديد لتوقع أسعار الذهب، مع دمج المتغيرات الاقتصادية الخارجية مثل سعر الدولار الأمريكي، والفضة، وأسعار النفط لتحسين دقة التنبؤ. تهدف الدراسة إلى إظهار فعالية الهياكل الهجينة للتعلم العميق في معالجة تعقيدات توقع السلاسل الزمنية المالية.

الطرق

تتكون المنهجية الموضحة في ورقة البحث هذه من عدة مراحل رئيسية: معالجة البيانات، وهندسة الميزات، واختيار النموذج، والتدريب، والتحقق، والتقييم، كما هو موضح في الشكل 5. استخدم التحليل أربعة مجموعات بيانات متميزة – أسعار الذهب، وأسعار الدولار الأمريكي، وأسعار الفضة، وأسعار النفط الخام – تمتد من سبتمبر 2000 إلى يناير 2024. خلال مرحلة المعالجة المسبقة، تم تحديد سعر الإغلاق كأهم ميزة بين مقاييس الافتتاح، والارتفاع، والانخفاض، والإغلاق، والإغلاق المعدل، والحجم، مع اعتبار التاريخ كفهرس. تم معالجة القيم المفقودة باستخدام تقنيات التعبئة للأمام والخلف، وتم تطبيع جميع بيانات الأسعار إلى نطاق [0،1] عبر MinMaxScaler.

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

النتائج

في قسم النتائج والمناقشة، يقيم المؤلفون أداء نماذج التنبؤ المختلفة لتوقع أسعار الذهب، باستخدام مقاييس مثل جذر متوسط مربع الخطأ (RMSE)، ومتوسط الخطأ المطلق (MAE)، ومعامل التحديد (R²). تقدم هذه المقاييس تقييمًا كميًا لدقة النماذج وفعاليتها في التقاط تحركات الأسعار.

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

المناقشة

تؤكد قسم المناقشة في الورقة على تطور تقنيات التنبؤ للسلاسل الزمنية المالية، وخاصة أسعار الذهب، مع تسليط الضوء على الانتقال من النماذج الإحصائية التقليدية إلى أساليب التعلم الآلي المتقدمة والتعلم العميق. كانت الطرق المبكرة، على الرغم من فائدتها، تعاني من الطبيعة غير الخطية والمعقدة لتقلبات أسعار الذهب. شكلت إدخال التعلم الآلي، وخاصة الشبكات العصبية المتكررة (RNNs) والشبكات العصبية طويلة وقصيرة الأجل (LSTM)، تحسينًا كبيرًا في دقة التنبؤ، على الرغم من أن التحديات لا تزال قائمة في هندسة الميزات والتقاط الاعتماد الزمني. استكشفت الدراسات الحديثة النماذج الهجينة، مثل دمج الشبكات العصبية التلافيفية (CNNs) مع LSTMs، للاستفادة من نقاط القوة في كلا الهيكلين. على سبيل المثال، أظهر نموذج CNN-LSTM الهجين انخفاضًا بنسبة 37% في متوسط مربع الخطأ (MSE) مقارنة بالنماذج التقليدية، بينما أظهرت نماذج LSTM أداءً متفوقًا في إدارة البيانات المالية المعقدة وغير الخطية.

يهدف نموذج LSTM-Autoencoder المقترح في هذه الدراسة إلى معالجة قيود النماذج الحالية من خلال تعزيز الدقة التنبؤية من خلال استخراج الميزات الفعالة وتقليل الضوضاء. لقد تفوق هذا النموذج على الآخرين، محققًا أدنى قيم لـ RMSE ومتوسط الخطأ المطلق (MAE)، مما يبرز قدرته على التعامل مع تعقيدات بيانات السلاسل الزمنية المالية. تشير النتائج إلى أنه بينما تظل بيانات أسعار الذهب التاريخية هي الأكثر إفادة في التنبؤ، فإن دمج المؤشرات الاقتصادية الخارجية مثل أسعار الفضة يمكن أن يعزز دقة التنبؤ. بشكل عام، تسهم الدراسة في الأدبيات من خلال إظهار فعالية نماذج التعلم العميق، وخاصة الاستخدام الجديد لـ LSTM-Autoencoders، في تحسين توقعات أسعار الذهب وتأسيس معيار للأبحاث المستقبلية في التنبؤ المالي.

Journal: Discover Artificial Intelligence, Volume: 5, Issue: 1
DOI: https://doi.org/10.1007/s44163-025-00464-w
Publication Date: 2025-10-22
Author(s): Agampreet Saini et al.
Primary Topic: Stock Market Forecasting Methods

Overview

The research paper investigates the efficacy of various deep learning models for forecasting gold prices, which are crucial indicators of economic health. The study evaluates models such as Long Short-Term Memory (LSTM), Convolutional Neural Networks (CNN), and a hybrid LSTM-CNN, ultimately proposing an LSTM-Autoencoder model. The analysis utilizes weekly data spanning from September 2000 to January 2024 and examines the influence of external factors, including the US dollar, silver, and crude oil prices. The findings indicate that historical gold prices are the most reliable predictor, with the LSTM-Autoencoder demonstrating superior accuracy and reduced prediction error compared to other models.

In conclusion, the research highlights the limitations of traditional forecasting models, particularly their susceptibility to overfitting and inadequate adaptability to market volatility. The LSTM-Autoencoder not only outperformed its counterparts but also effectively identified complex patterns within the data. While silver prices exhibited some predictive value, the US dollar and crude oil prices were found to have minimal impact on gold price forecasting. The study underscores the potential of advanced deep learning techniques in financial time series analysis and suggests that future research could enhance predictive capabilities by integrating additional macroeconomic indicators and exploring other commodities. These insights are valuable for investors, financial analysts, and economic forecasters in making informed, data-driven decisions.

Introduction

The introduction of this research paper highlights the significance of studying financial time series, particularly in the context of gold price forecasting. Gold, a critical asset influenced by various global factors such as economic policies, geopolitical tensions, and currency fluctuations, presents unique challenges for accurate price prediction. Traditional statistical and econometric models, including Moving Average (MA), Exponential Smoothing, and ARIMA, have been limited by their linear nature and inability to capture the complex, non-linear relationships inherent in financial data. Although methods like Generalized Autoregressive Conditional Heteroskedasticity (GARCH) address volatility clustering, they still fall short in modeling non-linear dependencies over time.

With advancements in computational capabilities, machine learning techniques such as Gradient Boosting Machines (GBM), Support Vector Machines (SVM), and Random Forests have emerged, offering greater flexibility and improved prediction accuracy. However, these methods often require extensive feature engineering and do not inherently account for the sequential dependencies characteristic of time-series data. The introduction of deep learning models, particularly Long Short-Term Memory (LSTM) networks and Convolutional Neural Networks (CNNs), has transformed financial forecasting by effectively capturing long-range dependencies and enhancing accuracy through local feature learning. This study proposes a comprehensive framework utilizing LSTM, CNN, and a novel LSTM-Autoencoder hybrid model to forecast gold prices, incorporating external economic variables such as the US dollar rate, silver, and oil prices to improve prediction accuracy. The research aims to demonstrate the effectiveness of hybrid deep learning architectures in addressing the complexities of financial time-series forecasting.

Methods

The methodology outlined in this research paper consists of several key stages: data preprocessing, feature engineering, model selection, training, validation, and evaluation, as illustrated in Figure 5. The analysis utilized four distinct datasets—gold prices, US dollar prices, silver prices, and crude oil prices—spanning from September 2000 to January 2024. During the preprocessing phase, the close price was identified as the most significant feature among the open, high, low, close, adjusted close, and volume metrics, with the date serving as the index. Missing values were addressed using forward and backward filling techniques, and all price data were normalized to a range of [0,1] via the MinMaxScaler.

In the feature engineering stage, a sliding window approach was employed to construct sequences from the past 30 days of prices to forecast future prices. Following this, the study identified the optimal external parameters for gold price forecasting and selected four models for analysis, aiming to determine which model yielded the highest accuracy in predictions.

Results

In the Results and Discussion section, the authors evaluate the performance of various prediction models for forecasting gold prices, utilizing metrics such as Root Mean Square Error (RMSE), Mean Absolute Error (MAE), and the coefficient of determination (R²). These metrics offer a quantitative assessment of the models’ accuracy and effectiveness in capturing price movements.

The findings indicate that different machine learning approaches yield varying levels of predictive performance, highlighting the significance of selecting appropriate parameters. The analysis contextualizes these results within the broader landscape of gold price forecasting, emphasizing the implications for future research and practical applications in financial markets.

Discussion

The discussion section of the paper emphasizes the evolution of forecasting techniques for financial time series, particularly gold prices, highlighting the transition from traditional statistical models to advanced machine learning and deep learning approaches. Early methods, while useful, struggled with the non-linear and complex nature of gold price fluctuations. The introduction of machine learning, particularly Recurrent Neural Networks (RNNs) and Long Short-Term Memory (LSTM) networks, marked a significant improvement in prediction accuracy, although challenges remained in feature engineering and capturing temporal dependencies. Recent studies have explored hybrid models, such as combining Convolutional Neural Networks (CNNs) with LSTMs, to leverage the strengths of both architectures. For instance, a hybrid CNN-LSTM model demonstrated a 37% reduction in Mean Squared Error (MSE) compared to traditional models, while LSTM models have shown superior performance in managing complex, non-linear financial data.

The proposed LSTM-Autoencoder model in this study aims to address the limitations of existing models by enhancing predictive accuracy through effective feature extraction and noise reduction. This model outperformed others, achieving the lowest RMSE and Mean Absolute Error (MAE) values, underscoring its capability to handle the intricacies of financial time series data. The findings suggest that while historical gold price data remains the most informative predictor, incorporating external economic indicators like silver prices can enhance forecasting accuracy. Overall, the study contributes to the literature by demonstrating the efficacy of deep learning models, particularly the novel use of LSTM-Autoencoders, in improving gold price predictions and establishing a benchmark for future research in financial forecasting.

شارك: