پیشبینی قیمت در بورس اوراق بهادار تهران با استفاده از یادگیری عمیق: رویکردهای LSTM و CNN یکبعدی
الموضوعات : Financial Markets and Institutions
حسین مصطفایی نیا
1
,
کعبه یعقوبی
2
,
امیدمهدی عبادتی اصفهانی
3
1 - گروه مدیریت عملیات و فناوری اطلاعات، دانشگاه خوارزمی، تهران، ایران.
2 - گروه مهندسی کامپیوتر، دانشگاه صنعتی خواجه نصیرالدین طوسی، تهران، ایران.
3 - گروه مدیریت عملیات و فناوری اطلاعات، دانشگاه خوارزمی، تهران، ایران.
الکلمات المفتاحية: بورس اوراق بهادار تهران, پیشبینی بازار سهام, حافظه کوتاهمدت ماندگار, شبکه عصبی پیچشی, یادگیری عمیق,
ملخص المقالة :
هدف: شاخص بورس و قیمت سهام، بازتابدهندة سلامت اقتصادی و واکنش بازار به تصمیمات مالی هستند؛ ازاینرو، تحلیل دقیق آنها نقش مهمی در ارزیابی عملکرد مدلهای پیشبینی دارد. پیشبینی حرکات بازار، بهویژه در بورس پرتلاطم تهران، نیازمند مدلهایی با توان تحلیل دادههای سری زمانی غیرخطی است. این پژوهش با هدف طراحی مدلی مبتنی بر یادگیری عمیق برای پیشبینی قیمت پایانی روز بعد سهام، به توسعة ساختاری ترکیبی پرداخته است که بتواند در شرایط ناپایدار بازار نیز عملکرد قابل اتکایی داشته باشد.
روششناسی پژوهش: دادههای معاملات بورس تهران از ۲۰۰۸ تا ۲۰۲۱ (۳۰۱۴ روز معاملاتی) شامل قیمتهای پایانی، باز، بالا، پایین، حجم و ارزش معاملات گردآوری شدند. پس از پاکسازی و نرمالسازی دادهها، از روش پنجره لغزنده برای تولید توالیهای قابل آموزش استفاده شد. مدل پیشنهادی شامل یک لایه پیچشی یکبعدی برای استخراج ویژگیها، دو لایه حافظه کوتاهمدت ماندگار برای حفظ وابستگیهای زمانی و چندین لایه متراکم برای یادگیری غیرخطی است. آزمایشها در محیط پایتون انجام شد و سناریوهای مختلفی از جمله حذف دادههای پرتلاطم و تنظیم ساختار مدل بررسی شدند.
یافتهها: نتایج تجربی نشان دادند که مدل ترکیبی CNN-LSTM در تحلیل دادههای روزانه نرمالسازیشده، عملکرد دقیقی دارد. میانگین خطای مطلق بین 56/0 تا 63/0 و میانگین درصد خطای مطلق حدود 26/1 تا 46/1 درصد گزارش شد. مدل در پیشبینی میانمدت (تا ۶۰ روز) نیز پایداری خود را حفظ کرده و خروجیهایی منطبق با روند واقعی بازار ارائه داده است. در نمادهای با رفتار آرامتر، دقت پیشبینی بیشتر بوده و در نمادهای نوسانی نیز مدل توانسته ساختار قیمتی را بهدرستی بازسازی کند.
اصالت / ارزشافزوده علمی: نوآوری این تحقیق در طراحی چارچوبی دقیق، قابل تعمیم و مقاوم در برابر نوسانات شدید است که با آزمونهای گسترده در سطح نمادهای منفرد، تحلیل پایداری در شرایط حذف داده و بازسازی ساختارهای قیمتی پیچیده، افقهای نوینی برای توسعه سامانههای معاملاتی هوشمند فراهم میسازد. این مدل با قابلیت سازگاری با دادههای پرتلاطم، ناقص و ساختارهای متفاوت بازار بورس ایران، بستری مناسب برای پیادهسازی سیستمهای تصمیمیار در محیطهای اقتصادی غیرخطی و ناپایدار ارائه میکند.
Bao, W., Yue, J., & Rao, Y. (2017). A deep learning framework for financial time series using stacked autoencoders and long-short term memory. PloS one, 12(7), e0180944.
Billah, M. M., Sultana, A., Bhuiyan, F., & Kaosar, M. G. (2024). Stock price prediction: comparison of different moving average techniques using deep learning model. Neural Computing and Applications, 36(11), 5861-5871.
Chatzis, S. P., Siakoulis, V., Petropoulos, A., Stavroulakis, E., & Vlachogiannakis, N. (2018). Forecasting stock market crisis events using deep and statistical machine learning techniques. Expert systems with applications, 112, 353-371.
Eapen, J., Bein, D., & Verma, A. (2019). Novel deep learning model with CNN and bi-directional LSTM for improved stock market index prediction. In 2019 IEEE 9th annual computing and communication workshop and conference (CCWC), 0264-0270.
Ebadati, O. M., Jafari, M. A., & Davoodifar, N. (2022). Forecasting Stocks in the Financial Market by Using GA-SVM Hybrid Algorithm. Advances in Finance and Investment, 2(5), 1-22. [In Persian]
Fischer, T., & Krauss, C. (2018). Deep learning with long short-term memory networks for financial market predictions. European journal of operational research, 270(2), 654-669.
Fukushima, K. (1980). Neocognitron: A self-organizing neural network model for a mechanism of pattern recognition unaffected by shift in position. Biological cybernetics, 36(4), 193-202.
Géron, A. (2022). Hands-on machine learning with Scikit-Learn, Keras, and TensorFlow. O'Reilly Media.
Gholami, N., & Shams Gharne, N. (2024). Presenting an optimized CNN-LSTM model for stock price forecasting in the tehran stock exchange. Financial Management Perspective, 14(45), 123-147. [In Persian]
Gülmez, B. (2023). Stock price prediction with optimized deep LSTM network with artificial rabbits optimization algorithm. Expert Systems with Applications, 227, 120346.
Hamshi, M., Bonabi Ghadim, R., & Mohammadzadeh Salteh, H. (2025). The role of information disclosure dimensions on pricing the probability of using confidential information. Advances in Finance and Investment, 6(1), 135-164. [In Persian]
Heidarzadeh, M., Safa, M., Fallahshams, M., & Jahangir Nia, H. (2024). Predictability of Tehran Stock Exchange using deep learning models (CNN-LSTM model). Journal of Modern Management Engineering, 10(3), 155-170. [In Persian]
Hubel, D. H., & Wiesel, T. N. (1968). Receptive fields and functional architecture of monkey striate cortex. The Journal of physiology, 195(1), 215-243.
Li, X., Li, Y., Yang, H., Yang, L., & Liu, X. Y. (2019). DP-LSTM: Differential privacy-inspired LSTM for stock prediction using financial news. arXiv preprint arXiv:1912.10806.
Mohamadi, R., Saedi, R., & Dastgir, M. (2024). Investigating the effect of stock idiosyncratic and cash flow volatility on the future stock price crash risk. Advances in Finance and Investment, 5(4), 175-206. [In Persian]
Noorbakhsh, A., & Shaygani, M. (2024). Forecasting stock prices in the capital market with an artificial intelligence approach. Journal of Economic Business Research, 15(33), 1-18. [In Persian]
Olah, C. (2015). Understanding lstm networks. Colah Github.
Selvin, S., Vinayakumar, R., Gopalakrishnan, E. A., Menon, V. K., & Soman, K. P. (2017). Stock price prediction using LSTM, RNN and CNN-sliding window model. In 2017 international conference on advances in computing, communications and informatics (ICACCI), 1643-1647.
Shen, S., Jiang, H., & Zhang, T. (2012). Stock market forecasting using machine learning algorithms. Department of Electrical Engineering, Stanford University, Stanford, CA, 1-5.
Sohrabi, M., Mozaffar, S., Mozaffar Mirbargkar, S., Chirani, E., & Kheradyar, S. (2022). Modeling the prediction of stock market jumps based on the recurrent neural network and deep learning. Journal of Securities Exchange, 15(59), 245-268. [In Persian]
Sonkavde, G., Dharrao, D. S., Bongale, A. M., Deokate, S. T., Doreswamy, D., & Bhat, S. K. (2023). Forecasting stock market prices using machine learning and deep learning models: A systematic review, performance analysis and discussion of implications. International Journal of Financial Studies, 11(3).
Stempień, D., & Ślepaczuk, R. (2025). Hybrid Models for Financial Forecasting: Combining Econometric, Machine Learning, and Deep Learning Models. arXiv preprint arXiv:2505.19617.
Toraby Pour, T., & Siadat, S. (2023). A way to predict the stock price of the Tehran Stock Exchange in relation to knowledge. Electronic and Cyber Defense, 10(4), 91-100. [In Persian]
Tsay, R. S. (2005). Analysis of financial time series. John wiley & sons.
Zhang, K., Zhong, G., Dong, J., Wang, S., & Wang, Y. (2019). Stock market prediction based on generative adversarial network. Procedia computer science, 147, 400-406.
Zolfaghari, M., Sahabi, B., & Bakhtyaran, M. J. (2020). Designing a Model for Forecasting the Stock Exchange Total Index Returns (Emphasizing on Combined Deep Learning Network Models and GARCH Family Models). Financial Engineering and Portfolio Management, 11(42), 138-171. [In Persian]
