IDEAS home Printed from https://ideas.repec.org/a/gam/jjrfmx/v17y2024i12p554-d1540423.html

The Application of Machine Learning Techniques to Predict Stock Market Crises in Africa

Author

Listed:
  • Muhammad Naeem

    (Mathematics & Computer Science Department, Modern College of Business and Science, Muscat 133, Oman
    UCP Business School, University of Central Punjab, Lahore 54782, Pakistan)

  • Hothefa Shaker Jassim

    (Mathematics & Computer Science Department, Modern College of Business and Science, Muscat 133, Oman)

  • David Korsah

    (Department of Finance, University of Ghana Business School, Legon, Accra LG78, Ghana)

Abstract

This study sought to ascertain a machine learning algorithm capable of predicting crises in the African stock market with the highest accuracy. Seven different machine-learning algorithms were employed on historical stock prices of the eight stock markets, three main sentiment indicators, and the exchange rate of the respective countries’ currencies against the US dollar, each spanning from 1 May 2007 to 1 April 2023. It was revealed that extreme gradient boosting (XGBoost) emerged as the most effective way of predicting crises. Historical stock prices and exchange rates were found to be the most important features, exerting strong influences on stock market crises. Regarding the sentiment front, investors’ perceptions of possible volatility on the S&P 500 (Chicago Board Options Exchange (CBOE) VIX) and the Daily News Sentiment Index were identified as influential predictors. The study advances an understanding of market sentiment and emphasizes the importance of employing advanced computational techniques for risk management and market stability.

