IDEAS home Printed from https://ideas.repec.org/a/gam/jjrfmx/v15y2022i5p188-d796978.html
   My bibliography  Save this article

Forecasting a Stock Trend Using Genetic Algorithm and Random Forest

Author

Listed:
  • Rebecca Abraham

    (Huizenga College of Business, Nova Southeastern University-SBE, 3301 College Avenue, Fort Lauderdale, FL 33319, USA)

  • Mahmoud El Samad

    (School of Arts and Sciences, Lebanese International University, Mouseitbah, Mazara P.O. Box 146404, Lebanon)

  • Amer M. Bakhach

    (School of Arts and Sciences, Lebanese International University, Mouseitbah, Mazara P.O. Box 146404, Lebanon)

  • Hani El-Chaarani

    (College of Business Administration, Tripoli Campus, Beirut Arab University, Beirut P.O. Box 11-50-20, Lebanon)

  • Ahmad Sardouk

    (Faculty of Economics and Business Administration, Tripoli Campus, Lebanese University (UL), Beirut P.O. Box 6573/14, Lebanon)

  • Sam El Nemar

    (Faculty of Business Administration, AZM University, Tripoli P.O. Box 1010, Lebanon)

  • Dalia Jaber

    (School of Arts and Sciences, Lebanese International University, Mouseitbah, Mazara P.O. Box 146404, Lebanon)

Abstract

This paper addresses the problem of forecasting daily stock trends. The key consideration is to predict whether a given stock will close on uptrend tomorrow with reference to today’s closing price. We propose a forecasting model that comprises a features selection model, based on the Genetic Algorithm (GA), and Random Forest (RF) classifier. In our study, we consider four international stock indices that follow the concept of distributed lag analysis. We adopted a genetic algorithm approach to select a set of helpful features among these lags’ indices. Subsequently, we employed the Random Forest classifier, to unveil hidden relationships between stock indices and a particular stock’s trend. We tested our model by using it to predict the trends of 15 stocks. Experiments showed that our forecasting model had 80% accuracy, significantly outperforming the dummy forecast. The S&P 500 was the most useful stock index, whereas the CAC40 was the least useful in the prediction of daily stock trends. This study provides evidence of the usefulness of employing international stock indices to predict stock trends.

