تحقیقات مالی

تحقیقات مالی

تحلیل حساسیت مدل‌‌های یادگیری ماشین در پیش‌‌بینی شاخص‌ بورس تهران: تأثیر پارامترهای ورودی بر کارایی

نوع مقاله : مقاله علمی پژوهشی

نویسندگان
1 دانشجوی دکتری، گروه اقتصاد مالی، دانشکدۀ اقتصاد و مدیریت، دانشگاه ارومیه، ارومیه، ایران.
2 نویسندۀ مسئول، دانشیار، گروه اقتصاد، دانشکدۀ اقتصاد و مدیریت، دانشگاه ارومیه، ارومیه، ایران
3 دانشیار، گروه اقتصاد، دانشکدۀ اقتصاد و مدیریت، دانشگاه ارومیه، ارومیه، ایران.
چکیده
هدف: این پژوهش به ارزیابی حساسیت مدل‌های یادگیری ماشین به متغیرهای ورودی و شناسایی مهم‌ترین متغیرهای تأثیرگذار در پیش‌بینی شاخص بورس تهران پرداخته است. همچنین، مقایسۀ کارایی مدل‌ها در پیش‌بینی شاخص بورس با تمرکز بر تأثیر پارامترهای ورودی و ارائۀ راه‌کارهایی برای بهینه‌سازی داده‌های ورودی و کاهش پیچیدگی مدل‌ها، از دیگر اهداف این پژوهش است. متغیرهای ورودی عبارت‌اند از: قیمت‌های باز، بالا، پایین و حجم معاملات.
روش: در پژوهش حاضر به‌دلیل وجود یک متغیر هدف و ناظر که همان متغیر قیمت پایانی (Close) است، درمی‌یابیم که باید از رویکرد یادگیری نظارت شده استفاده شود. از سوی دیگر، به‌دلیل کمی یا پیوسته‌بودن مقیاس متغیر هدف، مسئله به فرم رگرسیون تعریف شده است و در نهایت، پیش‌بینی‌های حاصل از چهار الگوریتم قدرتمند یادگیری ماشین (مدل خطی، رگرسیون بردار پشتیبان، شبکۀ عصبی مصنوعی و جنگل تصادفی) با استفاده از توابع میانگین خطای مطلق (MAE)، میانگین مربعات خطا (MSE) و ضریب تعیین 2R با یکدیگر مقایسه و مدل نهایی برای بهترین مدل پیش‌بینی ارائه شده است. معیار خطای مطلق، به‌نوعی نشان‌دهندۀ متوسط اندازۀ خطاها و معیار میانگین مربعات خطا، گویای اختلاف بین مقادیر پیش‌بینی شده و واقعی است؛ بنابراین هرچه مقدار این دو معیار کمتر باشد، دقت بیشتر پیش‌بینی‌ها را نشان می‌دهد. ضریب تعیین 2R نشان‌دهندۀ درصدی از واریانس داده‎‌هاست که توسط مدل توضیح داده می‌شود. مقدار نزدیک به 1، دقت بسیار زیاد را نشان می‌دهد. داده‌های استفاده‌شده، شامل شش شاخص روزانۀ منتخب از صنایع دارویی، خودرویی، مالی، صنایع غذایی، فلزات اساسی و فراورده‌های نفتی، طی سال‌های ۱۳۹۹ تا ۱۴۰۳ است. برای تحلیل حساسیت، اهمیت متغیرهای ورودی مانند قیمت‌های باز، بالا، پایین و حجم معاملات بر پیش‌بینی خروجی هر مدل بررسی شد.
یافته‌ها: نتایج تحلیل حساسیت نشان داد که مدل‌های خطی، جنگل تصادفی و شبکۀ عصبی مصنوعی، در هیچ‌یک از شش شاخص نسبت به متغیر ورودی حجم معاملات واکنشی نشان ندادند. رگرسیون بردار پشتیبان (SVR) به پارامترهای ورودی در شاخص مالی حساسیت منفی نشان داد. این موضوع می‌تواند نشان‌دهندۀ فشار فروش، ضعف روند صعودی یا جوّ روانی منفی در بازار مالی، به‌سمت دارایی‌های امن‌تر مثل اوراق قرضه و سپرده‌های بانکی باشد. در مقابل، مدل‌های دیگر شامل جنگل تصادفی، شبکۀ عصبی مصنوعی (ANN) و رگرسیون خطی، حساسیت نسبتاً مشابهی به متغیرهای ورودی نشان دادند. این مدل‌ها به پارامترهای ورودی وابستگی مستقیم‌تری دارند و اهمیت نسبی متغیرها در پیش‌بینی خروجی را بهتر نمایان می‌کنند.
نتیجه‌گیری: این پژوهش به شناسایی مهم‌ترین متغیرهای تأثیرگذار بر تغییرات شاخص بورس کمک می‌کند و نشان می‌دهد که مدل‌های پیچیده‌تر، مانند جنگل تصادفی، شبکۀ عصبی و رگرسیون بردار پشتیبان، در شاخص دارویی و فراورده‌های نفتی و غذایی به‌دلیل حساسیت بیشتر، می‌توانند در پیش‌بینی دقیق‌تر شاخص‌های بورس مؤثرتر عمل کنند. این نتایج می‌تواند به بهبود طراحی مدل‌های پیش‌بینی و تصمیم‌گیری در بازار سرمایه کمک کند. تحلیل حساسیت به شناسایی متغیرهای مهم و حذف ویژگی‌های غیرضروری کمک می‌کند که به افزایش سرعت و کاهش پیچیدگی مدل‌ها منجر می‌شود. نتایج این پژوهش می‌تواند برای سرمایه‌گذاران و سیاست‌گذاران اقتصادی، به‌منظور تصمیم‌گیری‌های آگاهانه‌تر مفید باشد.
کلیدواژه‌ها
موضوعات

