پیش‌‌بینی‌‌پذیری شاخص کل بورس اوراق بهادار تهران با رویکرد یادگیری ماشین ترکیبی: تحلیل کارایی بازار و اهمیت متغیرهای مؤثر

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

نویسندگان

1 دانشجوی کارشناسی ارشد، گروه الگوریتم‌ها و محاسبات، دانشکدۀ علوم‌ مهندسی، دانشکدگان فنی، دانشگاه تهران، تهران، ایران.

2 کارشناس ارشد، گروه مالی، دانشکده مالی و حسابداری، دانشکدگان مدیریت، دانشگاه تهران، ایران.

3 استادیار، گروه مدیریت صنعتی، دانشکده علوم انسانی، دانشگاه میبد، میبد، ایران.

4 استادیار، گروه الگوریتم‌ها و محاسبات، دانشکده علوم مهندسی، دانشگاه تهران، ایران.

چکیده

هدف: این پژوهش با هدف سنجش کارایی بازار سرمایۀ ایران و بررسی توانایی مدل‌های یادگیری ماشین ترکیبی، برای پیش‌بینی جهت شاخص کل بورس اوراق بهادار تهران اجرا شده است. همچنین، ارزیابی میزان اهمیت عوامل مؤثر بر پیش‌بینی‌پذیری شاخص و توضیح‌پذیری در مدل‌های یادگیری ماشینی، از دیگر اهداف این مطالعه است.
روش: به‌منظور تحلیل کارایی بازار در دو سطح ضعیف و نیمه‌قوی، از داده‌های مربوط به شاخص کل بورس تهران، در بازۀ زمانی پنج‌ساله، از ۱۳۹۸ تا ۱۴۰۳ استفاده شده است. مدل ترکیبی پیشنهادی، شامل مدل گرادیان تقویت شده (XGBoost) است که با بهینه‌سازی هایپرپارامترها، از طریق الگوریتم ژنتیک (GA) بهبود یافته است. عملکرد این مدل ترکیبی با سایر الگوریتم‌های یادگیری ماشین، شامل گرادیان تقویت شده، جنگل تصادفی، ماشین بردار پشتیبان و رگرسیون لجستیک از لحاظ آماری مقایسه شده است. همچنین، برای افزایش توضیح‌پذیری مدل و تحلیل میزان اهمیت متغیرهای ورودی برای پیش‌بینی جهت شاخص، از روش شاپ استفاده شده است.
یافته‌ها: نتایج نشان داد که مدل XGBoost-GA نسبت به سایر مدل‌های مقایسه‌ای، از لحاظ آماری، برای پیش‌بینی جهت شاخص کل بورس تهران با دقت ۸۴درصد، عملکرد بهتری دارد. مقایسه نتایج در سطوح مختلف کارایی بازار نشان داد که در سطح نیمه‌قوی، افزودن متغیرهای بنیادی به مدل پیش‌بینی، موجب بهبود دقت شد که بیانگر تأثیر اطلاعات بنیادی بر پیش‌بینی جهت حرکت شاخص و در نتیجه، ناکارایی بازار در این سطح است. همچنین، در سطح ضعیف، مدل یادگیری ماشین مبتنی بر داده‌های تکنیکال، عملکرد بهتری نسبت به مدل تصادفی داشت که این امر نیز نشانه‌ای از ناکارایی بازار در این سطح محسوب می‌شود. علاوه‌براین، تحلیل توضیح‌پذیری مدل با استفاده از شاپ نشان داد که تأثیر متغیرها در پیش‌بینی جهت شاخص، بسته به نوع داده‌های ورودی، متفاوت است. در مدل فقط تکنیکال، عوامل مرتبط با رفتار قیمتی و نوسان‌های کوتاه‌مدت مانند شاخص قدرت نسبی (RSI)، حجم معاملات و واگرایی و همگرایی میانگین متحرک نقش کلیدی داشتند. در مقابل، در مدل ترکیبی که شامل داده‌های بنیادی و تکنیکال بود، علاوه‌بر متغیرهای تکنیکال، عواملی مانند ورود نقدینگی حقیقی و حقوقی، قیمت طلا و شاخص‌های مالی شرکت‌ها نظیر بازده دارایی‌ها و بازده حقوق صاحبان سهام تأثیر چشمگیری داشتند.
نتیجه‌گیری: نتایج پژوهش نشان می‌دهد که بازار سرمایه ایران در هر دو سطح ضعیف و نیمه‌قوی ناکاراست و قابلیت پیش‌بینی‌پذیری شاخص کل با استفاده از داده‌های تکنیکال و بنیادی امکان‌پذیر است. تحلیل اهمیت متغیرهای ورودی نشان می‌دهد که برخی شاخص‌های تکنیکال، بنیادی و کلان اقتصادی نقش مهم‌تری در پیش‌بینی رفتار بازار دارند که این موضوع می‌تواند به تصمیم‌گیری‌های سرمایه‌گذاری آگاهانه‌تر و درک بهتر رفتار مدل‌های یادگیری ماشین در پیش‌بینی سری‌های زمانی مالی کمک کند.