Suggested Citation

  • Rebecca Abraham & Mahmoud El Samad & Amer M. Bakhach & Hani El-Chaarani & Ahmad Sardouk & Sam El Nemar & Dalia Jaber, 2022. "Forecasting a Stock Trend Using Genetic Algorithm and Random Forest," JRFM, MDPI, vol. 15(5), pages 1-18, April.
  • Handle: RePEc:gam:jjrfmx:v:15:y:2022:i:5:p:188-:d:796978
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/1911-8074/15/5/188/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/1911-8074/15/5/188/
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Committee, Nobel Prize, 2013. "Understanding Asset Prices," Nobel Prize in Economics documents 2013-1, Nobel Prize Committee.
    2. Hani El-Chaarani, 2019. "The Impact of Oil Prices on Stocks Markets: New Evidence During and After the Arab Spring in Gulf Cooperation Council Economies," International Journal of Energy Economics and Policy, Econjournals, vol. 9(4), pages 214-223.
    3. B. W. Wanjawa & L. Muchemi, 2014. "ANN Model to Predict Stock Prices at Stock Exchange Markets," Papers 1502.06434, arXiv.org.
    4. Fama, Eugene F, 1970. "Efficient Capital Markets: A Review of Theory and Empirical Work," Journal of Finance, American Finance Association, vol. 25(2), pages 383-417, May.
    5. Fama, Eugene F., 1998. "Market efficiency, long-term returns, and behavioral finance," Journal of Financial Economics, Elsevier, vol. 49(3), pages 283-306, September.
    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. Sebastian Eichfelder & Mona Lau, 2015. "Capitalization of capital gains taxes: (In)attention and turn-of-the-year returns," FEMM Working Papers 150019, Otto-von-Guericke University Magdeburg, Faculty of Economics and Management.
    2. 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.
    3. Nuzzo, Simone & Morone, Andrea, 2017. "Asset markets in the lab: A literature review," Journal of Behavioral and Experimental Finance, Elsevier, vol. 13(C), pages 42-50.
    4. Stephan Schulmeister, 2000. "Technical Analysis and Exchange Rate Dynamics," WIFO Studies, WIFO, number 25857, February.
    5. Razvan STEFANESCU & Ramona DUMITRIU, 2011. "The SAD Cycle for the Bucharest Stock Exchange," Risk in Contemporary Economy, "Dunarea de Jos" University of Galati, Faculty of Economics and Business Administration, pages 372-377.
    6. Mohamed Chikhi & Anne Péguin-Feissolle & Michel Terraza, 2013. "SEMIFARMA-HYGARCH Modeling of Dow Jones Return Persistence," Computational Economics, Springer;Society for Computational Economics, vol. 41(2), pages 249-265, February.
    7. Robert Campbell & Erasmo Giambona & C. Sirmans, 2009. "The Long-Horizon Performance of REIT Mergers," The Journal of Real Estate Finance and Economics, Springer, vol. 38(2), pages 105-114, February.
    8. Carmen López-Martín & Sonia Benito Muela & Raquel Arguedas, 2021. "Efficiency in cryptocurrency markets: new evidence," Eurasian Economic Review, Springer;Eurasia Business and Economics Society, vol. 11(3), pages 403-431, September.
    9. Yardley, Ben, 2020. "The Effects of Donald Trump’s Tweets on The Stock Exchange," MPRA Paper 102578, University Library of Munich, Germany.
    10. Robert J. Shiller, 2003. "From Efficient Markets Theory to Behavioral Finance," Journal of Economic Perspectives, American Economic Association, vol. 17(1), pages 83-104, Winter.
    11. Anna Maria Biscotti & Eugenio D?Amico & Sabato Vinci, 2019. "The effectiveness of intellectual capital disclosure in market assessments of corporate value creation," FINANCIAL REPORTING, FrancoAngeli Editore, vol. 2019(1), pages 5-35.
    12. Stefanescu, Razvan & Dumitriu, Ramona, 2015. "Conţinutul analizei seriilor de timp financiare [The Essentials of the Analysis of Financial Time Series]," MPRA Paper 67175, University Library of Munich, Germany.
    13. Dragos Stefan Oprea & Elena Valentina Tilica, 2014. "Day-of-the-Week Effect in Post-Communist East European Stock Markets," International Journal of Academic Research in Accounting, Finance and Management Sciences, Human Resource Management Academic Research Society, International Journal of Academic Research in Accounting, Finance and Management Sciences, vol. 4(3), pages 119-129, July.
    14. Reddy, Kotapati Srinivasa, 2015. "Extant Reviews on Entry-mode/Internationalization, Mergers & Acquisitions, and Diversification: Understanding Theories and Establishing Interdisciplinary Research," MPRA Paper 63744, University Library of Munich, Germany, revised 2015.
    15. Kevin Primicerio & Damien Challet & Stanislao Gualdi, 2017. "Wisdom of the institutional crowd," Working Papers hal-01484914, HAL.
    16. Josef Fink, 2020. "A Review of the Post-Earnings-Announcement Drift," Working Paper Series, Social and Economic Sciences 2020-04, Faculty of Social and Economic Sciences, Karl-Franzens-University Graz.
    17. Ahmet Göncü & Erdinc Akyildirim, 2017. "Statistical Arbitrage In The Multi-Asset Black–Scholes Economy," Annals of Financial Economics (AFE), World Scientific Publishing Co. Pte. Ltd., vol. 12(01), pages 1-18, March.
    18. Lu Zhang, 2019. "Q-factors and Investment CAPM," NBER Working Papers 26538, National Bureau of Economic Research, Inc.
    19. repec:pri:cepsud:91malkiel is not listed on IDEAS
    20. An, Suwei, 2023. "Essays on incentive contracts, M&As, and firm risk," Other publications TiSEM dd97d2f5-1c9d-47c5-ba62-f, Tilburg University, School of Economics and Management.
    21. Daniel, Kent & Hirshleifer, David & Teoh, Siew Hong, 2002. "Investor psychology in capital markets: evidence and policy implications," Journal of Monetary Economics, Elsevier, vol. 49(1), pages 139-209, January.

    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:15:y:2022:i:5:p:188-:d:796978. 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 (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.