DOI: https://doi.org/10.1371/journal.pone.0319776
PMID: https://pubmed.ncbi.nlm.nih.gov/40324013
تاريخ النشر: 2025-05-05
المؤلف: Zhenyun Du
الموضوع الرئيسي: طرق التنبؤ بسوق الأسهم
نظرة عامة
تقدم ورقة البحث نموذجًا جديدًا، يُطلق عليه TCN-QV، والذي يدمج الشبكات التلافيفية الزمنية (TCN) مع آليات الانتباه للاستعلام والمفاتيح (QK) لتحسين دقة توقعات أسعار الذهب. نظرًا للتحديات الكامنة في توقع أسعار الذهب بسبب تقلباتها العشوائية، وخصائصها غير الخطية، وتقلبها العالي، يستخدم نموذج TCN-QV طبقات تلافيفية سببية متداخلة لاستخراج الميزات الزمنية بفعالية من بيانات السلاسل الزمنية. يسمح إدخال آلية الانتباه بتوزيع الوزن بشكل تكيفي بناءً على أهمية ميزات المعلومات، مما يؤدي إلى توقعات يتم توليدها من خلال طبقة كثيفة.
تم التحقق من أداء نموذج TCN-QV من خلال تجارب على بيانات أسعار الذهب من شنغهاي، مما يظهر انخفاضًا كبيرًا في متوسط الخطأ المطلق (MAE) بحوالي 5.47% إلى 33.69% مقارنة بالنماذج الأساسية عبر أربعة مجموعات بيانات. بالإضافة إلى ذلك، يظهر النموذج أداءً قويًا في توقعات السلاسل الطويلة، حيث يحافظ على الدقة حتى مع زيادة خطوات زمن التوقع، على عكس النماذج الأخرى التي تظهر تدهورًا كبيرًا في الأداء. تؤكد تجارب الإزالة أيضًا على أهمية كل مكون من مكونات النموذج. تختتم الدراسة بأن نموذج TCN-QV يعد حلاً متعدد الاستخدامات لمهام التوقع الزمني، مع توجيه الأبحاث المستقبلية نحو تحسين تعقيد النموذج ومدة الاختبار.
مقدمة
في مقدمة ورقة البحث هذه، يبرز المؤلفون أهمية الذهب كأصل ملاذ آمن تقليدي، خاصة خلال فترات عدم اليقين الاقتصادي، حيث يمكن أن تؤثر تقلبات أسعاره على ثقة المستثمرين واستقرار السوق. يشيرون إلى أن الذهب يعمل كأداة تحوط خلال الأزمات، مثل الزيادة في الأسعار بعد استفتاء خروج بريطانيا من الاتحاد الأوروبي، ويلعب دورًا حيويًا في احتياطيات النقد الأجنبي للدولة، مما يؤثر على صياغة السياسة النقدية. يؤكد المؤلفون على ضرورة التنبؤ بدقة بتغيرات أسعار الذهب لكل من المستثمرين وصانعي السياسات، مقترحين أن تحليل السلاسل الزمنية يمكن أن يكشف عن الاتجاهات التاريخية والعوامل التي تؤثر على هذه التقلبات.
تناقش الورقة قيود نماذج السلاسل الزمنية الخطية التقليدية، مثل ARIMA وSARIMA، في التقاط الديناميات غير الخطية المعقدة لأسعار المعادن، مما يدفع الباحثين لاستكشاف طرق التعلم العميق، بما في ذلك الشبكات العصبية طويلة وقصيرة المدى (LSTM) والشبكات التلافيفية الزمنية (TCN). على الرغم من فعاليتها، لا تزال هناك تحديات مثل مشاكل التدرج في الشبكات العصبية المتكررة وتعقيد الحسابات في المحولات. لمعالجة هذه التحديات، يقترح المؤلفون نموذجًا جديدًا، TCN-QV، الذي يدمج TCNs مع آليات الانتباه العالمية المحسّنة. يعزز هذا النموذج الأداء التنبؤي من خلال استخدام التلافيف السببية المتداخلة وآلية الانتباه الذاتي التي تحسن استخراج العلاقات السياقية مع الحفاظ على الكفاءة الحسابية. توضح الورقة مساهماتها، بما في ذلك تطوير نموذج TCN-QV، الذي يهدف إلى تحسين دقة توقعات أسعار المعادن مع معالجة التحديات الحسابية المرتبطة بالنماذج التقليدية.
الطرق
توضح قسم المنهجية إعداد التجارب ومجموعة البيانات المستخدمة في الدراسة. تم إجراء التجارب على خادم يعمل بنظام تشغيل Windows 11 بعمق 64 بت، مدعومًا بمعالج Intel Core i7-1260P من الجيل الثاني عشر بسرعة ساعة تبلغ 2.10 جيجاهرتز. كانت بيئة التطوير هي PyCharm 2020.1.3، مع Python 3.8.10 كلغة برمجة.
تتكون مجموعة البيانات من بيانات تداول الذهب في شنغهاي، تغطي الفترة من 30 أكتوبر 2002 إلى 24 يوليو 2024. تشمل عينات الذهب بدرجات نقاء 99.99% و99.95%، بالإضافة إلى بيانات تداول محددة لـ 100 جرام من الذهب من 25 ديسمبر 2005 إلى 24 يوليو 2006، وبيانات الذهب في شنغهاي (T+D) من 27 سبتمبر 2004 إلى 24 يوليو 2024. تشمل البيانات، المستمدة من منصة CBC Metal Mesh، معلمات يومية مثل أسعار الافتتاح، الأعلى، الأدنى، والإغلاق. من الجدير بالذكر أن سعر الذهب في شنغهاي قد ارتفع من حوالي 85 يوان إلى حوالي 550 يوان خلال فترة الدراسة، مما يظهر تقلبات كبيرة تشكل تحديات لنمذجة التوقعات. تشمل الميزات المختارة للتحليل التاريخ، سعر الافتتاح، السعر الأعلى، والسعر الأدنى، مع تحديد سعر الإغلاق كهدف للتوقع.
المناقشة
تسلط قسم المناقشة في ورقة البحث الضوء على التقدم في توقعات السلاسل الزمنية، مع التركيز على تطور النماذج من الأساليب الإحصائية التقليدية مثل ARIMA وSARIMA إلى تقنيات التعلم الآلي الأكثر تطورًا، بما في ذلك الشبكات العصبية والمحولات. تشمل المساهمات الملحوظة تحسينات على ARIMA من خلال توسيع تايلور ودمج الانحدار باستخدام المتجهات الداعمة (SVR) مع ARIMA لتوقعات سوق الأسهم. تشير الورقة أيضًا إلى زيادة اعتماد النماذج الهجينة التي تجمع بين الشبكات العصبية وآليات الانتباه، خاصة في التوقعات المالية، حيث أظهرت نماذج مثل FDG Transformer وNAGU نتائج واعدة.
لقد حسنت إدخال بنية المحول، مع آلية الانتباه الذاتي، بشكل كبير القدرة على التقاط الأنماط المعقدة في البيانات الزمنية. ومع ذلك، لا تزال هناك تحديات، خاصة في معالجة السلاسل الطويلة بكفاءة والحفاظ على الحساسية لترتيب الزمن. يهدف نموذج TCN-QV المقترح إلى معالجة هذه القضايا من خلال دمج الشبكات التلافيفية الزمنية (TCNs) مع آلية الانتباه للاستعلام والقيمة (QV). يعزز هذا النموذج استخراج الميزات واستخدام المعلومات السياقية مع استخدام نهج النافذة المنزلقة لإدارة التعقيد الحسابي. كما أن دمج شبكة متعددة الطبقات (MLP) مع دالة تنشيط وحدة الخطأ الغاوسي (GELU) يحسن أيضًا قدرة النموذج على التقاط العلاقات غير الخطية المعقدة. بشكل عام، تقدم الدراسة إطار عمل جديد لتوقعات السلاسل الزمنية على المدى الطويل يوازن بين الدقة والكفاءة الحسابية، مما يمهد الطريق لنمذجة توقعات أكثر فعالية في تطبيقات متنوعة.
DOI: https://doi.org/10.1371/journal.pone.0319776
PMID: https://pubmed.ncbi.nlm.nih.gov/40324013
Publication Date: 2025-05-05
Author(s): Zhenyun Du
Primary Topic: Stock Market Forecasting Methods
Overview
The research paper presents a novel model, termed TCN-QV, which integrates Temporal Convolutional Networks (TCN) with Query and Keys (QK) attention mechanisms to improve the accuracy of gold price predictions. Given the inherent challenges in forecasting gold prices due to their random fluctuations, nonlinear characteristics, and high volatility, the TCN-QV model employs stacked dilated causal convolution layers to effectively extract temporal features from time series data. The introduction of an attention mechanism allows for adaptive weight distribution based on the significance of information features, culminating in predictions generated through a dense layer.
The performance of the TCN-QV model is validated through experiments on gold price data from Shanghai, demonstrating a significant reduction in Mean Absolute Error (MAE) of approximately 5.47% to 33.69% compared to baseline models across four datasets. Additionally, the model exhibits robust performance in long sequence predictions, maintaining accuracy even as prediction time steps increase, unlike other models that show significant performance deterioration. Ablation experiments further confirm the importance of each component of the model. The study concludes that the TCN-QV model serves as a versatile solution for temporal prediction tasks, with future research aimed at optimizing model complexity and testing duration.
Introduction
In the introduction of this research paper, the authors highlight the significance of gold as a traditional safe-haven asset, particularly during economic uncertainties, where its price fluctuations can influence investor confidence and market stability. They note that gold serves as a hedging tool during crises, such as the post-Brexit referendum surge in prices, and plays a vital role in a nation’s foreign exchange reserves, impacting monetary policy formulation. The authors emphasize the necessity of accurately predicting gold price changes for both investors and policymakers, suggesting that time series analysis can reveal historical trends and factors influencing these fluctuations.
The paper discusses the limitations of traditional linear time series models, such as ARIMA and SARIMA, in capturing the complex nonlinear dynamics of metal prices, leading researchers to explore deep learning methods, including Long Short-Term Memory (LSTM) networks and Temporal Convolutional Networks (TCN). Despite their effectiveness, challenges like gradient issues in recurrent neural networks and computational complexity in Transformers remain. To address these challenges, the authors propose a novel model, TCN-QV, which integrates TCNs with optimized global attention mechanisms. This model enhances predictive performance by employing dilated causal convolutions and a self-attention mechanism that improves the extraction of contextual relationships while maintaining computational efficiency. The paper outlines its contributions, including the development of the TCN-QV model, which aims to improve the accuracy of metal price predictions while addressing the computational challenges associated with traditional models.
Methods
The methodology section outlines the experimental setup and dataset utilized in the study. The experiments were conducted on a server running a 64-bit Windows 11 operating system, powered by a 12th generation Intel Core i7-1260P CPU at a clock speed of 2.10 GHz. The development environment was PyCharm 2020.1.3, with Python 3.8.10 as the programming language.
The dataset comprises trading data for Shanghai gold, covering the period from October 30, 2002, to July 24, 2024. It includes gold samples with purities of 99.99% and 99.95%, as well as specific trading data for 100 grams of gold from December 25, 2005, to July 24, 2006, and Shanghai Gold (T+D) data from September 27, 2004, to July 24, 2024. The data, sourced from the CBC Metal Mesh platform, includes daily parameters such as opening, highest, lowest, and closing prices. Notably, the price of gold in Shanghai has increased from approximately 85 yuan to around 550 yuan during the study period, exhibiting significant fluctuations that pose challenges for predictive modeling. The selected features for analysis include date, opening price, highest price, and lowest price, with the closing price designated as the prediction target.
Discussion
The discussion section of the research paper highlights advancements in time series forecasting, emphasizing the evolution of models from traditional statistical approaches like ARIMA and SARIMA to more sophisticated machine learning techniques, including neural networks and Transformers. Notable contributions include enhancements to ARIMA through Taylor expansion and the integration of Support Vector Regression (SVR) with ARIMA for stock market predictions. The paper also notes the increasing adoption of hybrid models that combine neural networks with attention mechanisms, particularly in financial forecasting, where models like the FDG Transformer and NAGU have shown promising results.
The introduction of the Transformer architecture, with its self-attention mechanism, has significantly improved the ability to capture complex patterns in temporal data. However, challenges remain, particularly in efficiently processing long sequences and maintaining sensitivity to temporal order. The proposed TCN-QV model aims to address these issues by combining Temporal Convolutional Networks (TCNs) with a Query-Value (QV) attention mechanism. This model enhances feature extraction and contextual information utilization while employing a sliding window approach to manage computational complexity. The integration of a Multi-Layer Perceptron (MLP) with a Gaussian Error Linear Unit (GELU) activation function further improves the model’s ability to capture complex nonlinear relationships. Overall, the study presents a novel framework for long-term time series forecasting that balances accuracy and computational efficiency, paving the way for more effective predictive modeling in various applications.