کلیدواژه‌ها

موضوعات


عنوان مقاله [English]

Predictability of the Tehran Exchange Divedend and Price Index Using a Combined Machine Learning Approach: Market Efficiency Analysis and Importance of Influential Variables

نویسندگان [English]

  • AmirHossein Heidari Dalooei 1
  • Masoud Vahdati 2
  • Hossein Mohebbi 3
  • Negin Bagherpour 4
1 MSc Student, Department of Algorithms and Computation, Faculty of Engineering Sciences, College of Engineering, University of Tehran, Tehran, Iran.
2 MSc., Department of Finance, Faculty of Accounting and Finance, College of Management, University of Tehran, Tehran, Iran.
3 Assistant Prof., Department of Industrial Management, Faculty of Humanities, Meybod University, Meybod, Iran.
4 Assistant Prof., Department of Algorithms and Computation, Faculty of Engineering Sciences, College of Engineering, University of Tehran, Tehran, Iran.
چکیده [English]

Objective
This study aims to evaluate the efficiency of the Iranian capital market and examine the capability of hybrid machine learning models in predicting the direction of the Tehran Exchange Dividend and Price Index (TEDPIX). Additionally, the study seeks to assess the importance of influential factors affecting predictability and explainability within machine learning models.
 
Methods
To analyze market efficiency at weak and semi-strong levels, data concerning the Tehran Exchange Divedend and Price Index from five years (2019 to 2023) is utilized. The proposed combined model includes an Extreme Gradient Boosting (XGBoost) model that is enhanced through hyperparameter optimization via a Genetic Algorithm (GA). The performance of this combined model is statistically compared against other machine learning algorithms, including XGBoost, Random Forest, Support Vector Machine, and Logistic Regression. Furthermore, to enhance the model's explainability and analyze the importance of input variables in predicting the index direction, the SHAP (Shapley Additive Explanations) method is employed.
 
Results
The results indicate that the XGBoost-GA model outperforms other comparative models statistically, achieving an accuracy of 84% in predicting the direction of the Tehran Exchange Divedend and Price Index. A comparison of the results across different levels of market efficiency indicates that, at the semi-strong level, incorporating fundamental variables into the predictive model enhances forecasting accuracy. This finding reflects the influence of fundamental information on predicting the direction of the index and, consequently, suggests the presence of market inefficiency at this level. Additionally, at the weak-form level, the machine learning model based on technical data outperformed the random model, indicating the existence of market inefficiency at this level as well. Moreover, the model's explainability analysis, using SHAP, showed that the impact of variables on predicting the index direction varies based on the type of input data. In the purely technical model, factors related to price behavior and short-term fluctuations, such as the Relative Strength Index (RSI), trading volume, and moving average divergence and convergence, played a key role. In contrast, in the combined model that includes both fundamental and technical data, besides technical variables, factors such as real and legal liquidity influx, gold prices, and company financial indicators such as Return on Assets (RoA) and Return on Equity (RoE) significantly influenced predictions.
 
Conclusion
The results of the study demonstrate that the Iranian capital market is inefficient at both weak and semi-strong levels, and the predictability of the Index is achievable using both technical and fundamental data. The analysis of input variable significance indicates that certain technical, fundamental, and macroeconomic indices play a more crucial role in predicting market behavior, which can contribute to more informed investment decisions and a better understanding of machine learning models' behavior in forecasting financial time series.

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

  • Extreme gradient boosting
  • Genetic algorithm
  • Machine learning explainability
  • Market efficiency theory
  • Tehran exchange divedend and price index
