ارائه مدلی برای پیش بینی قیمت سهام مبتنی بر CNN-LSTM بهینه شده در بورس اوراق بهادار تهران | ||
| چشم انداز مدیریت مالی | ||
| دوره 14، شماره 45، 1403، صفحه 123-147 اصل مقاله (1.43 M) | ||
| نوع مقاله: علمی - پژوهشی | ||
| شناسه دیجیتال (DOI): 10.48308/jfmp.2024.104892 | ||
| نویسندگان | ||
| نیما غلامی1؛ ناصر شمس قارنه* 2 | ||
| 1دانشجوی کارشناسی ارشد مهندسی مالی، دانشگاه صنعتی امیرکبیر، تهران، ایران. | ||
| 2دانشیار گروه مهندسی صنایع و سیستم های مدیریت ، دانشگاه صنعتی امیرکبیر، تهران، ایران | ||
| چکیده | ||
| هدف: یکی از مهمترین اهداف سرمایهگذاران و معاملهگران بازارهای مالی شناخت رفتار قیمت سهام است. پیشبینی قیمت، میتواند به افراد در مورد خرید، فروش یا نگهداری سهام کمک کند تا با زمانبندی موثر معاملات، سود بالقوه را به حداکثر یا زیان را به حداقل برسانند. به دلیل رفتار غیرخطی قیمت و وابستگی آن به عوامل گوناگون پیشبینی قیمت کار دشواری است که برای مقابله با این چالش، در این پژوهش از مدلهای یادگیری عمیق کمک گرفته میشود که زیر شاخهای از مدلهای یادگیری ماشین هستند. ساختار مدلهای یادگیری عمیق به دلیل تمرکز بر روی تعداد لایههای بیشتر و استفاده از گرههای به هم پیوسته (نورونها) در مواجه با مقادیر زیادی داده عملکرد مناسبی دارند و به دلیل توانایی آنها در شناخت الگوها و روابط، امکان ارائه پیشبینی دقیقتری از قیمتها را فراهم میکنند. روش: در این پژوهش، برای پیشبینی قیمت سهام در بازار بورس اوراق بهادار تهران از دو مدل پیشنهادی LSTM-CNN و CNN-LSTM به وسیله بهینهسازی هایپرپارامترها توسط الگوریتم PSO که یک الگوریتم بهینهسازی مبتنی بر جمعیت است و تکنیکهای تقویت مدل شامل: آموزش خصمانه، مکانسیم توجه و بلوک باقیمانده استفاده شده است. این مدلها با مدلهای CNN،LSTM وCNN-LSTM مورد مقایسه قرار گرفته اند. جهت دستیابی به این هدف، دادههای10سهم از تاریخ20 شهریور 1392 تا تاریخ20 شهریور 1402 مورد بررسی قرارگرفتهاست.دادههای ورودی شامل: قیمتهای تعدیلشده سهم، اندیکاتورها، اسیلاتورها، قیمت دلارآزاد آمریکا و نرخ تورم میباشد. یافتهها: مقایسه نتایج معیارهای ارزیابی شامل چهار معیار RMSE، MAE، R-squared و MAPE نشان از عملکرد مطلوب دو مدل پیشنهادی با سایر مدلها میدهد. علاوه بر این، مدل پیشنهادی LSTM-CNN توانسته بهترین عملکرد را به ثبت رساند. همچنین، بررسی نتایج دو مدل پیشنهادی، با و بدون الگوریتم PSO مشخص کرد که این الگوریتم به بهینهسازی مدلها کمک میکند. در نهایت، بررسی استراتژیهای مبتنی بر مدلهای پیشنهادی بر روی پنج سهم از پنج صنعت مختلف در چهار دوره زمانی نشان از عملکرد مالی برتر آنها میدهد. به عبارت دیگر، مدلهای پیشنهادیLSTM-CNN و CNN-LSTMتوانستهاند در معیار بازده مالی و نسبت شارپ در مقایسه با سایر استراتژیها موفقیت مطلوبی بهدست آورند که مدل پیشنهادیLSTM-CNN مطلوبترین عملکرد را به ثبت رسانده است. نتیجهگیری: هایپرپارامترها، پارامترهایی هستند بر روی خروجی مدلها تاثیر دارند و با تغییر هرکدام از این هایپارامترها نتایج مختلفی بهدست میآید که میتواند مناسب یا غیر مناسب باشند این پارامترها در طول آموزش یاد نمیگیرند و باید قبل از آموزش تنظیم شوند. طبق نتایج بهدست آمده، بهینهسازی هایپرپارامترها، میتواند سهم را بر اساس رفتار آن سهم بهینه کند که این امر منجر به پیشبینی دقیقتر قیمت میشود. همچنین، با استفاده از مدلLSTM-CNN استخراج ویژگیها از دادهها و شناسایی و درک وابستگیها در ویژگیهای استخراج شده به طور مناسبتری از CNN-LSTM صورت میگیرد که میتواند در بهبود دقت پیشبینی کمک کند. | ||
| کلیدواژهها | ||
| پیشبینی قیمت؛ یادگیری عمیق؛ حافظه طولانی کوتاه مدت؛ شبکه عصبی کانولوشن؛ بورس اوراق بهادار تهران | ||
| عنوان مقاله [English] | ||
| Presenting an Optimized CNN-LSTM Model for Stock Price Forecasting in the Tehran Stock Exchange | ||
| نویسندگان [English] | ||
| Nima Gholami1؛ Naser Shams Gharne2 | ||
| 1MSc. Student In Financial Engineering , Amirkabir University of Technology, Tehran, Iran. | ||
| 2Associate Professor, Department of Industrial Engineering & Management Systems, Amirkabir University of Technology, Tehran, Iran | ||
| چکیده [English] | ||
| Purpose: Understanding stock price behavior is one of the primary objectives for investors and traders in financial markets. Accurate price predictions enable informed decisions about buying, selling, or holding stocks, thereby optimizing transaction timing to maximize profits or minimize losses. Stock price prediction is inherently challenging due to the nonlinear nature of price movements and their dependence on various factors. To address these challenges, this study employs deep learning models, a subset of machine learning techniques known for their capability to handle large datasets effectively. The layered architecture and interconnected nodes (neurons) of these models enable advanced pattern recognition and relationship analysis, resulting in more precise price forecasts. Method: This study proposes two optimized deep learning models, LSTM-CNN and CNN-LSTM, for predicting stock prices in the Tehran Stock Exchange. The models are fine-tuned through hyperparameter optimization using the Particle Swarm Optimization (PSO) algorithm, a population-based method widely recognized in machine learning. Additionally, advanced techniques such as adversarial training, attention mechanisms, and residual blocks are employed to enhance the models’ performance. The proposed models are benchmarked against conventional approaches, including CNN, LSTM, and CNN-LSTM models without optimization. The dataset includes information from 10 selected stocks traded in the Tehran Stock Exchange over a 10-year period, spanning from September 11, 2013, to September 11, 2023. Input variables include adjusted stock prices, financial indicators, oscillators, the free market US dollar price, and inflation rates, providing a comprehensive representation of factors influencing stock price behavior. Findings: The evaluation metrics used in this study—RMSE, MAE, R-squared, and MAPE—reveal that the proposed deep learning models significantly outperform traditional approaches. Among these, the LSTM-CNN model demonstrates superior performance across all metrics, achieving higher prediction accuracy compared to the CNN-LSTM model. Analysis of the models with and without the PSO algorithm confirms that incorporating PSO significantly enhances model optimization. Strategy-based evaluations conducted on five selected stocks from five different industries, over four distinct time periods, further validate the superior financial performance of the proposed models. Specifically, the LSTM-CNN and CNN-LSTM models excel in terms of financial return metrics and the Sharpe ratio. Among the two, the LSTM-CNN model consistently achieves the most favorable outcomes, demonstrating its reliability and robustness for stock price forecasting. Conclusion: Hyperparameters, which must be set before training, significantly influence the performance of deep learning models. The findings emphasize that hyperparameter optimization tailors models to stock-specific behaviors, enabling more accurate price predictions. The LSTM-CNN model outperforms the CNN-LSTM model in feature extraction and identifying dependencies within the data, resulting in improved accuracy. By integrating advanced techniques such as adversarial training, attention mechanisms, and the PSO algorithm, the proposed models provide a robust framework for stock price forecasting in the Tehran Stock Exchange. These results underscore the critical role of deep learning in financial markets, offering investors and traders tools for more informed decision-making. The LSTM-CNN model, in particular, demonstrates exceptional performance in prediction accuracy and financial metrics, making it a valuable approach for enhancing predictive analytics in the capital market. | ||
| کلیدواژهها [English] | ||
| Stock Price Prediction, Deep Learning, LSTM, CNN, Tehran Stock Exchange | ||
| مراجع | ||
|
Abdi,Nasimeh; Moradzadeh Fard ,mehdi ; Ahmadzadeh,Hamid & Khoddam ,Mahmoud (2022). A Hybrid Model for Portfolio Optimization Based on Stock Price Forecasting with LSTM Recurrent Neural Network using Cardinality Constraints and Multi-Criteria Decision Making Methods (Case study of Tehran Stock Exchange). Journal of Financial Management Perspective, 11(36),119-136. (in Persian) Christian, Szegedy. Wojciech, Zaremba. Ilya, Sutskever. Joan Bruna, Dumitru Erhan. Ian, Goodfellow.& Rob, Fergus.(2014). Intriguing properties of neural networks. In ICLR. Diebold, F,X.& and R,S, Mariano. (1995). Comparing Predictive Accuracy. Journal of Business and Economic Statistics, 13: 253-63. Ding, X. Zhang, Y. Liu, T.& Duan, J.(2015). Deep learning for event-driven stock prediction. Artificial Intelligence, Buenos Aires, Argentina,2327-2333. Eghtesad, Amirali. & Mohammadi, Emran. (2023). Portfolio optimization with return prediction using LSTM, Random forest, and ARIMA. Journal of Financial Management Perspective, 13(43), 9 - 28. (in Persian) F, Kamalov.(2020). Forecasting significant stock price changes using neural networks.Neural Computing and Applications. Gao, Penglei. Zhang, Rui.& Yang, Xi.(2020). The Application of Stock Index Price Prediction with Neural Network. Mathematical and Computational Applications, 25(3). Ghazi Asgari Naeini, Saba; Neshat, Najmeh & Jafari Nodoushan, Abbasali (2022). Sustainable Policy-Making of Financial Systems in Crisis Situations With Modelling Based on Artificial Neural Networks. Journal of Financial Management Perspective, 12(38), 103 - 129. (in Persian) Hamayel, M.J.& Owda, A,Y.(2021). A Novel Cryptocurrency Price Prediction Model Using GRU, LSTM and bi-LSTM Machine Learning Algorithms. AI , 2, 477–496. He, K. Zhang, X. Ren, S.& Sun, J.(2016). Deep residual learning for image recognition. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 770-778. Hochreiter, S.(1998). The Vanishing Gradient Problem During Learning Recurrent Neural Nets and Problem Solutions, International Journal of Uncertainty Fuzziness and Knowledge-Based, 6(2):107-116. Khaidem,L. Saha,S. & Roy Dey,S.(2016). Predicting the direction of stock market prices using random forest. in Applied Mathematical Finance,1-2. Kim, T.& Kim, H, Y .(2019). Forecasting stock prices with a feature fusion LSTM-CNN model using different representations of the same data. PloS one. Lakshminarayanan, S,K.,& McCrae, J.(2019). A comparative study of svm and lstm deep learning algorithms for stock market prediction .Artificial Intelligence and Cognitive Science,Galway, Ireland,5–6. Lee,S,W.& H,Y, Kim.(2020). Stock market forecasting with super-high dimensional time-series data using ConvLSTM, trend sampling, and specialized data augmentation.Expert Systems with Applications,161:113704. Li, P. Song, Y. McLoughlin, I.V, Guo,W&. Dai, L.-R.(2018). An Attention Pooling based Representation Learning Method for Speech Emotion Recognition. In Proceedings of the Interspeech ,Hyderabad, India. Livieris, I.E., Kyriakidou, N., Stavroyiannis, S.,Pintelas, P. (2021). An Advanced CNN-LSTM Model for Cryptocurrency Forecasting. Electronics, MDPI. 2021. Nelson, D,M,Q. Pereira, A,C,M. & De Oliveira, R,A).2017). Stock market’s price movement prediction with LSTM neural Networks. Proceedings of the International Joint Conference on Neural Networks. Nikou, M. Mansourfar, G.& Bagherzadeh, J.(2019). Stock price prediction using DEEP learning algorithm and its comparison with machine learning algorithms. Intell,26, 164–174. Patil, P. Wu, C, S. Potika, K.& Orang, M.(2020). Stock market prediction using ensemble of graph theory, machine learning and deep learning models. Engineering and Information Management,Sydney, Australia, 12–15. Tae-Young Kim.& Sung-Bae Cho.(2021). Optimizing CNN-LSTM neural networks with PSO for anomalous query access control. Neurocomputing,666-677. Taye, M.M.(2023). Understanding of Machine Learning with Deep Learning: Architectures,Workflow,Applications and Future Directions.Computers, 12, 91. Wenjie, Lu. Jiazheng, Li. Yifan, Li. Aijun, Sun.& Jingyang, Wang.(2020). A CNN-LSTM-Based Model to Forecast Stock Prices, Complexity, 6622927. Yann, LeCun.& Yoshua, Bengio.(1995). Convolutional networks for images, speech, and time series.in The Handbook of Brain Theory and Neural Networks. Zhao, Y.& Khushi, M.(2020). Wavelet denoised-ResNet CNN and LightGBM method to predict forex rate of change.IEEE International, Sorrento, Italy, 11–17 .
| ||
|
آمار تعداد مشاهده مقاله: 6,751 تعداد دریافت فایل اصل مقاله: 2,060 |
||
