تحسين المحفظة باستخدام العائد القائم على التنبؤ باستخدام الشبكات العصبية طويلة وقصيرة المدى: اختبار على الأسواق الأوروبية الصاعدة والهابطة
Portfolio Optimization with Prediction-Based Return Using Long Short-Term Memory Neural Networks: Testing on Upward and Downward European Markets

شارك:
المجلة: Computational Economics، المجلد: 65، العدد: 3
DOI: https://doi.org/10.1007/s10614-024-10604-6
تاريخ النشر: 2024-05-01
المؤلف: Xavier Martínez-Barbero وآخرون
الموضوع الرئيسي: طرق التنبؤ بسوق الأسهم

نظرة عامة

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

تم تدريب الخوارزمية على بيانات تاريخية من مؤشر EURO STOXX 50® تمتد من يناير 2015 إلى ديسمبر 2020 وتم اختبارها من يناير 2021 إلى يونيو 2022. تشير النتائج التجريبية إلى أن نماذج LSTM حققت أخطاء تنبؤية منخفضة، بمتوسط خطأ مربع (MSE) يبلغ 0.00047 ومتوسط خطأ مطلق (MAE) يبلغ 0.01634. علاوة على ذلك، أظهرت النماذج دقة عالية بنسبة 95.8% في التنبؤ باتجاهات العوائد على مدى عشرة فترات استثمارية. ومن الجدير بالذكر أن المحافظ المعتمدة على التنبؤ تفوقت على مؤشر EURO STOXX 50®، مقدمة نتائج متفوقة حتى خلال ظروف السوق الهابطة.

مقدمة

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

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

الطرق

تم هيكلة منهجية هذه الدراسة في مكونين رئيسيين. في البداية، تستخدم الدراسة الشبكات العصبية ذات الذاكرة الطويلة القصيرة (LSTM) لتوقع أسعار الأسهم لجميع مكونات مؤشر EURO STOXX 50®. تتضمن عملية التنبؤ هذه إنشاء تسلسلات متداخلة من خلال تطبيق نوافذ متحركة. بعد ذلك، يتم استخدام المخرجات الناتجة عن LSTM لتحسين المحفظة المعتمدة على التنبؤ، بهدف تحديد المحفظة المثلى التي تعظم نسبة شارب. كما تقيم الدراسة أداء هذه المحافظ المحسنة مقابل معايير مختلفة على مدى فترات استثمار مختلفة.

من المتوقع أن توفر النتائج التجريبية رؤى حول فعالية التنبؤات المعتمدة على LSTM واستراتيجيات المحفظة الناتجة، خاصة من حيث قدرتها على التفوق على المعايير المعمول بها.

النتائج

يقدم قسم النتائج أداء نموذج الذاكرة الطويلة القصيرة (LSTM) المطبق على مؤشر EURO STOXX 50®، مع تسليط الضوء على قدراته التنبؤية عبر ظروف السوق المختلفة. تم ضبط النموذج لفترات احتفاظ متنوعة، حيث أظهر متوسط خطأ مربع (MSE) يبلغ 0.00047 ومتوسط خطأ مطلق (MAE) يبلغ 0.01634 لعام 2021، مع معدلات دقة تتجاوز 90% في توقع اتجاه عوائد الأسهم. في النصف الأول من عام 2022، حافظ النموذج على أداء تنبؤي قوي، خاصة لفترات الاحتفاظ التي تبلغ 50 و75 يوم تداول، محققاً دقة 100% في حالتين. تشير النتائج إلى أن نموذج LSTM يمكنه التكيف بفعالية مع بيئات السوق المختلفة، مما ينتج عنه أخطاء تنبؤية أقل من تلك المبلغ عنها في الأدبيات الحالية.

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

المناقشة

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

تستخدم الدراسة بيانات أسعار الإغلاق التاريخية من مؤشر EURO STOXX 50® لتطوير نموذج انحدار سلسلة زمنية أحادية المتغير لتوقع أسعار الأسهم. من خلال استخدام نهج النافذة المنزلقة بحجم 42 يوم تداول، تهدف الدراسة إلى توقع أسعار الأسهم المستقبلية، والتي تستخدم بعد ذلك لحساب العوائد المتوقعة والمخاطر لتحسين المحفظة. تستند عملية التحسين إلى إطار العمل المتوسط-التباين، بهدف تعظيم نسبة شارب مع الالتزام بالقيود على الأوزان والعوائد. تؤكد النتائج على إمكانية دمج تقنيات التعلم الآلي مع طرق تحسين المحفظة التقليدية لتحقيق عوائد متفوقة عبر ظروف السوق المختلفة، مما يساهم في زيادة الأدبيات حول تطبيقات الذكاء الاصطناعي في المالية.

القيود

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

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

Journal: Computational Economics, Volume: 65, Issue: 3
DOI: https://doi.org/10.1007/s10614-024-10604-6
Publication Date: 2024-05-01
Author(s): Xavier Martínez-Barbero et al.
Primary Topic: Stock Market Forecasting Methods

Overview

This research paper explores the integration of artificial intelligence, specifically long short-term memory (LSTM) neural networks, with classical mean-variance optimization to enhance portfolio performance. The study emphasizes the significance of accurate input estimation in portfolio optimization, demonstrating that machine learning techniques can yield more robust portfolios capable of generating consistent returns across varying financial contexts.

The algorithm was trained on historical data from the EURO STOXX 50® Index spanning from January 2015 to December 2020 and tested from January 2021 to June 2022. Empirical findings indicate that the LSTM models achieved low predictive errors, with an average mean squared error (MSE) of 0.00047 and a mean absolute error (MAE) of 0.01634. Furthermore, the models demonstrated a high accuracy of 95.8% in predicting return directions over ten investment periods. Notably, the prediction-based portfolios outperformed the EURO STOXX 50® Index, delivering superior results even during bear market conditions.