Suggested Citation

  • Muhammad Naeem & Hothefa Shaker Jassim & David Korsah, 2024. "The Application of Machine Learning Techniques to Predict Stock Market Crises in Africa," JRFM, MDPI, vol. 17(12), pages 1-19, December.
  • Handle: RePEc:gam:jjrfmx:v:17:y:2024:i:12:p:554-:d:1540423
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/1911-8074/17/12/554/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/1911-8074/17/12/554/
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Oet, Mikhail V. & Bianco, Timothy & Gramlich, Dieter & Ong, Stephen J., 2013. "SAFE: An early warning system for systemic banking risk," Journal of Banking & Finance, Elsevier, vol. 37(11), pages 4510-4533.
    2. José Brambila-Macias & Isabella Massa, 2010. "The Global Financial Crisis and Sub-Saharan Africa: The Effects of Slowing Private Capital Inflows on Growth," African Development Review, African Development Bank, vol. 22(3), pages 366-377.
    3. Deven Bathia & Don Bredin, 2013. "An examination of investor sentiment effect on G7 stock market returns," The European Journal of Finance, Taylor & Francis Journals, vol. 19(9), pages 909-937, October.
    4. Sandeep A. Patel & Asani Sarkar, 1998. "Crises in Developed and Emerging Stock Markets," Financial Analysts Journal, Taylor & Francis Journals, vol. 54(6), pages 50-61, November.
    5. Yang, Yan & Copeland, Laurence, 2014. "The Effects of Sentiment on Market Return and Volatility and The Cross-Sectional Risk Premium of Sentiment-affected Volatility," Cardiff Economics Working Papers E2014/12, Cardiff University, Cardiff Business School, Economics Section.
    6. Hassan Raza & Zafar Akhtar, 2024. "Predicting stock prices in the Pakistan market using machine learning and technical indicators," Modern Finance, Modern Finance Institute, vol. 2(2), pages 46-63.
    7. Mensi, Walid & Boubaker, Ferihane Zaraa & Al-Yahyaee, Khamis Hamed & Kang, Sang Hoon, 2018. "Dynamic volatility spillovers and connectedness between global, regional, and GIPSI stock markets," Finance Research Letters, Elsevier, vol. 25(C), pages 230-238.
    8. 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, Elsevier, vol. 574(C).
    Full references (including those not matched with items on IDEAS)

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. David Korsah, 2025. "Climate, energy, and geopolitical risks in African stock markets: a comparative TVP-VAR and QVAR approach," Future Business Journal, Springer, vol. 11(1), pages 1-16, December.
    2. Teplova, Tamara & Fayzulin, Maksim & Kurkin, Aleksei, 2025. "Early warning system for Russian stock market crises: TCN-LSTM-Attention model using imbalanced data and attention mechanism," Socio-Economic Planning Sciences, Elsevier, vol. 101(C).
    3. David Korsah & Seth Kwadwo Danso, 2025. "Immune or vulnerable? African stock markets’ response to U.S.–China trade wars and geopolitical tensions," Future Business Journal, Springer, vol. 11(1), pages 1-17, December.

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Chen-Yin Kuo & Shu-Mei Chiang, 2025. "Spillover effects and network connectedness among stock markets: evidence from the U.S. and Asia," Review of Quantitative Finance and Accounting, Springer, vol. 64(1), pages 1-52, January.
    2. Huynh, Nhan & De Mello, Lurion & Li, Kai, 2025. "Evolution of investor sentiment: A systematic literature review and bibliometric analysis," International Review of Economics & Finance, Elsevier, vol. 100(C).
    3. Choi, Sun-Yong, 2022. "Volatility spillovers among Northeast Asia and the US: Evidence from the global financial crisis and the COVID-19 pandemic," Economic Analysis and Policy, Elsevier, vol. 73(C), pages 179-193.
    4. Gaio, Luiz Eduardo & Stefanelli, Nelson Oliveira & Pimenta, Tabajara & Bonacim, Carlos Alberto Grespan & Gatsios, Rafael Confetti, 2022. "The impact of the Russia-Ukraine conflict on market efficiency: Evidence for the developed stock market," Finance Research Letters, Elsevier, vol. 50(C).
    5. Friday Osemenshan Anetor, 2020. "Foreign Capital Inflows, Financial Development and Growth In Nigeria: A Structural VAR Approach," Journal of Developing Areas, Tennessee State University, College of Business, vol. 54(3), pages 69-86, July-Sept.
    6. Abdullah, Mohammad & Chowdhury, Mohammad Ashraful Ferdous & Wali Ullah, G.M., 2025. "Asymmetric tail risk dynamics, efficiency and risk spillover among FinTech stocks, cryptocurrencies and traditional assets," Global Finance Journal, Elsevier, vol. 64(C).
    7. Udoka Bernard ALAJEKWU & Michael Chukwumee OBIALOR & Cyprian Okey OKORO, 2017. "Ffect Of Investor Sentiment On Future Returns In The Nigerian Stock Market," Annals of Spiru Haret University, Economic Series, Universitatea Spiru Haret, vol. 17(2), pages 103-126.
    8. Zhong, Meirui & Zhang, Rui & Ren, Xiaohang, 2023. "The time-varying effects of liquidity and market efficiency of the European Union carbon market: Evidence from the TVP-SVAR-SV approach," Energy Economics, Elsevier, vol. 123(C).
    9. Bouri, Elie & Gabauer, David & Gupta, Rangan & Tiwari, Aviral Kumar, 2021. "Volatility connectedness of major cryptocurrencies: The role of investor happiness," Journal of Behavioral and Experimental Finance, Elsevier, vol. 30(C).
    10. van Eyden, Reneé & Gupta, Rangan & Nielsen, Joshua & Bouri, Elie, 2023. "Investor sentiment and multi-scale positive and negative stock market bubbles in a panel of G7 countries," Journal of Behavioral and Experimental Finance, Elsevier, vol. 38(C).
    11. Zhang, Hua & Chen, Jinyu & Shao, Liuguo, 2021. "Dynamic spillovers between energy and stock markets and their implications in the context of COVID-19," International Review of Financial Analysis, Elsevier, vol. 77(C).
    12. Antunes, António & Bonfim, Diana & Monteiro, Nuno & Rodrigues, Paulo M.M., 2018. "Forecasting banking crises with dynamic panel probit models," International Journal of Forecasting, Elsevier, vol. 34(2), pages 249-275.
    13. Yuan, Ying & Du, Xinyu, 2023. "Dynamic spillovers across global stock markets during the COVID-19 pandemic: Evidence from jumps and higher moments," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 628(C).
    14. Wan, Yang & He, Shi, 2021. "Dynamic connectedness of currencies in G7 countries: A Bayesian time-varying approach," Finance Research Letters, Elsevier, vol. 41(C).
    15. To Trung Thanh & Le Thanh Ha, 2025. "An application of a R2 dcomposed linkage method to explore a comtemporal and lead connectedness between investor sentiment and exchange rate dynamics in vietnam," Quality & Quantity: International Journal of Methodology, Springer, vol. 59(1), pages 231-259, February.
    16. Jing Deng & Yun Zhang & Xiaoyun Xing & Cheng Liu, 2022. "Can Carbon Neutrality Commitment Contribute to the Sustainable Development of China’s New Energy Companies?," Sustainability, MDPI, vol. 14(18), pages 1-20, September.
    17. Yizhuo Zhang & Rui Chen & Ding Ma, 2020. "A Weighted and Directed Perspective of Global Stock Market Connectedness: A Variance Decomposition and GERGM Framework," Sustainability, MDPI, vol. 12(11), pages 1-23, June.
    18. Syed Faisal Hasssan Bukhari & Waqar Yasir & Christian Espinosa Méndez & Zia Mustafa, 2023. "Sectoral Comparison of Herding During Global Financial Crisis and Covid-19: Comparative Analysis of Shariah Compliant and Conventional Stocks," Journal of Economic Impact, Science Impact Publishers, vol. 5(3), pages 202-210.
    19. Steve Motsi & Oluseye Samuel Ajuwon & Collins Ntim, 2018. "Bank Competition in Sub-Saharan African Countries: Has Anything Changed in the Light of 2007-2008 Global FinancialCrisis?," SPOUDAI Journal of Economics and Business, SPOUDAI Journal of Economics and Business, University of Piraeus, vol. 68(1), pages 59-83, January-M.
    20. Dhingra, Barkha & Saini, Mohit & Yadav, Mahender & Kumar, Gaurav & Kumar, Pankaj, 2025. "Exploring global financial interdependencies among ASEAN-5, major developed and developing markets," The Journal of Economic Asymmetries, Elsevier, vol. 31(C).

    More about this item

    Keywords

    ;
    ;
    ;
    ;
    ;

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jjrfmx:v:17:y:2024:i:12:p:554-:d:1540423. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager The email address of this maintainer does not seem to be valid anymore. Please ask MDPI Indexing Manager to update the entry or send us the correct address (email available below). General contact details of provider: https://www.mdpi.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.