Design and Development of an Early Warning System(EWS) Based on Machine Learning Models to Predict Global Crisis Events in Stock Markets

Document Type : Original Article

Authors
1 Assistant Professor, Faculty of Accounting and Financial Sciences, University of Tehran, Tehran, Iran
2 Associate Professor, Faculty of Accounting and Financial Sciences, University of Tehran, Tehran, Iran
3 Ph.D. Candidate, Faculty of Accounting and Financial Sciences, University of Tehran, Tehran, Iran
10.30495/jik.2024.77168.4481
Abstract
In the ever-evolving world of financial markets, the ability to predict stock market crises is of great importance for policymakers and investors. This study aims to present an approach that leverages the power of machine learning-based methods to predict global stock market crisis events. Utilizing a rich dataset that includes daily stock market data from 37 countries, bond data from 30 countries across various maturities, 27 currency pairs, and other influential variables over the period from 1996 to 2021, a prediction mechanism based on various machine learning methods such as decision trees, support vector machines, random forests, neural networks, gradient boosting, deep neural networks, reinforcement learning, and long short-term memory networks was developed. Additionally, to combine their predictions, four approaches were used: simple and weighted averaging, Bayesian technique, and stacking (meta-models).
The evaluation results of the presented models indicate that the performance of the composite models, especially those based on stacking, is superior in predicting global stock market crises compared to individual models. Furthermore, the framework introduced in this study can serve as an early warning system (EWS). Given the complex volatilities and dynamics of financial markets, traditional methods often fail to provide timely warnings, whereas machine learning-based techniques can lead to the identification of subtle patterns and anomalies that precede a crisis event.
Keywords

  1. اکبرموسوی، سیدصالح، سلمانی، بهزاد، حقیقت، جعفر، و اصغرپور، حسین. (1401). پیش بینی بحران های بانکی: سیستم هشدار زودهنگام پویا. مدلسازی اقتصادسنجی، 7(1 (پیاپی 25) )، 9-38.
  2. امینی راد، مهدی، مهرگان، نادر، جعفری سرشت، داود، شاه آبادی، ابوالفضل. (1401). ترجیحات ریسکی و بحران در بورس اوراق بهادار تهران. دانش سرمایه‌گذاری، 11(43)، 149-170.
  3. ترابی‌پور، طوبی، سادت، سیده صفیه. (1401). روشی جهت پیش بینی قیمت سهام بازار بورس تهران مبتنی بر یادگیری عمیق. پدافند الکترونیکی و سایبری، 10(2)، 91-100.
  4. راعی، رضا، هنردوست، اعظم، عباسیان، عزت الله. (1400). محاسبه ارزش در معرض ریسک دنباله با استفاده از مدل EGARCH-Extreme Learning Machine و رویکرد صنعت بیمه. دانش سرمایه‌گذاری، 10(39)، 103-122.
  5. غلامیان، الهام، و داوودی، سیدمحمدرضا. (1397). پیش بینی روند قیمت در بازار سهام با استفاده از الگوریتم جنگل تصادفی. مهندسی مالی و مدیریت اوراق بهادار (مدیریت پرتفوی)، 9(35 )، 301-322.
  6. قلیزاده، علیرضا، فلاح شمس، میرفیض، افشار کاظمی، محمد علی. (1400). طراحی سیستم هشدار سریع وقوع بحران مالی در بورس اوراق بهادار تهران با رویکرد درخت تصمیم. دانش سرمایه‌گذاری، 10(40)، 35-55.
  7. نادمی، یونس، ابونوری، اسمعیل، و علمی، زهرا. (1394). ارائه یک الگوی هشدار پیش از وقوع نوسانات شدید در بازار سهام تهران: رویکرد مارکوف سوئیچینگ گارچ. دانش مالی تحلیل اوراق بهادار (مطالعات مالی)، 8(28)، 27-40.
  8. نصرالهی، محمد، یاوری، کاظم، نجارزاده، رضا، و مهرگان، نادر. (1399). طراحی یک سیستم هشدار زودهنگام بحران های ارزی در ایران: رویکرد تغییر رژیم مارکوف. سیاست گذاری اقتصادی، 12(24 )، 107-138.
  9. نوروزی، مهدیه، محمد پورزرندی، محمدابراهیم، و مینویی، مهرزاد. (1401). طراحی سیستم هشدار دهنده حباب قیمتی و بحران مالی در بازار سهام ایران. دانش مالی تحلیل اوراق بهادار (مطالعات مالی)، 14(54 )، 37-49.
  1. Bai, Z., Liu, H., & Wong, W. K. (2009). Enhancement of the applicability of Markowitz's portfolio optimization by utilizing random matrix theory. Mathematical Finance: An International Journal of Mathematics, Statistics and Financial Economics19(4), 639-667.
  2. Bhattacharyya, S., Jha, S., Tharakunnel, K., & Westland, J. C. (2011). Data mining for credit card fraud: A comparative study. Decision support systems50(3), 602-613.
  3. Bohl, M. T., Kaufmann, P., & Siklos, P. L. (2015). What drove the mid-2000s explosiveness in alternative energy stock prices? Evidence from US, European and global indices. International Review of Financial Analysis40, 194-206.
  4. Bolhuis, M. A., & Rayner, B. (2020). Deus ex machina? A framework for macro forecasting with machine learning. International Monetary Fund.
  5. Bolton, R. J., & Hand, D. J. (2001). Unsupervised profiling methods for fraud detection. Credit scoring and credit control VII, 235-255.
  6. Breiman, L. (2001) Random Forests. Machine Learning, 45, 5-32.
  7. Brock, W., Lakonishok, J., & LeBaron, B. (1992). Simple technical trading rules and the stochastic properties of stock returns. The Journal of finance, 47(5), 1731-1764.
  8. 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 applications112, 353-371.
  9. Chawla, N. V., Bowyer, K. W., Hall, L. O., & Kegelmeyer, W. P. (2002). SMOTE: synthetic minority over-sampling technique. Journal of artificial intelligence research16, 321-357.
  10. Chen, T., & Guestrin, C. (2016, August). Xgboost: A scalable tree boosting system. In Proceedings of the 22nd acm sigkdd international conference on knowledge discovery and data mining (pp. 785-794).
  11. Clements, M. P., & Harvey, D. I. (2009). Forecast combination and encompassing. In Palgrave Handbook of Econometrics: Volume 2: Applied Econometrics (pp. 169-198). London: Palgrave Macmillan UK.
  12. Dawood, M., Horsewood, N., & Strobel, F. (2017). Predicting sovereign debt crises: An early warning system approach. Journal of Financial Stability28, 16-28.
  13. DeMiguel, V., Garlappi, L., & Uppal, R. (2009). Optimal versus naive diversification: How inefficient is the 1/N portfolio strategy? The review of Financial studies22(5), 1915-1953.
  14. Dixon, M., Klabjan, D., & Bang, J. H. (2017). Classification-based financial markets prediction using deep neural networks. Algorithmic Finance6(3-4), 67-77.
  15. Engle, R. F. (1982). Autoregressive conditional heteroscedasticity with estimates of the variance of United Kingdom inflation. Econometrica: Journal of the econometric society, 987-1007.
  16. Fama, E. F., & French, K. R. (1992). The cross‐section of expected stock returns. the Journal of Finance, 47(2), 427-465.
  17. Fischer, T., & Krauss, C. (2018). Deep learning with long short-term memory networks for financial market predictions. European journal of operational research270(2), 654-669.
  18. Hamid, S. A., & Iqbal, Z. (2004). Using neural networks for forecasting volatility of S&P 500 Index futures prices. Journal of Business Research57(10), 1116-1125.
  19. Hansen, K. B. (2021). Financial contagion: problems of proximity and connectivity in financial markets. Journal of Cultural Economy, 14(4), 388-402.
  20. Hansen, K. B. (2021). Financial contagion: problems of proximity and connectivity in financial markets. Journal of Cultural Economy, 14(4), 388-402,
  21. Heaton, J. B., Polson, N. G., & Witte, J. H. (2017). Deep learning for finance: deep portfolios. Applied Stochastic Models in Business and Industry33(1), 3-12.
  22. Hota, S., Jena, S. K., Gupta, B. K., & Mishra, D. (2021). An empirical comparative analysis of NAV forecasting using machine learning techniques. In Intelligent and Cloud Computing: Proceedings of ICICC 2019, Volume 2 (pp. 565-572). Springer Singapore.
  23. Hsu, M. W., Lessmann, S., Sung, M. C., Ma, T., & Johnson, J. E. (2016). Bridging the divide in financial market forecasting: machine learners vs. financial economists. Expert systems with Applications, 61, 215-234.
  24. Huang, W., Nakamori, Y., & Wang, S. Y. (2005). Forecasting stock market movement direction with support vector machine. Computers & operations research32(10), 2513-2522.
  25. Jia, H. (2021). Deep learning algorithm-based financial prediction models. Complexity2021, 1-9.
  26. Jiang, Z., Xu, D., & Liang, J. (2017). A deep reinforcement learning framework for the financial portfolio management problem. arXiv preprint arXiv:1706.10059.
  27. Jung, D., Dorner, V., Glaser, F., & Morana, S. (2018). Robo-advisory: digitalization and automation of financial advisory. Business & Information Systems Engineering60, 81-86.
  28. Kaminsky, G., Lizondo, S., & Reinhart, C. M. (1998). Leading indicators of currency crises. Staff Papers45(1), 1-48.
  29. Kara, Y., Boyacioglu, M. A., & Baykan, Ö. K. (2011). Predicting direction of stock price index movement using artificial neural networks and support vector machines: The sample of the Istanbul Stock Exchange. Expert systems with Applications, 38(5), 5311-5319.
  30. Khandani, A. E., Kim, A. J., & Lo, A. W. (2010). Consumer credit-risk models via machine-learning algorithms. Journal of Banking & Finance34(11), 2767-2787.
  31. Kim, K. J. (2003). Financial time series forecasting using support vector machines. Neurocomputing55(1-2), 307-319.
  32. Kimoto, T., Asakawa, K., Yoda, M., & Takeoka, M. (1990, June). Stock market prediction system with modular neural networks. In 1990 IJCNN international joint conference on neural networks (pp. 1-6). IEEE.
  33. Kimoto, T., Asakawa, K., Yoda, M., & Takeoka, M. (1990, June). Stock market prediction system with modular neural networks. In 1990 IJCNN international joint conference on neural networks (pp. 1-6). IEEE.
  34. Klopotan, I., Zoroja, J., & Meško, M. (2018). Early warning system in business, finance, and economics: Bibliometric and topic analysis. International Journal of Engineering Business Management, 10, 1847979018797013.
  35. Kursa, M. B., & Rudnicki, W. R. (2010). Feature selection with the Boruta package. Journal of statistical software36, 1-13.
  36. Lam, J. W. (2016). Robo-advisors: A portfolio management perspective. Senior thesis, Yale College20.
  37. LeCun, Y., Bengio, Y., & Hinton, G. (2015). Deep learning. nature, 521(7553), 436-444.
  38. Lessmann, S., Baesens, B., Seow, H. V., & Thomas, L. C. (2015). Benchmarking state-of-the-art classification algorithms for credit scoring: An update of research. European Journal of Operational Research247(1), 124-136.
  39. Li, A., Wu, J., & Liu, Z. (2017). Market manipulation detection based on classification methods. Procedia Computer Science122, 788-795.
  40. Lin, C. S., Khan, H. A., Chang, R. Y., & Wang, Y. C. (2008). A new approach to modeling early warning systems for currency crises: Can a machine-learning fuzzy expert system predict the currency crises effectively? Journal of International Money and Finance27(7), 1098-1121.
  41. Long, W., Lu, Z., & Cui, L. (2019). Deep learning-based feature engineering for stock price movement prediction. Knowledge-Based Systems164, 163-173.
  42. Longin, F. M., & Solnik, B. (2001). Extreme Correlation of International Equity Markets. Journal of Finance, 56(2), 649–676.
  43. Martin, R. (2011). The local geographies of the financial crisis: from the housing bubble to economic recession and beyond. Journal of economic geography, 11(4), 587-618.
  44. McNeil, A. J., & Frey, R. (2000). Estimation of Tail-Related Risk Measures for Heteroscedastic Financial Time Series: an Extreme Value Approach. Journal of Empirical Finance, 7(3–4), 271–300.
  45. Minoiu, C., Kang, C., Subrahmanian, V. S., & Berea, A. (2015). Does financial connectedness predict crises? Quantitative Finance, 15(4), 607-624
  46. Nabipour, M., Nayyeri, P., Jabani, H., Shahab, S., & Mosavi, A. (2020). Predicting stock market trends using machine learning and deep learning algorithms via continuous and binary data; a comparative analysis. IEEE Access8, 150199-150212.
  47. Nevmyvaka, Y., Feng, Y., & Kearns, M. (2006, June). Reinforcement learning for optimized trade execution. In Proceedings of the 23rd international conference on Machine learning (pp. 673-680).
  48. Ohlson, J. A. (1980). Financial ratios and the probabilistic prediction of bankruptcy. Journal of accounting research, 109-131.
  49. Palm, F. C., & Zellner, A. (1992). To combine or not to combine? Issues of combining forecasts. Journal of Forecasting11(8), 687-701.
  50. Perols, J. (2011). Financial statement fraud detection: An analysis of statistical and machine learning algorithms. Auditing: A Journal of Practice & Theory30(2), 19-50.
  51. Reinhart, C. M., & Rogoff, K. S. (2009). The aftermath of financial crises. American Economic Review, 99(2), 466-472.
  52. Saracco, F., Di Clemente, R., Gabrielli, A., & Squartini, T. (2016). Detecting early signs of the 2007–2008 crisis in the world trade. Scientific reports, 6(1), 30286.
  53. Sermpinis, G., Theofilatos, K., Karathanasopoulos, A., Georgopoulos, E. F., & Dunis, C. (2013). Forecasting foreign exchange rates with adaptive neural networks using radial-basis functions and particle swarm optimization. European Journal of Operational Research225(3), 528-540.
  54. Stock, J. H., & Watson, M. W. (2004). Combination forecasts of output growth in a seven‐country data set. Journal of forecasting23(6), 405-430.
  55. Tibshirani, R. (1996). Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society Series B: Statistical Methodology58(1), 267-288.
  56. Vapnik, V. (1999). The nature of statistical learning theory. Springer science & business media.
  57. Werbos, P. (1977). Advanced forecasting methods for global crisis warning and models of intelligence. General System Yearbook, 25-38.
  58. Wright, J. H. (2008). Bayesian model averaging and exchange rate forecasts. Journal of Econometrics146(2), 329-341.
  59. Zhang, G., Patuwo, B. E., & Hu, M. Y. (1998). Forecasting with artificial neural networks: The state of the art. International journal of forecasting14(1), 35-62.