عنوان مقاله English

Sensitivity Analysis of Machine Learning Models in Predicting the Tehran Stock Exchange Index: The Impact of Input Parameters on Performance

نویسندگان English

Fatemeh Ansari 1
Shahab Jahangiri 2
,Ali Rezazadeh 3
1 Ph.D. Candidate, Department of Financial Economics, Faculty of Economics and Management, Urmia University, Urmia, Iran.
2 Associate Prof., Department of Economics, Faculty of Economics and Management, Urmia University, Urmia, Iran.
3 Associate Prof., Department of Economics, Faculty of Economics and Management, Urmia University, Urmia, Iran
چکیده English

Objective
This study aims to evaluate the sensitivity of machine learning models to input variables and identify the most significant factors influencing the prediction of the Tehran Stock Exchange index. Additionally, it compares the performance of different models in forecasting the stock index, focusing on the impact of input parameters, and offers strategies for optimizing input data and reducing model complexity. The key input variables considered include open, high, low prices, and trading volume.

Methods
In this research, due to the presence of a target variable (closing price), a supervised learning approach is employed. Furthermore, because the target variable is continuous, the problem is defined as a regression task. Predictions from four powerful machine learning algorithms—Linear Model (LM), Support Vector Regression (SVR), Artificial Neural Network (ANN), and Random Forest (RF)—were compared using performance evaluation metrics such as Mean Absolute Error (MAE), Mean Squared Error (MSE), and the coefficient of determination (R²). MAE represents the average magnitude of errors, while MSE indicates the differences between the predicted and actual values. Lower values for both metrics suggest greater accuracy of predictions. The R² statistic represents the percentage of variance in the data that is explained by the model, with values close to one indicating a higher level of accuracy. The dataset used in this study consists of six selected indices from various sectors, including pharmaceutical, automotive, financial, food industries, basic metals, and petroleum products, covering the period from 2020 to 2024 daily. Sensitivity analysis was conducted to evaluate the importance of input variables such as open, high, low prices, and trading volume on the predictions of each model.

