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. Ariane Szafarz, 2015. "Market Efficiency and Crises:Don’t Throw the Baby out with the Bathwater," Bankers, Markets & Investors, ESKA Publishing, issue 139, pages 20-26, November-.
    2. Eero Pätäri & Timo Leivo, 2017. "A Closer Look At Value Premium: Literature Review And Synthesis," Journal of Economic Surveys, Wiley Blackwell, vol. 31(1), pages 79-168, February.
    3. 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.
    4. Abhinava Tripathi, 2021. "The Arrival of Information and Price Adjustment Across Extreme Quantiles: Global Evidence," IIM Kozhikode Society & Management Review, , vol. 10(1), pages 7-19, January.
    5. 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.
    6. Vasileiou, Evangelos, 2018. "Is the turn of the month effect an “abnormal normality”? Controversial findings, new patterns and…hidden signs(?)," Research in International Business and Finance, Elsevier, vol. 44(C), pages 153-175.
    7. 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.
    8. Taufiq Choudhry & Ranadeva Jayasekera, 2015. "Level of efficiency in the UK equity market: empirical study of the effects of the global financial crisis," Review of Quantitative Finance and Accounting, Springer, vol. 44(2), pages 213-242, February.
    9. Stephan Schulmeister, 2000. "Technical Analysis and Exchange Rate Dynamics," WIFO Studies, WIFO, number 25857, April.
    10. 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.
    11. 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.
    12. Meredith Beechey & David Gruen & James Vickery, 2000. "The Efficient Market Hypothesis: A Survey," RBA Research Discussion Papers rdp2000-01, Reserve Bank of Australia.
    13. Beladi, Hamid & Chao, Chi Chur & Hu, May, 2016. "Another January effect—Evidence from stock split announcements," International Review of Financial Analysis, Elsevier, vol. 44(C), pages 123-138.
    14. Adam Zaremba & Jacob Koby Shemer, 2018. "Price-Based Investment Strategies," Springer Books, Springer, number 978-3-319-91530-2, September.
    15. 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.
    16. 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.
    17. AitSahlia, Farid & Yoon, Joon-Hui, 2016. "Information stages in efficient markets," Journal of Banking & Finance, Elsevier, vol. 69(C), pages 84-94.
    18. Dragota, Victor & Mitrica, Eugen, 2004. "Emergent capital markets' efficiency: The case of Romania," European Journal of Operational Research, Elsevier, vol. 155(2), pages 353-360, June.
    19. Yardley, Ben, 2020. "The Effects of Donald Trump’s Tweets on The Stock Exchange," MPRA Paper 102578, University Library of Munich, Germany.
    20. 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.

    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.