|
|
ارائه مدلی برای پیش بینی قیمت سهام مبتنی بر cnn-lstm بهینه شده در بورس اوراق بهادار تهران
|
|
|
|
|
نویسنده
|
غلامی نیما ,شمس قارنه ناصر
|
منبع
|
چشم انداز مديريت مالي - 1403 - دوره : 14 - شماره : 45 - صفحه:123 -147
|
چکیده
|
هدف: یکی از مهمترین اهداف سرمایهگذاران و معاملهگران بازارهای مالی شناخت رفتار قیمت سهام است. پیشبینی قیمت، میتواند به افراد در مورد خرید، فروش یا نگهداری سهام کمک کند تا با زمانبندی موثر معاملات، سود بالقوه را به حداکثر یا زیان را به حداقل برسانند. به دلیل رفتار غیرخطی قیمت و وابستگی آن به عوامل گوناگون پیشبینی قیمت کار دشواری است که برای مقابله با این چالش، در این پژوهش از مدلهای یادگیری عمیق کمک گرفته میشود که زیر شاخهای از مدلهای یادگیری ماشین هستند. ساختار مدلهای یادگیری عمیق به دلیل تمرکز بر روی تعداد لایههای بیشتر و استفاده از گرههای به هم پیوسته (نورونها) در مواجه با مقادیر زیادی داده عملکرد مناسبی دارند و به دلیل توانایی آنها در شناخت الگوها و روابط، امکان ارائه پیشبینی دقیقتری از قیمتها را فراهم میکنند.روش: در این پژوهش، برای پیشبینی قیمت سهام در بازار بورس اوراق بهادار تهران از دو مدل پیشنهادی 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 صورت میگیرد که میتواند در بهبود دقت پیشبینی کمک کند.
|
کلیدواژه
|
پیشبینی قیمت، یادگیری عمیق، حافظه طولانی کوتاه مدت، شبکه عصبی کانولوشن، بورس اوراق بهادار تهران
|
آدرس
|
دانشگاه صنعتی امیرکبیر, ایران, دانشگاه صنعتی امیرکبیر, گروه مهندسی صنایع و سیستم های مدیریت, ایران
|
پست الکترونیکی
|
nshams@aut.ac.ir
|
|
|
|
|
|
|
|
|
presenting an optimized cnn-lstm model for stock price forecasting in the tehran stock exchange
|
|
|
Authors
|
gholami nima ,shams gharne naser
|
Abstract
|
purpose: one of the primary objectives for investors and traders in financial markets is understanding stock price behavior. accurate price predictions can assist individuals in making informed decisions about buying, selling, or holding stocks, thereby maximizing potential profits or minimizing losses through effective transaction timing. due to the nonlinear behavior of prices and their dependence on various factors, predicting stock prices is challenging. to address this, the research employs deep learning models, a subset of machine learning models known for their capability to handle large datasets. their structure, featuring multiple layers and interconnected nodes (neurons), allows for recognizing patterns and relationships, facilitating more accurate price predictions.method: this study utilizes two proposed models, lstm-cnn and cnn-lstm, to predict stock prices in the tehran stock exchange. these models are optimized through hyperparameter tuning using the pso algorithm, a population-based optimization technique, along with model enhancement techniques such as adversarial training, attention mechanism, and residual blocks. the proposed models are compared with cnn, lstm, and cnn-lstm models. data from 10 stocks, spanning september 11, 2013, to september 11, 2023, were analyzed. the input data include adjusted stock prices, indicators, oscillators, the free market us dollar price, and the inflation rate.findings: comparative results of evaluation metrics, including rmse, mae, r-squared, and mape, indicate that the two proposed models outperform other models. the lstm-cnn model, in particular, has demonstrated the best performance. evaluation of the proposed models, with and without the pso algorithm, reveals that the algorithm aids in optimizing the models. furthermore, strategy analysis based on the proposed models, applied to five stocks from five different industries over four time periods, shows superior financial performance. in essence, the lstm-cnn and cnn-lstm models have achieved notable success in terms of financial returns and the sharpe ratio compared to other strategies, with the lstm-cnn model showing the most favorable performance.conclusion: hyperparameters are critical as they impact model outcomes, and varying these parameters can produce different results, which may be either suitable or unsuitable. these parameters are not learned during training and must be set before training. the findings suggest that hyperparameter optimization can fine-tune models based on stock behavior, leading to more accurate price predictions. additionally, the lstm-cnn model excels in feature extraction and understanding dependencies within the data compared to the cnn-lstm model, thereby enhancing prediction accuracy. in summary, leveraging deep learning models, specifically lstm-cnn and cnn-lstm, optimized with pso and advanced techniques, significantly improves stock price prediction in the tehran stock exchange. the results indicate that these models, particularly the lstm-cnn, offer superior performance in financial return metrics and prediction accuracy. this approach provides a robust framework for investors and traders seeking to make informed decisions in financial markets, highlighting the importance of advanced machine learning techniques in enhancing predictive analytics.
|
Keywords
|
forecasting price ,deep learning ,lstm ,cnn ,tehran stock exchange
|
|
|
|
|
|
|
|
|
|
|