Results
The sensitivity analysis results revealed that the linear regression, random forest, and artificial neural network models exhibited no response to the trading volume input variable across any of the six indices. However, support vector regression (SVR) demonstrated negative sensitivity to the input parameters in the financial index. This may suggest selling pressure, a weakening bullish trend, or a negative market sentiment favoring safer assets such as bonds and bank deposits. In contrast, other models, including random forest, artificial neural networks (ANN), and linear regression, displayed relatively similar sensitivity to the input variables. These models rely more directly on input parameters and provide a clearer representation of the relative importance of variables in predicting outcomes.

Conclusion
This study identified the key variables influencing stock index fluctuations and demonstrated that more complex models, such as random forest, neural networks, and support vector regression, are more effective in accurately predicting stock indices in the pharmaceutical, petroleum, and food sectors due to their higher sensitivity. These findings can contribute to the enhancement of forecasting and decision-making models in the capital market. Sensitivity analysis aids in identifying critical variables while eliminating redundant features, thereby improving computational efficiency and reducing model complexity. The insights from this research can be valuable for investors and economic policymakers in making more informed decisions.

کلیدواژه‌ها English

Random forest
Sensitivity analysis
Support vector regression
افشاری راد، الهام؛ علوی، سیدعنایت‌‌اله و سینایی، حسنعلی (1397). مدلی هوشمند برای پیش‌‌بینی روند سهام با استفاده از روش‌های تحلیل تکنیکال. تحقیقات مالی، 20(2)، 249-264.
ایزدی، مریم؛ آشتاب، علی و زواری رضایی، اکبر (1404). بررسی و تطبیق قدرت تخمین مدل‌های یادگیری ماشین و مدل‌های آماری در پیش‌بینی جهت تغییرات اجزای سود و انتخاب مدل بهینه. تحقیقات مالی، 27(1)، 31-57.
سعادت، محمد و زمانی بروجنی، فرساد (1395). مروری بر روش‌های بهبود کارایی تکنیک جنگل تصادفی. اولین همایش ملی فناوری اطلاعات، ارتباطات و محاسبات نرم، اصفهان دانشگاه آزاد اسلامی واحد اصفهان (خوراسگان).
سهرابی، مریم؛ میربرگ کار، سید مظفر؛ چیرانی، ابراهیم و خردیار، سینا (1402). مقایسه مدل‌های مختلف یادگیری ماشین در پیش‌بینی شاخص بازار سهام. مهندسی مالی و مدیریت اوراق بهادار، 56 (14)، 19-36.
فرمان آرا، وحید؛ کمیجانی، اکبر؛ فرزین‌وش، اسداله و غفاری، فرهاد (1398). نقش بازار سرمایه در تأمین مالی و رشد اقتصادی (مطالعه موردی ایران و منتخبی از کشورهای در حال توسعه). اقتصاد مالی، 13(47)، 19-38.
فلاح‌پور، سعید؛ گل ارضی، غلامحسین و فتوره‌چیان، ناصر (1392). پیش‌بینی روند حرکتی قیمت سهام با استفاده از ماشین بردار پشتیبان برپایۀ الگوریتم ژنتیک در بورس اوراق بهادار تهران. تحقیقات مالی، 15(2)، 269-288.
قلی‌زاده کپورچالی، لیلا؛ فلاح، میرفیض و مینویی، مهرزاد (1403). طراحی مدل تبیین‌کنندۀ اثر عوامل مؤثر بر پیش‌بینی سود شرکت‌های پذیرفته شده در بورس اوراق بهادار تهران با استفاده از مدل یادگیری ماشین، شبکۀ عصبی و رگرسیون خطی. دانش حسابداری و حسابرسی مدیریت، 13(50)، 245- 257.
مرادزاده‌فرد، مهدی؛ دارابی، رویا و شاهعلی‌زاده، رامین (1393). یکپارچه‌سازی تکنیک‌های هوش مصنوعی جهت ارائه مدل پیش‌بینی قیمت سهام. پژوهش‌های حسابداری مالی و حسابرسی (پژوهشنامه حسابداری مالی و حسابرسی)، 6 (24)، 89- 101.
مرادی، بابک؛ بحری ثالث، جمال؛ جبارزاده‌کنگرلویی، سعید و آشتاب، علی (1401). تبیین و ارائه مدلی برای پیش‌بینی نقدشوندگی سهام در بورس اوراق بهادار تهران. تحقیقات مالی، 24(1)، 134-156.
مکیان، سید نظام‌الدین و موسوی، فاطمه سادات (1390). پیش‌بینی قیمت سهام شرکت فراورده‌های نفتی پارس با استفاده از شبکه‌های عصبی و روش رگرسیون. مطالعه موردی: قیمت سهام شرکت فراورده‌های نفتی پارس. فصلنامه علمی ـ پژوهشی مدل‌سازی اقتصادی، 6 (18)، 105- 121.
 
References
Afsharirad, E., Alavi, S. E. & Sinaei, H. (2018). Developing an Intelligent Model to Predict Stock Trend Using the Technical Analysis. Financial Research Journal, 20(2), 249–264. https://doi.org/10.22059/frj.2018.233763.1006452 (in Persian)
Ajiga, D. I., Adeleye, R. A., Tubokirifuruar, T. S., Bello, B. G., Ndubuisi, N. L., Asuzu, O. F. & Owolabi, O. R. (2024). Machine learning for stock market forecasting: a review of models and accuracy. Finance & Accounting Research Journal, 6(2), 112-124.
Awad, M. & Khanna, R. (2015). Efficient learning machines: theories, concepts, and applications for engineers and system designers (p. 268). Springer nature.
Ayala, J., García-Torres, M., Noguera, J. L. V., Gómez-Vela, F. & Divina, F. (2021). Technical analysis strategy optimization using a machine learning approach in stock market indices. Knowledge-Based Systems, 225, 107-119.
Chaajer, P., Shah, M. & Kshirsagar, A. (2021). The applications of artificial neural networks, support vector machines, and long-short term memory for stock market prediction. Decision Analytics Journal, 100015.
Fallahpour, S., Golarzi, G. & Fatourechian, N. (2013). Predicting Stock Price Movement Using Support Vector Machine Based on Genetic Algorithm in Tehran Stock Exchange Market. Financial Research Journal, 15(2), 269–288. https://doi.org/10.22059/jfr.2013.51081
(in Persian)
Farman Ara, V., Komijani, A., Farzinvash, A. & Ghaffari, F. (2019). The role of capital markets in financing economic growth A Case Study of Iran and some selected developing countries. Journal of Financial Economics (Financial Economics and Development), 13(47), 19-37. SID. https://sid.ir/paper/229015/en (in Persian)
Fischer, T. & Krauss, C. (2018). Deep learning with long short-term memory networks for financial market prediction. European Journal of Operational Research, 270(2), 654–669.
Gholizadeh Kapourchali, L., Fallah, M. F. & Minooei, M. (2024). Presenting an explanatory model of factors which explains the effect of the company's factors on the prediction of accepted profits in the Tehran Stock Exchange using machine learning, neural network and linear regression. Journal of Management Accounting and Auditing Knowledge, 13(50), 245-257. (in Persian)
Hoque, K. E. & Aljamaan, H. (2021). Impact of hyperparameter tuning on machine learning models in stock price forecasting. IEEE Access, 9, 163815-163830.‏
Hutter, F., Kotthoff, L. & Vanschoren, J. (2019). Automated machine learning: methods, systems, challenges (p. 219). Springer Nature.‏
Izadi, M., Ashtab, A. & Zavari Rezaei, A. (2025). Comparing the Estimation Power of Machine Learning Models and Statistical Models in Predicting Profit Component Changes and Selecting the Optimal Model. Financial Research Journal, 27(1), 31–57. https://doi.org/10.22059/frj.2024.373472.1007580 (in Persian)
Khan, W., Ghazanfar, M. A., Azam, M. A., Karami, A., Alyoubi, K. H. & Alfakeeh, A. S. (2022). Stock market prediction using machine learning classifiers and social media, news. Journal of Ambient Intelligence and Humanized Computing, 1-24.
Khanna, M., Kulshrestha, M., Singh, L. K., Thawkar, S. & Shrivastava, K. (2022). Performance evaluation of machine learning algorithms for stock price and stock index movement prediction using trend deterministic data prediction. International Journal of Applied Metaheuristic Computing (IJAMC), 13(1), 1-30.‏
Kubat, M. (2017). An introduction to machine learning. Springer, Cham.‏
Lee, M. C. (2009). Using support vector machine with a hybrid feature selection method to the stock trend prediction. Expert systems with applications, 36(8), 10896-10904.‏
Makian, S.N. & Mousavi, F.S. (2011). Stock Price Forecasting Through Using Ann and Arima Techniques: A Case Study of Pars Petroleum Company. Economic Modeling Scientific-Research Quarterly, 6 (18), 105-121. SID. https://sid.ir/paper/176324/en (in Persian)
Malkiel, B. G. & Fama, E. F. (1970). Efficient capital markets: A review of theory and empirical work. The Journal of Finance, 25(2), 383–417.
Moradi, B., Bahri Sales, J., Jabbarzadeh Kangarlooi, S. & Ashtab, A. (2022). Explaining and Proposing a Market Liquidity Prediction Model in Tehran Stock Exchange. Financial Research Journal, 24(1), 134–156. https://doi.org/10.22059/frj.2021.323611.1007184
(in Persian)
Moradzadehfard, M., Darabi, R. & Shahalizadeh, R. (2015). Combination of Artificial Intelligence Methods for Presenting Stock Price Forecasting Models. The Financial Accounting and Auditing Research, 6(24), 89-101. SID. https://sid.ir/paper/198056/en
(in Persian)
Patel, J., Shah, S., Thakkar, P. & Kotecha, K. (2015). Predicting stock market index using fusion of machine learning techniques. Expert systems with applications, 42(4), 2162-2172.
Saadat, M. & Zamani Boroujeni, F. (2016). A review of methods for improving the efficiency of the random forest technique. Proceedings of the First National Conference on Information Technology, Communications, and Soft Computing, Isfahan, Iran: Islamic Azad University, Isfahan (Khorasgan) Branch. (in Persian).
‏Sangeetha, J. M. & Alfia, K. J. (2024). Financial stock market forecast using evaluated linear regression based machine learning technique. Measurement: Sensors, 31, 100-950.‏
Schratz, P., Muenchow, J., Iturritxa, E., Richter, J. & Brenning, A. (2019). Hyperparameter tuning and performance assessment of statistical and machine-learning algorithms using spatial data. Ecological Modelling, 406, 109-120.‏
Smola, A. J. & Schölkopf, B. (2004). A tutorial on support vector regression. Statistics and computing, 14, 199-222.‏
Sohrabi, M., Mirbargkar, S.M., Chirani, E. & Kheradiar, S. (2023). Comparison of different machine learning models in stock market index prediction. Financial engineering and securities management. 56 (14), 19-36. (in Persian)
Tsinaslanidis, P. E. & Kugiumtzis, D. (2014). A prediction scheme using perceptually important points and dynamic time warping. Expert Systems with Applications, 41, 6848–6860.
Vapnik, V. N. (1999). An overview of statistical learning theory. IEEE transactions on neural networks, 10(5), 988-999.