IDEAS home Printed from https://ideas.repec.org/a/ris/ecoint/0909.html
   My bibliography  Save this article

Prediction of Stock Market Direction: Application of Machine Learning Models

Author

Listed:
  • Dimingo, Roselyn

    (University of Johannesburg, South Africa)

  • Muteba Mwamba, John W.

    (University of Johannesburg, South Africa)

  • Bonga-Bonga, Lumengo

    (Department of Economics and Econometrics, University of Johannesburg, South Africa)

Abstract

Prediction of market direction has gained more attention than the prediction of point returns over the past few years as it is essential in determining buy and sell signals. A correct forecast of the market trend leads investors and asset managers to make knowledgeable decisions about their future investments. It is in this context that this study seeks to predict the market direction of two developed markets (USA and UK) and two emerging markets (South Africa and Brazil) using five machine learning techniques, namely Support Vector Machines (SVM), Decision Trees (DTs), Random Forest (RF), K-Nearest Neighbours (K-NN) and Linear Discriminant Analysis (LDA). We use the LDA algorithm as a benchmark since it is the only algorithm that is closely related to logistic regression model. Our empirical results show that the random forest (RF) is the best model in predicting the market direction of all the markets, developed or emerging. Moreover, the study finds that stock markets in both developed and emerging markets are determined by their previous day price and the stock dividend yield. Previsioni dell’andamento del mercato azionario: applicazione di modelli di machine learning Negli ultimi anni la previsione dell’andamento del mercato ha ricevuto più attenzione della previsione dei rendimenti puntuali poiché è essenziale nel determinare i segnali degli acquisti e delle vendite. Una previsione corretta delle tendenze del mercato induce gli investitori e i consulenti finanziari a prendere decisioni consapevoli circa i loro futuri investimenti. È in questo contesto che questo articolo cerca di prevedere la tendenza del mercato di due paesi sviluppati (Stati Uniti e Regno Unito) e di due paesi emergenti (Sud Africa e Brasile) tramite l’utilizzo di cinque tecniche di apprendimento automatico, precisamente: Support Vector Machines (SVM), Decision Trees (DTs), Random Forest (RF), K-Nearest Neighbours (K-NN) e Linear Discriminant Analysis (LDA). Quest’ultimo viene usato come modello di riferimento in quanto è l’unico algoritmo strettamente correlato al modello di regressione logistica. I risultati empirici mostrano che il modello random forest (RF) è il migliore per prevedere la tendenza di tutti i mercati, sia sviluppati che emergenti. Inoltre, lo studio evidenzia che sia i mercati azionari sviluppati che quelli emergenti sono determinati dalla quotazione del giorno precedente e dal rendimento dei dividendi.