حیدری، مهدی و امیری، حمیدرضا (1401). بررسی قدرت مدل‌های مبتنی بر هوش مصنوعی در پیش‌بینی روند قیمت سهام بورس اوراق بهادار تهران. تحقیقات مالی، 24(4)، 602-623.
ذوقی، سهیل؛ راعی، رضا و فلاح‏پور، سعید (1401). ارائه مدل پیش‌بینی‌گر جهت بازار در معاملات آتی سکه طلای بورس کالای ایران با استفاده از الگوریتم حافظه طولانی کوتاه مدت (LSTM). مهندسی مالی و مدیریت اوراق بهادار، 53(13)، 34-53.
راعی، رضا؛ وحدتی، مسعود؛ محبی، حسین و حیدری دلوئی، امیرحسین (1403). تفسیرِ پیش‌بینی بازده شاخص قیمت صنایع تولیدی بورس اوراق بهادار تهران با استفاده از یادگیری تجمیعی توضیح‌پذیر. چشم‌انداز مدیریت مالی، 14(48)، 55- 78.
سهرابی، مریم؛ میربرگ‌‏کار، سیدمظفر؛ چیرانی، ابراهیم و خردیار، سینا (1402). مقایسه مدل‌‌های مختلف یادگیری ماشین در پیش‌بینی شاخص بازار سهام. مهندسی مالی و مدیریت اوراق بهادار، 56(14)، 19-36.
عباسی، ابراهیم؛ محمدی مقدم، فاطمه و قالیباف اصل، حسن (1403). ارتباط بین اهرم مالی با عملکرد مالی با تأکید بر درماندگی مالی و بحران ارزی در بورس اوراق بهادار تهران. تحقیقات مالی، 26(4)، 880-903.
 