Introduction

The introduction of this research paper addresses the complexities of financial market behavior prediction and optimal stock allocation, highlighting the influence of various economic factors such as monetary policies, exchange rates, and inflation. Since the introduction of the mean-variance (MV) portfolio selection model by Harry Markowitz in 1952, portfolio optimization has evolved, with significant contributions from scholars like Tobin and Sharpe. However, the sensitivity of Markowitz’s model to input estimations has led to challenges in achieving robust portfolio performance, particularly when faced with estimation errors in expected returns. This has prompted the exploration of alternative methods, including the Black-Litterman model and machine learning techniques, to enhance return predictions.

The primary objective of this study is to propose a novel approach to address the limitations of traditional portfolio optimization by employing long short-term memory (LSTM) recurrent neural networks (RNN) for expected return predictions. The research aims to improve the accuracy of return forecasts, thereby enhancing portfolio weight allocations. The authors present a threefold contribution: first, they develop a sliding window-based LSTM RNN to treat stock predictions as univariate time series problems; second, they integrate the predicted returns with classic MV optimization to construct superior portfolios that outperform both the Eurozone stock index and equally weighted portfolios; and third, they evaluate their strategies under varying market conditions, including both bullish and bearish phases, demonstrating the robustness of their model in adverse scenarios. This comprehensive approach distinguishes their work from existing literature, particularly in its application of machine learning during downturns in the market.

Methods

The methodology of this study is structured into two primary components. Initially, the research employs long short-term memory (LSTM) neural networks to predict the stock prices of all constituents of the EURO STOXX 50® Index. This prediction process involves the creation of overlapping sequences through the application of rolling windows. Subsequently, the outputs generated by the LSTM are utilized for prediction-based portfolio optimization, aiming to identify the optimal portfolio that maximizes the Sharpe ratio. The study further assesses the performance of these optimized portfolios against various benchmarks over different investment periods.

The experimental results are anticipated to provide insights into the effectiveness of the LSTM-based predictions and the resulting portfolio strategies, particularly in terms of their ability to outperform established benchmarks.

Results

The results section presents the performance of a Long Short-Term Memory (LSTM) model applied to the EURO STOXX 50® Index, highlighting its predictive capabilities across different market conditions. The model was fine-tuned for various holding periods, demonstrating an average Mean Squared Error (MSE) of 0.00047 and an average Mean Absolute Error (MAE) of 0.01634 for 2021, with accuracy rates exceeding 90% for predicting the direction of stock returns. In the first half of 2022, the model maintained strong predictive performance, particularly for holding periods of 50 and 75 trading days, achieving 100% accuracy in two instances. The findings indicate that the LSTM model can effectively adapt to different market environments, yielding predictive errors that are smaller than those reported in existing literature.

The discussion emphasizes the model’s ability to create profitable investment strategies that outperform the market in both bullish and bearish scenarios. By utilizing predicted prices to optimize portfolios through mean-variance optimization, the study mitigates the subjective biases typically associated with stock selection. The empirical results reveal that the constructed portfolios consistently surpassed the EURO STOXX 50® Index and an equally weighted portfolio across all evaluated investment horizons, even during periods of significant market downturns. This research underscores the robustness of LSTM models in financial forecasting and portfolio optimization, particularly in the context of recent economic challenges, including the COVID-19 pandemic and high inflation rates.

Discussion

The discussion highlights the critical role of accurate input predictions in portfolio optimization, emphasizing that the optimal asset allocation relies heavily on estimating expected returns and the variance-covariance matrix. The literature indicates that traditional models like ARIMA and GARCH, while effective for capturing linear relationships, often fail to account for complex non-linear dynamics, particularly over longer forecasting horizons. In contrast, machine learning techniques, particularly Long Short-Term Memory (LSTM) networks, have demonstrated superior predictive accuracy by effectively modeling non-linear relationships without assuming normality in data distributions. Numerous studies have shown that LSTM and other advanced machine learning models outperform conventional methods in stock price prediction, leading to enhanced portfolio performance.

The research utilizes historical closing price data from the EURO STOXX 50® Index to develop a univariate time series regression model for stock price forecasting. By employing a sliding window approach with a size of 42 trading days, the study aims to predict future stock prices, which are then used to calculate expected returns and risks for portfolio optimization. The optimization process is grounded in the mean-variance framework, aiming to maximize the Sharpe Ratio while adhering to constraints on weights and returns. The findings underscore the potential of integrating machine learning techniques with traditional portfolio optimization methods to achieve superior returns across various market conditions, thereby contributing to the growing body of literature on AI applications in finance.

Limitations

The research acknowledges several limitations in its approach, primarily centered on the reliance on historical data for predictions. This methodology does not incorporate external factors such as news, economic indicators, or both technical and fundamental indicators, adhering to a purist technical perspective that assumes prices reflect all available information. Future research could enhance predictive accuracy by integrating these additional inputs.

Moreover, the study suggests exploring alternative methods for risk estimation, including evaluating the accuracy and errors of predictions to inform portfolio construction based on the trade-off between expected returns and the model’s confidence in those returns. Investigating a multivariate Long Short-Term Memory (LSTM) model could also provide insights into the relationships among various stocks, potentially improving predictive performance. Lastly, while mean-variance optimization has been a longstanding technique, the application of advanced methods such as deep reinforcement learning or quantum-inspired algorithms for portfolio optimization warrants further exploration.

شارك: