Financial Research Journal

Financial Research Journal

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

Document Type : Research Paper

Authors
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
Abstract
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.
Keywords
Subjects

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.