References
Abbasi, E., Mohammadimoghadam, F. & Ghalibafasl, H. (2024). The Relationship between Financial Leverage and Financial Performance: Emphasizing Financial Distress and Currency Crisis in the Tehran Stock Exchange. Financial Research Journal, 26(4), 880-903. (in Persian)
Athey, S. & Imbens, G. W. (2019). Machine learning methods economists should know about. Annual Review of Economics, 11, 685–725.
Athey, S. & Imbens, G. W. (2021). The econometrics of randomized experiments. Annual Review of Economics, 13, 451–483.
Bergmeir, C., Hyndman, R. J. & Benítez, J. M. (2023). Cross-validation for time series: A systematic review. Expert Systems with Applications, 220, 119567.
Berrar, D. (2019). Cross-validation.
Bussmann, N., Giudici, P., Marinelli, D. & Papenbrock, J. (2021). Explainable machine learning in credit risk management. Computational Economics, 57, 203- 216.‏
Cao, Y., Gedikli, F. & Vrancx, P. (2024). Advances and challenges in financial time series forecasting with machine learning. Artificial Intelligence in Finance, 100088.
Chen, T. & Guestrin, C. (2016). XGBoost: A scalable tree boosting system. In proceedings of the 22nd ACM SIGKDD international conference on knowledge discovery and data mining. 785-794.
Chollet, F. (2021). Deep learning with Python (2nd ed.). Manning Publications.
Deng, S., Huang, X., Zhu, Y., Su, Z., Fu, Z. & Shimada, T. (2023). Stock index direction forecasting using an explainable eXtreme Gradient Boosting and investor sentiments. The North American Journal of Economics and Finance, 64, 101848.
Dimitriadou, A., Gogas, P., Papadimitriou, T. & Plakandaras, V. (2018). Oil market efficiency under a machine learning perspective. Forecasting, 1(1), 157-168.
Etsalakis, A. & Valavanis, G. (2009). Predicting financial indices using neural networks: Nonlinear machine learning models outperform traditional approaches. Journal of Financial Forecasting and Machine Learning, 5(2), 112–130.
Fama, E. F. & French, K. R. (2020). Comparing cross-section and time-series factor models. The Review of Financial Studies, 33(5), 1891–1926.
Gu, S., Kelly, B. & Xiu, D. (2020). Empirical asset pricing via machine learning. The Review of Financial Studies, 33(5), 2223-2273.
Hassan, M. K., Rahman, M. M. & Kim, S. (2023). Evaluating classification performance in stock trend prediction: A comparative analysis of confusion matrix metrics. Expert Systems with Applications, 215, 119231.
Heidari, M. & Amiri, H. (2022). Inspecting the Predictive Power of Artificial Intelligence Models in Predicting the Stock Price Trend in Tehran Stock Exchange. Financial Research Journal, 24(4), 602-623. (in Persian)
Li, S. & Zhang, X. (2019). Research on orthopedic auxiliary classification and prediction model based on XGBoost algorithm. Neural Computing and Applications, 32, 1971–1979.
Lo, A. W. & MacKinlay, A. C. (1988). Stock market prices do not follow random walks: Evidence from a simple specification test. The Review of Financial Studies, 1(1), 41–66.
Lundberg, S. M., Erion, G., Chen, H., DeGrave, A., Prutkin, J. M., Nair, B., ... & Lee, S.-I. (2020). From local explanations to global understanding with explainable AI for trees. Nature Machine Intelligence, 2(1), 56-67.
Mohebbi, H. & Zare Mehrjardi, A. (2019). Investigating the Effect of Proactive market Orientation on Creating Market Changes and its Consequences in the tile and ceramic industry. Commercial Surveys, 17(98), 98-113.
Molnar, C. (2025). Interpretable machine learning: A guide for making black box models explainable (3rd ed.).
Raei, R., Vahdati, M., Mohebbi, H. & Heydari Delooei, A. (2025). Interpreting Forecast the Return of the Price Index of Manufacturing Industries in the Tehran Stock Exchange Using Explainable Ensemble Learning. Financial Management Perspective, 14(48), 55-78. (in Persian)
Rudin, C. (2019). Stop explaining black box machine learning models for high stakes decisions and use interpretable models instead. Nature Machine Intelligence, 1(5), 206-215.
Shobayo, O., Adeyemi-Longe, S., Popoola, O. & Okoyeigbo, O. (2025). A Comparative Analysis of Machine Learning and Deep Learning Techniques for Accurate Market Price Forecasting. Analytics, 4(1), 5.
Sivanandam, S. N. & Deepa, S. N. (2008). Introduction to genetic algorithms. Springer.
Smith, J., Johnson, R. & Lee, H. (2023). Enhancing model robustness in financial market predictions through cross-validation techniques. Journal of Financial Data Science, 15(2), 45–60.
Sohrabi, M., Mirberg Kar, S. M., Chirani, E. & Kherdiar, S. (2023). Comparison of different machine learning models in predicting stock market indices. Financial Engineering and Securities Management Journal, 14(56), 19–36. (in Persian)
Štrumbelj, E., & Kononenko, I. (2014). Explaining prediction models and individual predictions with feature contributions. Knowledge and information systems41(3), 647-665.
Thaler, R. H. (2016). Behavioral economics: Past, present, and future. American Economic Review, 106(7), 1577–1600.
Yang, C., Abedin, M. Z., Zhang, H., Weng, F. & Hajek, P. (2025). An interpretable system for predicting the impact of COVID-19 government interventions on stock market sectors. Annals of Operations Research, 347(2), 1031-1058.
Yuan, X., Yuan, J., Jiang, T. & Ain, Q. U. (2020). Integrated long-term stock selection models based on feature selection and machine learning algorithms for China stock market. IEEE Access, 8, 22672- 22685.‏
Zhang, Y., Li, X. & Wang, J. (2024). Deep learning and market efficiency: Evidence from high-frequency trading. Journal of Financial Economics, 151(3), 102–125.
Zhong, X. & Enke, D. (2019). Predicting the daily return direction of the stock market using hybrid machine learning algorithms. Financial Innovation, 5(1), 4.
Zoghi, S., Raei, R. & Falahpor, S. (2022). Presenting a market direction prediction model for gold coin trades in Iran’s Commodity Exchange market using Long Short-Term Memory (LSTM) algorithm. Financial Engineering and Portfolio Management, 13(53), 34-53. (in Persian)