Suggested Citation

  • Dimingo, Roselyn & Muteba Mwamba, John W. & Bonga-Bonga, Lumengo, 2021. "Prediction of Stock Market Direction: Application of Machine Learning Models," Economia Internazionale / International Economics, Camera di Commercio Industria Artigianato Agricoltura di Genova, vol. 74(4), pages 499-536.
  • Handle: RePEc:ris:ecoint:0909
    as

    Download full text from publisher

    File URL: http://iei1946.it/upload/rivista_articoli/allegati/425_bonga-et-al-predictionricfinal.pdf
    File Function: Full text
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Chatfield, Chris, 1993. "Calculating Interval Forecasts: Reply," Journal of Business & Economic Statistics, American Statistical Association, vol. 11(2), pages 143-144, April.
    2. Lucio Sarno & Giorgio Valente, 2005. "Modelling and forecasting stock returns: exploiting the futures market, regime shifts and international spillovers," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 20(3), pages 345-376, March.
    3. Chatfield, Chris, 1993. "Calculating Interval Forecasts," Journal of Business & Economic Statistics, American Statistical Association, vol. 11(2), pages 121-135, April.
    4. Basak, Suryoday & Kar, Saibal & Saha, Snehanshu & Khaidem, Luckyson & Dey, Sudeepa Roy, 2019. "Predicting the direction of stock market prices using tree-based classifiers," The North American Journal of Economics and Finance, Elsevier, vol. 47(C), pages 552-567.
    5. Burton G. Malkiel, 2003. "The Efficient Market Hypothesis and Its Critics," Working Papers 111, Princeton University, Department of Economics, Center for Economic Policy Studies..
    6. Burton G. Malkiel, 2003. "The Efficient Market Hypothesis and Its Critics," Working Papers 111, Princeton University, Department of Economics, Center for Economic Policy Studies..
    7. repec:pri:cepsud:91malkiel is not listed on IDEAS
    8. McQueen, Grant & Thorley, Steven, 1991. "Are Stock Returns Predictable? A Test Using Markov Chains," Journal of Finance, American Finance Association, vol. 46(1), pages 239-263, March.
    9. Pascual, Lorenzo & Romo, Juan & Ruiz, Esther, 2006. "Bootstrap prediction for returns and volatilities in GARCH models," Computational Statistics & Data Analysis, Elsevier, vol. 50(9), pages 2293-2312, May.
    10. Jegadeesh, Narasimhan, 1990. "Evidence of Predictable Behavior of Security Returns," Journal of Finance, American Finance Association, vol. 45(3), pages 881-898, July.
    11. Burton G. Malkiel, 2003. "The Efficient Market Hypothesis and Its Critics," Journal of Economic Perspectives, American Economic Association, vol. 17(1), pages 59-82, Winter.
    12. Leung, Mark T. & Daouk, Hazem & Chen, An-Sing, 2000. "Forecasting stock indices: a comparison of classification and level estimation models," International Journal of Forecasting, Elsevier, vol. 16(2), pages 173-190.
    Full references (including those not matched with items on IDEAS)

    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. Perry Sadorsky, 2021. "A Random Forests Approach to Predicting Clean Energy Stock Prices," JRFM, MDPI, vol. 14(2), pages 1-20, January.
    2. Yang, Yanlin & Hu, Xuemei & Jiang, Huifeng, 2022. "Group penalized logistic regressions predict up and down trends for stock prices," The North American Journal of Economics and Finance, Elsevier, vol. 59(C).
    3. Akber, Ushna & Muhammad, Nabeel, 2013. "Is Pakistan Stock Market moving towards Weak-form efficiency? Evidence from the Karachi Stock Exchange and the Random Walk Nature of free-float of shares of KSE 30 Index," MPRA Paper 49128, University Library of Munich, Germany.
    4. Heni Boubaker & Giorgio Canarella & Rangan Gupta & Stephen M. Miller, 2023. "A Hybrid ARFIMA Wavelet Artificial Neural Network Model for DJIA Index Forecasting," Computational Economics, Springer;Society for Computational Economics, vol. 62(4), pages 1801-1843, December.
    5. Dushmanta Kumar Padhi & Neelamadhab Padhy & Akash Kumar Bhoi & Jana Shafi & Muhammad Fazal Ijaz, 2021. "A Fusion Framework for Forecasting Financial Market Direction Using Enhanced Ensemble Models and Technical Indicators," Mathematics, MDPI, vol. 9(21), pages 1-31, October.
    6. Saqib Farid & Rubeena Tashfeen & Tahseen Mohsan & Arsal Burhan, 2023. "Forecasting stock prices using a data mining method: Evidence from emerging market," International Journal of Finance & Economics, John Wiley & Sons, Ltd., vol. 28(2), pages 1911-1917, April.
    7. Htet Htet Htun & Michael Biehl & Nicolai Petkov, 2023. "Survey of feature selection and extraction techniques for stock market prediction," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 9(1), pages 1-25, December.
    8. Pernagallo, Giuseppe & Torrisi, Benedetto, 2020. "Blindfolded monkeys or financial analysts: Who is worth your money? New evidence on informational inefficiencies in the U.S. stock market," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 539(C).
    9. Angelovska, Julijana, 2018. "Testing Weak Form Of Stock Market Efficiency At The Macedonian Stock Exchange," UTMS Journal of Economics, University of Tourism and Management, Skopje, Macedonia, vol. 9(2), pages 133-144.
    10. Ushna Akber & Nabeel Muhammad, 2014. "Is Pakistan Stock Market Moving towards Weak-Form Efficiency? Evidence from The Karachi Stock Exchange and the Random Walk Nature of Free-Float of Shares of KSE 30 Index," Asian Economic and Financial Review, Asian Economic and Social Society, vol. 4(6), pages 808-836, June.
    11. Ignacio Escanuela Romana & Clara Escanuela Nieves, 2023. "A spectral approach to stock market performance," Papers 2305.05762, arXiv.org.
    12. I. Marta Miranda García & María‐Jesús Segovia‐Vargas & Usue Mori & José A. Lozano, 2023. "Early prediction of Ibex 35 movements," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 42(5), pages 1150-1166, August.
    13. Paulo Sergio Ceretta & Alexandre Silva Da costa, 2017. "The Gap Effect on the Brazilian Exchange," Economics Bulletin, AccessEcon, vol. 37(4), pages 2505-2516.
    14. Azubuike Samuel Agbam, 2015. "Tests of Random Walk and Efficient Market Hypothesis in Developing Economies: Evidence from Nigerian Capital Market," International Journal of Management Sciences, Research Academy of Social Sciences, vol. 5(1), pages 1-53.
    15. Majumder, Debasish, 2013. "Towards an efficient stock market: Empirical evidence from the Indian market," Journal of Policy Modeling, Elsevier, vol. 35(4), pages 572-587.
    16. David M. Ritzwoller & Joseph P. Romano, 2019. "Uncertainty in the Hot Hand Fallacy: Detecting Streaky Alternatives to Random Bernoulli Sequences," Papers 1908.01406, arXiv.org, revised Apr 2021.
    17. Jitka Veselá & Alžběta Zíková, 2022. "Are the Czech, Polish, German and Dutch markets taking a random walk? [Konají český, polský, německý a nizozemský trh náhodnou procházku?]," Český finanční a účetní časopis, Prague University of Economics and Business, vol. 2022(2), pages 19-38.
    18. Muchnik, Lev & Bunde, Armin & Havlin, Shlomo, 2009. "Long term memory in extreme returns of financial time series," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 388(19), pages 4145-4150.
    19. John Sabelhaus, 2005. "Alternative Methods for Projecting Equity Returns: Implications for Evaluating Social Security Reform Proposals," Risk Management and Insurance Review, American Risk and Insurance Association, vol. 8(1), pages 43-63, March.
    20. Cristi Spulbar & Ramona Birau & Lucian Florin Spulbar, 2021. "A Critical Survey on Efficient Market Hypothesis (EMH), Adaptive Market Hypothesis (AMH) and Fractal Markets Hypothesis (FMH) Considering Their Implication on Stock Markets Behavior," Ovidius University Annals, Economic Sciences Series, Ovidius University of Constantza, Faculty of Economic Sciences, vol. 0(2), pages 1161-1165, December.

    More about this item

    Keywords

    Machine Learning; Cross Validation; Confusion Matrix and Performance Evaluation;
    All these keywords.

    JEL classification:

    • C55 - Mathematical and Quantitative Methods - - Econometric Modeling - - - Large Data Sets: Modeling and Analysis
    • C58 - Mathematical and Quantitative Methods - - Econometric Modeling - - - Financial Econometrics
    • G11 - Financial Economics - - General Financial Markets - - - Portfolio Choice; Investment Decisions
    • G17 - Financial Economics - - General Financial Markets - - - Financial Forecasting and Simulation

    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:ris:ecoint:0909. 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: Angela Procopio (email available below). General contact details of provider: https://edirc.repec.org/data/cacogit.html .

    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.