The Application of Machine Learning Techniques to Predict Stock Market Crises in Africa
Abstract
:1. Introduction
2. Literature Review
Theoretical Review
3. Methodology
3.1. Machine Learning Algorithms
3.1.1. Logistic Regression Classifier
3.1.2. K-Nearest Neighbors (KNN)
3.1.3. Decision Tree
3.1.4. Support Vector Machine (SVM)
3.1.5. Random Forest
3.1.6. Gradient Boost
3.1.7. Extreme Gradient Boosting (XGBoost)
3.2. Stock Market Crisis Variable
3.3. Model Evaluation
3.3.1. Confusion Matrix
3.3.2. F1 Score
3.3.3. Receiver Operating Characteristic (ROC)
3.4. Data
3.4.1. Data Splitting
3.4.2. Data Balancing
4. Findings and Discussions
4.1. Confusion Matrix and Recall
4.2. Test Accuracy and F1-Score
4.3. Model Performance Across Countries
4.4. Receiver Operating Characteristic (ROC)
4.5. Feature Importance
5. Conclusions
5.1. Implications of the Study
5.2. Limitations of the Study
5.3. Recommendations
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Abbas, Ghulam, and Shouyang Wang. 2020. Does macroeconomic uncertainty really matter in predicting stock market behavior? A comparative study on China and USA. China Finance Review International 10: 393–427. [Google Scholar] [CrossRef]
- Acosta-González, Eduardo, Fernando Fernández-Rodríguez, and Hicham Ganga. 2019. Predicting corporate financial failure using macroeconomic variables and accounting data. Computational Economics 53: 227–57. [Google Scholar] [CrossRef]
- Aggarwal, Divya, and Pitabas Mohanty. 2018. Do Indian stock market sentiments impact contemporaneous returns? South Asian Journal of Business Studies 7: 332–46. [Google Scholar] [CrossRef]
- Baker, Malcolm, and Jeffrey Wurgler. 2007. Investor sentiment and the cross-section of stock returns. The Journal of Finance 62: 2085–123. [Google Scholar]
- Baranidharan, Subburayan, and Aruldoss Alex. 2020. Volatility spillover of exchange rate on stock market evidence from South Africa. Asian Journal of Economics, Finance and Management 2: 131–39. [Google Scholar]
- Bathia, Deven, and Don Bredin. 2013. An examination of investor sentiment effect on G7 stock market returns. The European Journal of Finance 19: 909–37. [Google Scholar] [CrossRef]
- Brambila-Macias, José, and Isabella Massa. 2010. The global financial crisis and Sub-Saharan Africa: The effects of slowing private capital inflows on growth. African Development Review 22: 366–77. [Google Scholar] [CrossRef]
- Celebi, Kaan, and Michaela Hönig. 2019. The impact of macroeconomic factors on the German stock market: Evidence for the crisis, pre-and post-crisis periods. International Journal of Financial Studies 7: 18. [Google Scholar] [CrossRef]
- Chandra, Abhijeet, and M. Thenmozhi. 2013. Investor sentiment, volatility and stock return comovements. Volatility and Stock Return Comovements, October 17. [Google Scholar]
- Chatzis, Sotirios P., Vassilis Siakoulis, Anastasios Petropoulos, Evangelos Stavroulakis, and Nikos Vlachogiannakis. 2018. Forecasting stock market crisis events using deep and statistical machine learning techniques. Expert Systems with Applications 112: 353–71. [Google Scholar] [CrossRef]
- Chi, Lixu, Xintian Zhuang, and Dalei Song. 2012. Investor sentiment in the Chinese stock market: An empirical analysis. Applied Economics Letters 19: 345–48. [Google Scholar] [CrossRef]
- Choi, Sun-Yong. 2021. Analysis of stock market efficiency during crisis periods in the US stock market: Differences between the global financial crisis and COVID-19 pandemic. Physica A: Statistical Mechanics and Its Applications 574: 125988. [Google Scholar] [CrossRef]
- Coudert, Virginie, and Mathieu Gex. 2008. Does risk aversion drive financial crises? Testing the predictive power of empirical indicators. Journal of Empirical Finance 15: 167–84. [Google Scholar] [CrossRef]
- Das, Debojyoti, and Surya Bhushan Kumar. 2018. International economic policy uncertainty and stock prices revisited: Multiple and Partial wavelet approach. Economics Letters 164: 100–8. [Google Scholar] [CrossRef]
- Dawood, Mary, Nicholas Horsewood, and Frank Strobel. 2017. Predicting sovereign debt crises: An early warning system approach. Journal of Financial Stability 28: 16–28. [Google Scholar] [CrossRef]
- Duan, Peng, and Claustre Bajona. 2008. China’s vulnerability to currency crisis: A KLR signals approach. China Economic Review 19: 138–51. [Google Scholar]
- Fama, Eugene F. 1995. Random walks in stock market prices. Financial Analysts Journal 51: 75–80. [Google Scholar] [CrossRef]
- Fernandes, Marcelo, Marcelo C. Medeiros, and Marcel Scharth. 2014. Modeling and predicting the CBOE market volatility index. Journal of Banking & Finance 40: 1–10. [Google Scholar]
- Gandhmal, Dattatray P., and K. Kumar. 2019. Systematic analysis and review of stock market prediction techniques. Computer Science Review 34: 100190. [Google Scholar] [CrossRef]
- Geršl, Adam, and Martina Jašová. 2018. Credit-based early warning indicators of banking crises in emerging markets. Economic Systems 42: 18–31. [Google Scholar] [CrossRef]
- Herrera, Helios, Guillermo Ordonez, and Christoph Trebesch. 2020. Political booms, financial crises. Journal of Political Economy 128: 507–43. [Google Scholar] [CrossRef]
- Hillier, David, and Tiago Loncan. 2019. Stock market integration, cost of equity capital, and corporate investment: Evidence from Brazil. European Financial Management 25: 181–206. [Google Scholar] [CrossRef]
- Innocent, Gatsimbazi, Jaya Shukla, and Patrick Mulyungi. 2018. Effects of macroeconomic variables on stock market performance in Rwanda. Case study of Rwanda Stock Exchange. European Journal of Economic and Financial Research 3. [Google Scholar] [CrossRef]
- Javid, Irfan, Rozaida Ghazali, Irteza Syed, Muhammad Zulqarnain, and Noor Aida Husaini. 2022. Study on the Pakistan stock market using a new stock crisis prediction method. PLoS ONE 17: e0275022. [Google Scholar] [CrossRef] [PubMed]
- John, Fredynandy M., and Zakayo S. Kisava. 2018. The relationship between stock prices and exchange rates: The focus on Dar Es Salaam stock exchange (DSE). Business and Economic Research 8: 1–12. [Google Scholar] [CrossRef]
- Khan, Wasiat, Usman Malik, Mustansar Ali Ghazanfar, Muhammad Awais Azam, Khaled H. Alyoubi, and Ahmed S. Alfakeeh. 2020. Predicting stock market trends using machine learning algorithms via public sentiment and political situation analysis. Soft Computing 24: 11019–43. [Google Scholar] [CrossRef]
- Kim, Karam, Doojin Ryu, and Heejin Yang. 2019. Investor sentiment, stock returns, and analyst recommendation changes: The KOSPI stock market. Investment Analysts Journal 48: 89–101. [Google Scholar] [CrossRef]
- Ko, Jun-Hyung, and Chang-Min Lee. 2015. International economic policy uncertainty and stock prices: Wavelet approach. Economics Letters 134: 118–22. [Google Scholar] [CrossRef]
- Kumari, Jyoti, and Jitendra Mahakud. 2016. Investor sentiment and stock market volatility: Evidence from India. Journal of Asia-Pacific Business 17: 173–202. [Google Scholar] [CrossRef]
- Liu, Lanbiao, Chen Chen, and Bo Wang. 2022. Predicting financial crises with machine learning methods. Journal of Forecasting 41: 871–910. [Google Scholar] [CrossRef]
- Lu, Shan, Chenhui Liu, and Zhensong Chen. 2021. Predicting stock market crisis via market indicators and mixed frequency investor sentiments. Expert Systems with Applications 186: 115844. [Google Scholar] [CrossRef]
- Maimbo, Samuel Munzele, Issa Faye, and Thouraya Triki. 2011. Financing Africa: Through the Crisis and Beyond. Washington, DC: World Bank Publications. [Google Scholar]
- Mensi, Walid, Ferihane Zaraa Boubaker, Khamis Hamed Al-Yahyaee, and Sang Hoon Kang. 2018. Dynamic volatility spillovers and connectedness between global, regional, and GIPSI stock markets. Finance Research Letters 25: 230–38. [Google Scholar] [CrossRef]
- Mu, Yibin, Janet G. Stotsky, and Peter Phelps. 2013. Bond markets in Africa. Review of Development Finance 3: 121–35. [Google Scholar] [CrossRef]
- Mwenda, Beny, B. O. Ndiege, and D. Pastory. 2021. External Factors Influencing Performance of Listed Firms on Dar es Salaam Stock Exchange. In Sustainable Education and Development 9. Cham: Springer International Publishing, pp. 284–96. [Google Scholar]
- Naik, Nagaraj, and Biju R. Mohan. 2021. Novel stock crisis prediction technique—A study on indian stock market. IEEE Access 9: 86230–42. [Google Scholar] [CrossRef]
- Naik, Pramod Kumar, and Puja Padhi. 2016. Investor sentiment, stock market returns and volatility: Evidence from National Stock Exchange of India. International Journal of Management Practice 9: 213–37. [Google Scholar] [CrossRef]
- Odlyzko, Andrew. 2010. Collective hallucinations and inefficient markets: The British Railway Mania of the 1840s. Available online: https://ssrn.com/abstract=1537338 (accessed on 1 September 2024).
- Oet, Mikhail V., Timothy Bianco, Dieter Gramlich, and Stephen J. Ong. 2013. SAFE: An early warning system for systemic banking risk. Journal of Banking & Finance 37: 4510–33. [Google Scholar]
- Osakwe, Charity, Kelechukwu Stanley Ogbonna Ifunanya, and Victoria Ogochukwu Obi-Nwosu. 2020. Stock Market capitalization and economic growth of Nigeria and South Africa (2000–2018). European Academic Research Journal 7: 5605–23. [Google Scholar]
- Patel, Sandeep A., and Asani Sarkar. 1998. Crises in developed and emerging stock markets. Financial Analysts Journal 54: 50–61. [Google Scholar] [CrossRef]
- Qiang, Zhang, and Yang Shu-e. 2009. Noise trading, investor sentiment volatility, and stock returns. Systems Engineering-Theory & Practice 29: 40–47. [Google Scholar]
- Raza, Hassan, and Zafar Akhtar. 2024. Predicting stock prices in the Pakistan market using machine learning and technical indicators. Modern Finance 2: 46–63. [Google Scholar] [CrossRef]
- Ryu, Doojin, Hyeyoen Kim, and Heejin Yang. 2017. Investor sentiment, trading behavior and stock returns. Applied Economics Letters 24: 826–30. [Google Scholar] [CrossRef]
- Samitas, Aristeidis, Elias Kampouris, and Dimitris Kenourgios. 2020. Machine learning as an early warning system to predict financial crisis. International Review of Financial Analysis 71: 101507. [Google Scholar] [CrossRef]
- Samuelson, Paul A. 1967. Efficient portfolio selection for Pareto-Lévy investments. Journal of Financial and Quantitative Analysis 2: 107–22. [Google Scholar] [CrossRef]
- Savona, Roberto, and Marika Vezzoli. 2015. Fitting and forecasting sovereign defaults using multiple risk signals. Oxford Bulletin of Economics and Statistics 77: 66–92. [Google Scholar] [CrossRef]
- Seok, Sang Ik, Hoon Cho, and Doojin Ryu. 2019. Firm-specific investor sentiment and the stock market response to earnings news. The North American Journal of Economics and Finance 48: 221–40. [Google Scholar] [CrossRef]
- Sikhosana, Ayanda, and Goodness C. Aye. 2018. Asymmetric volatility transmission between the real exchange rate and stock returns in South Africa. Economic Analysis and Policy 60: 1–8. [Google Scholar] [CrossRef]
- Tversky, Amos, and Daniel Kahneman. 1973. Availability: A heuristic for judging frequency and probability. Cognitive Psychology 5: 207–32. [Google Scholar] [CrossRef]
- Verma, Rahul, and Priti Verma. 2008. Are survey forecasts of individual and institutional investor sentiments rational? International Review of Financial Analysis 17: 1139–55. [Google Scholar] [CrossRef]
- Wang, Wenzhao, Chen Su, and Darren Duxbury. 2021. Investor sentiment and stock returns: Global evidence. Journal of Empirical Finance 63: 365–91. [Google Scholar] [CrossRef]
- Wang, Wenzhao, Chen Su, and Darren Duxbury. 2022. The conditional impact of investor sentiment in global stock markets: A two-channel examination. Journal of Banking & Finance 138: 106458. [Google Scholar]
- Xu, Yumo, and Shay B. Cohen. 2018. Stock movement prediction from tweets and historical prices. Paper presented at 56th Annual Meeting of the Association for Computational Linguistics, Melbourne, Australia, July 15–20, vol. 1, pp. 1970–79. [Google Scholar]
- Yang, Yan, and Laurence Copeland. 2014. The Effects of Sentiment on Market Return and Volatility and the Cross-Sectional Risk Premium of Sentiment-Affected Volatility. No. E2014/12. Cardiff Economics Working Papers. Cardiff: Cardiff Business School, Cardiff University. [Google Scholar]
- Zouaoui, Mohamed, Genevieve Nouyrigat, and Francisca Beer. 2011. How does investor sentiment affect stock market crises? Evidence from panel data. Financial Review 46: 723–47. [Google Scholar] [CrossRef]
- Zubair, Z. A., and S. A. Aladejare. 2017. Exchange rate volatility and stock market performance in Nigeria. Asian Journal of Multidisciplinary Studies 5: 194–201. [Google Scholar]
Ghana | |||||
Model | TN | FP | FN | TP | Recall |
Logistic regression | 601 (83.01%) | 1 (0.14%) | 120 (16.57%) | 2 (0.28%) | 1.6% |
K-nearest neighbors | 570 (78.73%) | 32 (4.42%) | 27 (3.73%) | 96 (13.12%) | 78% |
Decision tree | 578 (79.83%) | 24 (3.31%) | 21 (2.9%) | 101 (13.95%) | 82.8% |
SVM | 575 (79.42%) | 27 (3.73%) | 36 (4.97%) | 86 (11.88%) | 70.5% |
Random forest | 598 (82.60%) | 4 (0.55%) | 13 (1.80%) | 109 (15.06%) | 89.3% |
Gradient boost | 598 (82.60%) | 4 (0.55%) | 14 (1.93%) | 108 (14.92%) | 88.5% |
XGBoost | 599 (82.73%) | 3 (0.41%) | 9 (1.24%) | 113 (15.61%) | 92.6% |
Morocco | |||||
Model | TN | FP | FN | TP | Recall |
Logistic regression | 374 (51.66%) | 204 (28.18%) | 37 (5.11%) | 109 (15.06%) | 74.6% |
K-nearest neighbors | 493 (68.09%) | 85 (11.74%) | 41 (5.66%) | 105 (14.40%) | 71.9% |
Decision tree | 547 (75.55%) | 31 (4.28%) | 9 (1.24%) | 137 (18.92%) | 93.8% |
SVM | 555 (76.66%) | 23 (3.18%) | 36 (4.97%) | 110 (15.19%) | 75.3% |
Random forest | 554 (76.52%) | 24 (3.31%) | 4 (0.55%) | 142 (19.61%) | 97.2% |
Gradient boost | 550 (75.97%) | 28 (3.87%) | 6 (0.83%) | 140 (19.34%) | 95.9% |
XGBoost | 560 (77.35%) | 18 (2.49%) | 6 (0.83%) | 140 (19.34%) | 95.9% |
Tanzania | |||||
Model | TN | FP | FN | TP | Recall |
Logistic regression | 324 (53.03%) | 126 (20.62%) | 81 (13.26%) | 80 (13.09%) | 49.7% |
K-nearest neighbors | 447 (73.16%) | 3 (0.49%) | 7 (1.15%) | 154 (25.20%) | 95.6% |
Decision tree | 445 (72.83%) | 5 (0.82%) | 11 (1.80%) | 150 (24.55%) | 93.2% |
SVM | 424 (69.39%) | 26 (4.26%) | 34 (5.56%) | 127 (20.79%) | 78.9% |
Random forest | 446 (73%) | 4 (0.65%) | 9 (1.47%) | 152 (24.88%) | 94.4% |
Gradient boost | 448 (73.32%) | 2 (0.33%) | 9 (1.47%) | 152 (24.88%) | 94.4% |
XGBoost | 448 (73.32%) | 2 (0.33%) | 9 (1.47%) | 152 (24.88%) | 94.4% |
Kenya | |||||
Model | TN | FP | FN | TP | Recall |
Logistic regression | 546 (75.41%) | 5 (0.69%) | 167 (23.07%) | 6 (0.83%) | 3.5% |
K-nearest neighbors | 490 (67.68%) | 61 (8.43%) | 38 (5.25%) | 135 (18.65%) | 78% |
Decision tree | 531 (73.34%) | 20 (2.76%) | 21 (2.90%) | 152 (20.99%) | 87.9% |
SVM | 531 (73.34%) | 20 (2.76%) | 56 (7.73%) | 117 (16.16%) | 67.6% |
Random forest | 543 (75.00%) | 8 (1.10%) | 13 (1.80%) | 160 (22.10%) | 92.5% |
Gradient boost | 540 (74.59%) | 11 (1.52%) | 12 (1.66%) | 161 (22.24%) | 93.1% |
XGBoost | 540 (74.50%) | 11 (1.52%) | 9 (1.24%) | 164 (22.65%) | 94.8% |
Nigeria | |||||
Model | TN | FP | FN | TP | Recall |
Logistic regression | 304 (51.35%) | 188 (31.76%) | 37 (6.25%) | 63 (10.64%) | 63% |
K-nearest neighbors | 463 (78.21%) | 29 (4.90%) | 12 (2.03%) | 88 (14.86%) | 88% |
Decision tree | 497 (8.91%) | 13 (2.20%) | 9 (1.52%) | 91 (15.37%) | 91% |
SVM | 464 (78.38%) | 28 (4.73%) | 9 (1.52%) | 91 (15.37%) | 91% |
Random forest | 486 (82.09%) | 6 (1.01%) | 3 (0.51%) | 97 (16.39%) | 97% |
Gradient boost | 486 (82.09%) | 6 (1.10%) | 4 (0.68%) | 96 (16.22%) | 96% |
XGBoost | 488 (82.43%) | 4 (0.68%) | 5 (0.84%) | 95 (16.05%) | 95% |
Egypt | |||||
Model | TN | FP | FN | TP | Recall |
Logistic regression | 422 (58.37%) | 175 (24.20%) | 43 (5.95%) | 83 (11.48%) | 65.9% |
K-nearest neighbors | 536 (74.14%) | 61 (8.44%) | 20 (2.77%) | 106 (14.66%) | 84.1% |
Decision tree | 589 (81.47%) | 8 (1.11%) | 12 (1.66%) | 114 (15.77%) | 90.5% |
SVM | 559 (77.32%) | 38 (5.26%) | 20 (2.77%) | 106 (14.66%) | 84.1% |
Random forest | 587 (81.19%) | 10 (1.38%) | 1 (0.14%) | 125 (17.29%) | 99.2% |
Gradient boost | 587 (81.19%) | 10 (1.38%) | 2 (0.28%) | 124 (17.15%) | 98.4% |
XGBoost | 592 (81.88%) | 5 (0.69%) | 1 (0.14%) | 125 (17.29%) | 99.2% |
South Africa | |||||
Model | TN | FP | FN | TP | Recall |
Logistic regression | 363 (48.76%) | 271 (37.43%) | 31 (4.28%) | 69 (9.53%) | 69% |
K-nearest neighbors | 566 (78.18%) | 58 (8.01%) | 27 (3.73%) | 73 (10.08%) | 73% |
Decision tree | 598 (82.60%) | 26 (3.59%) | 17 (2.35%) | 83 (11.46%) | 83% |
SVM | 594 (82.04%) | 30 (4.14%) | 14 (1.93%) | 86 (11.88%) | 86% |
Random forest | 614 (84.81%) | 10 (1.38%) | 14 (1.93%) | 86 (11.88%) | 86% |
Gradient boost | 601 (83.01%) | 23 (3.18%) | 15 (2.07%) | 85 (11.74%) | 85% |
XGBoost | 610 (84.25%) | 14 (1.93%) | 11 (1.52%) | 89 (12.29%) | 89% |
Rwanda | |||||
Model | TN | FP | FN | TP | Recall |
Logistic regression | 363 (48.76%) | 271 (37.43%) | 31 (4.28%) | 69 (9.53%) | 69% |
K-nearest neighbors | 566 (78.18%) | 58 (8.01%) | 27 (3.73%) | 73 (10.08%) | 73% |
Decision tree | 598 (82.60%) | 26 (3.59%) | 17 (2.35%) | 83 (11.46%) | 83% |
SVM | 594 (82.04%) | 30 (4.14%) | 14 (1.93%) | 86 (11.88%) | 86% |
Random forest | 614 (84.81%) | 10 (1.38%) | 14 (1.93%) | 86 (11.88%) | 86% |
Gradient boost | 601 (83.01%) | 23 (3.18%) | 15 (2.07%) | 85 (11.74%) | 85% |
XGBoost | 610 (84.25%) | 14 (1.93%) | 11 (1.52%) | 89 (12.29%) | 89% |
Ghana | |||
Model | Train Accuracy | Test Accuracy | F1 Score |
XGBoost | 1.0000 | 0.9834 | 0.9496 |
Random forest | 1.0000 | 0.9765 | 0.9276 |
Gradient boost | 1.0000 | 0.9751 | 0.9231 |
Decision tree | 0.9986 | 0.9378 | 0.8178 |
K-nearest neighbors | 1.0000 | 0.9185 | 0.7630 |
SVC | 0.9959 | 0.9129 | 0.7319 |
Logistic regression | 0.8308 | 0.8329 | 0.0320 |
Morocco | |||
Model | Train Accuracy | Test Accuracy | F1 Score |
XGBoost | 1.0000 | 0.9668 | 0.9211 |
Random forest | 0.9977 | 0.9613 | 0.9103 |
Gradient boost | 0.9997 | 0.9530 | 0.8917 |
Decision tree | 0.9942 | 0.9447 | 0.8726 |
SVC | 0.9994 | 0.9185 | 0.7885 |
K-nearest neighbors | 1.0000 | 0.8259 | 0.6250 |
Logistic regression | 0.6919 | 0.6671 | 0.4749 |
Tanzania | |||
Model | Train Accuracy | Test Accuracy | F1 Score |
K-nearest neigbors | 1.0000 | 0.9836 | 0.9685 |
Gradient boost | 1.0000 | 0.9819 | 0.9651 |
XGBoost | 1.0000 | 0.9819 | 0.9651 |
Random forest | 1.0000 | 0.9787 | 0.9589 |
Decision tree | 1.0000 | 0.9738 | 0.9494 |
SVC | 0.9985 | 0.9018 | 0.8089 |
Logistic regression | 0.8105 | 0.6612 | 0.4359 |
Nigeria | |||
Model | Train Accuracy | Test Accuracy | F1 Score |
Random forest | 1.0000 | 0.9848 | 0.9557 |
XGBoost | 1.0000 | 0.9847 | 0.9547 |
Gradient boost | 1.0000 | 0.9831 | 0.9505 |
Decision tree | 1.0000 | 0.9628 | 0.8922 |
SVC | 0.9861 | 0.9375 | 0.8310 |
K-nearest neighbors | 1.0000 | 0.9307 | 0.8110 |
Logistic regression | 0.6545 | 0.6199 | 0.35897 |
Kenya | |||
Model | Train Accuracy | Test Accuracy | F1 Score |
XGBoost | 1.0000 | 0.9724 | 0.9425 |
Random forest | 0.9995 | 0.9709 | 0.9384 |
Gradient boost | 1.0000 | 0.9682 | 0.9333 |
Decision tree | 0.9903 | 0.9433 | 0.8812 |
SVC | 0.9986 | 0.8950 | 0.7548 |
K-nearest neighbors | 1.0000 | 0.8632 | 0.7317 |
Logistic regression | 0.7629 | 0.7624 | 0.0652 |
Egypt | |||
Model | Train Accuracy | Test Accuracy | F1 Score |
XGBoost | 1.0000 | 0.9917 | 0.9766 |
Random forest | 0.9980 | 0.9847 | 0.9578 |
Gradient boost | 0.9997 | 0.9834 | 0.9538 |
Decision tree | 1.0000 | 0.9723 | 0.9194 |
SVC | 0.9782 | 0.9197 | 0.7852 |
K-nearest neighbors | 1.0000 | 0.8879 | 0.7235 |
Logistic regression | 0.6609 | 0.6984 | 0.4323 |
South Africa | |||
Model | Train Accuracy | Test Accuracy | F1 Score |
Random forest | 1.0000 | 0.9669 | 0.8776 |
XGBoost | 1.0000 | 0.965 | 0.8768 |
Gradient boost | 0.9991 | 0.9475 | 0.8173 |
SVC | 0.9895 | 0.9392 | 0.7963 |
Decision tree | 0.9991 | 0.9406 | 0.7943 |
K-nearest neighbors | 1.0000 | 0.8826 | 0.6320 |
Logistic regression | 0.6192 | 0.5829 | 0.3136 |
Rwanda | |||
Model | Train Accuracy | Test Accuracy | F1 Score |
Random forest | 1.0000 | 0.9634 | 0.8776 |
XGBoost | 1.0000 | 0.956 | 0.8768 |
Gradient boost | 0.9991 | 0.9457 | 0.8173 |
SVC | 0.9895 | 0.9329 | 0.7963 |
Decision tree | 0.9991 | 0.9460 | 0.7943 |
K-nearest neighbors | 1.0000 | 0.8726 | 0.6320 |
Logistic regression | 0.6192 | 0.5229 | 0.3136 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Naeem, M.; Jassim, H.S.; Korsah, D. The Application of Machine Learning Techniques to Predict Stock Market Crises in Africa. J. Risk Financial Manag. 2024, 17, 554. https://doi.org/10.3390/jrfm17120554
Naeem M, Jassim HS, Korsah D. The Application of Machine Learning Techniques to Predict Stock Market Crises in Africa. Journal of Risk and Financial Management. 2024; 17(12):554. https://doi.org/10.3390/jrfm17120554
Chicago/Turabian StyleNaeem, Muhammad, Hothefa Shaker Jassim, and David Korsah. 2024. "The Application of Machine Learning Techniques to Predict Stock Market Crises in Africa" Journal of Risk and Financial Management 17, no. 12: 554. https://doi.org/10.3390/jrfm17120554
APA StyleNaeem, M., Jassim, H. S., & Korsah, D. (2024). The Application of Machine Learning Techniques to Predict Stock Market Crises in Africa. Journal of Risk and Financial Management, 17(12), 554. https://doi.org/10.3390/jrfm17120554