IDEAS home Printed from https://ideas.repec.org/a/eee/ecofin/v47y2019icp552-567.html
   My bibliography  Save this article

Predicting the direction of stock market prices using tree-based classifiers

Author

Listed:
  • Basak, Suryoday
  • Kar, Saibal
  • Saha, Snehanshu
  • Khaidem, Luckyson
  • Dey, Sudeepa Roy

Abstract

Predicting returns in the stock market is usually posed as a forecasting problem where prices are predicted. Intrinsic volatility in the stock market across the globe makes the task of prediction challenging. Consequently, forecasting and diffusion modeling undermines a diverse range of problems encountered in predicting trends in the stock market. Minimizing forecasting error would minimize investment risk. In the current work, we pose the problem as a direction-predicting exercise signifying gains and losses. We develop an experimental framework for the classification problem which predicts whether stock prices will increase or decrease with respect to the price prevailing n days earlier. Two algorithms, random forests, and gradient boosted decisio‘n trees (using XGBoost) facilitate this connection by using ensembles of decision trees. We test our approach and report the accuracies for a variety of companies as improvement over existing predictions. A novelty of the current work is about the selection of technical indicators and their use as features, with high accuracy for medium to long-run prediction of stock price direction.

Suggested Citation

  • 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.
  • Handle: RePEc:eee:ecofin:v:47:y:2019:i:c:p:552-567
    DOI: 10.1016/j.najef.2018.06.013
    as

    Download full text from publisher

    File URL: http://www.sciencedirect.com/science/article/pii/S106294081730400X
    Download Restriction: Full text for ScienceDirect subscribers only

    File URL: https://libkey.io/10.1016/j.najef.2018.06.013?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    As the access to this document is restricted, you may want to search for a different version of it.

    References listed on IDEAS

    as
    1. Mingyue Qiu & Yu Song, 2016. "Predicting the Direction of Stock Market Index Movement Using an Optimized Artificial Neural Network Model," PLOS ONE, Public Library of Science, vol. 11(5), pages 1-11, May.
    2. Recchioni, Maria Cristina & Tedeschi, Gabriele & Gallegati, Mauro, 2015. "A calibration procedure for analyzing stock price dynamics in an agent-based framework," Journal of Economic Dynamics and Control, Elsevier, vol. 60(C), pages 1-25.
    3. John H. Cochrane, 2008. "The Dog That Did Not Bark: A Defense of Return Predictability," The Review of Financial Studies, Society for Financial Studies, vol. 21(4), pages 1533-1575, July.
    4. Burton G. Malkiel, 2003. "The Efficient Market Hypothesis and Its Critics," Working Papers 111, Princeton University, Department of Economics, Center for Economic Policy Studies..
    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. Timmermann, Allan & Granger, Clive W. J., 2004. "Efficient market hypothesis and forecasting," International Journal of Forecasting, Elsevier, vol. 20(1), pages 15-27.
    7. Christopher N. Avery & Judith A. Chevalier & Richard J. Zeckhauser, 2016. "The "CAPS" Prediction System and Stock Market Returns," Review of Finance, European Finance Association, vol. 20(4), pages 1363-1381.
    8. repec:pri:cepsud:91malkiel is not listed on IDEAS
    9. Peter F. Christoffersen & Francis X. Diebold, 2006. "Financial Asset Returns, Direction-of-Change Forecasting, and Volatility Dynamics," Management Science, INFORMS, vol. 52(8), pages 1273-1287, August.
    10. Andrew W. Lo & Harry Mamaysky & Jiang Wang, 2000. "Foundations of Technical Analysis: Computational Algorithms, Statistical Inference, and Empirical Implementation," Journal of Finance, American Finance Association, vol. 55(4), pages 1705-1765, August.
    11. Beltrametti, Luca & Fiorentini, Riccardo & Marengo, Luigi & Tamborini, Roberto, 1997. "A learning-to-forecast experiment on the foreign exchange market with a classifier system," Journal of Economic Dynamics and Control, Elsevier, vol. 21(8-9), pages 1543-1575, June.
    12. Halbleib, Roxana & Pohlmeier, Winfried, 2012. "Improving the value at risk forecasts: Theory and evidence from the financial crisis," Journal of Economic Dynamics and Control, Elsevier, vol. 36(8), pages 1212-1228.
    13. 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.
    14. Angela J. Black & Olga Klinkowska & David G. McMillan & Fiona J. McMillan, 2014. "Forecasting Stock Returns: Do Commodity Prices Help?," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 33(8), pages 627-639, December.
    15. Moskowitz, Tobias J. & Ooi, Yao Hua & Pedersen, Lasse Heje, 2012. "Time series momentum," Journal of Financial Economics, Elsevier, vol. 104(2), pages 228-250.
    16. Khanal, Aditya R. & Mishra, Ashok K., 2017. "Stock price reactions to stock dividend announcements: A case from a sluggish economic period," The North American Journal of Economics and Finance, Elsevier, vol. 42(C), pages 338-345.
    17. Andrew W. Lo & Harry Mamaysky & Jiang Wang, 2000. "Foundations of Technical Analysis: Computational Algorithms, Statistical Inference, and Empirical Implementation," Journal of Finance, American Finance Association, vol. 55(4), pages 1705-1770, August.
    18. Xu, Wei & Chen, Yuehuan & Coleman, Conrad & Coleman, Thomas F., 2018. "Moment matching machine learning methods for risk management of large variable annuity portfolios," Journal of Economic Dynamics and Control, Elsevier, vol. 87(C), pages 1-20.
    19. Meredith Beechey & David Gruen & James Vickery, 2000. "The Efficient Market Hypothesis: A Survey," RBA Research Discussion Papers rdp2000-01, Reserve Bank of Australia.
    20. Pai, Ping-Feng & Lin, Chih-Sheng, 2005. "A hybrid ARIMA and support vector machines model in stock price forecasting," Omega, Elsevier, vol. 33(6), pages 497-505, December.
    21. Jensen, Michael C., 1978. "Some anomalous evidence regarding market efficiency," Journal of Financial Economics, Elsevier, vol. 6(2-3), pages 95-101.
    22. 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.
    23. Maymin, Philip, 2012. "Music and the market: Song and stock volatility," The North American Journal of Economics and Finance, Elsevier, vol. 23(1), pages 70-85.
    24. Nyberg, Henri, 2011. "Forecasting the direction of the US stock market with dynamic binary probit models," International Journal of Forecasting, Elsevier, vol. 27(2), pages 561-578.
    25. Nyberg, Henri, 2011. "Forecasting the direction of the US stock market with dynamic binary probit models," International Journal of Forecasting, Elsevier, vol. 27(2), pages 561-578, April.
    26. Gencay, Ramazan, 1999. "Linear, non-linear and essential foreign exchange rate prediction with simple technical trading rules," Journal of International Economics, Elsevier, vol. 47(1), pages 91-107, February.
    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. Roland Rothenstein, 2018. "Quantification of market efficiency based on informational-entropy," Papers 1812.02371, arXiv.org.
    3. Jukka Ilomaki & Hannu Laurila & Michael McAleer, 2018. "Simple Market Timing with Moving Averages," Tinbergen Institute Discussion Papers 18-048/III, Tinbergen Institute.
    4. 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.
    5. Jukka Ilomäki & Hannu Laurila & Michael McAleer, 2018. "Market Timing with Moving Averages," Sustainability, MDPI, vol. 10(7), pages 1-25, June.
    6. Stefanescu, Razvan & Dumitriu, Ramona, 2016. "Particularitǎţi ale evoluţiei variabilelor financiare [Some particularities of the financial variables evolution]," MPRA Paper 73481, University Library of Munich, Germany, revised 02 Sep 2016.
    7. Chia-Lin Chang & Jukka Ilomäki & Hannu Laurila & Michael McAleer, 2018. "Long Run Returns Predictability and Volatility with Moving Averages," Risks, MDPI, vol. 6(4), pages 1-18, September.
    8. Park, Cheol-Ho & Irwin, Scott H., 2004. "The Profitability Of Technical Trading Rules In Us Futures Markets: A Data Snooping Free Test," 2004 Conference, April 19-20, 2004, St. Louis, Missouri 19011, NCR-134 Conference on Applied Commodity Price Analysis, Forecasting, and Market Risk Management.
    9. Rompotis, Gerasimos G., 2011. "Testing weak-form efficiency of exchange traded funds market," MPRA Paper 36020, University Library of Munich, Germany.
    10. Felicia Ramona Birau, 2011. "An Analysis Of Weak-Form Efficiency On The Bucharest Stock Exchange," Annals of University of Craiova - Economic Sciences Series, University of Craiova, Faculty of Economics and Business Administration, vol. 3(39), pages 194-205.
    11. Kamal, Mona, 2014. "Studying the Validity of the Efficient Market Hypothesis (EMH) in the Egyptian Exchange (EGX) after the 25th of January Revolution," MPRA Paper 54708, University Library of Munich, Germany.
    12. 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.
    13. Firat Melih Yilmaz & Engin Yildiztepe, 2024. "Statistical Evaluation of Deep Learning Models for Stock Return Forecasting," Computational Economics, Springer;Society for Computational Economics, vol. 63(1), pages 221-244, January.
    14. Ignacio Escanuela Romana & Clara Escanuela Nieves, 2023. "A spectral approach to stock market performance," Papers 2305.05762, arXiv.org.
    15. Ashok Chanabasangouda Patil & Shailesh Rastogi, 2019. "Time-Varying Price–Volume Relationship and Adaptive Market Efficiency: A Survey of the Empirical Literature," JRFM, MDPI, vol. 12(2), pages 1-18, June.
    16. Daniel Nicolae Militaru, 2011. "The Impact Of The Economic And Financial Crisis On Pension Systems In The European Union," Revista Tinerilor Economisti (The Young Economists Journal), University of Craiova, Faculty of Economics and Business Administration, vol. 1(17), pages 15-19, November.
    17. Roscoe, Philip & Howorth, Carole, 2009. "Identification through technical analysis: A study of charting and UK non-professional investors," Accounting, Organizations and Society, Elsevier, vol. 34(2), pages 206-221, February.
    18. Felicia Ramona Birău, 2012. "The Impact Of Behavioral Finance On Stock Markets," Annals - Economy Series, Constantin Brancusi University, Faculty of Economics, vol. 3, pages 45-50, September.
    19. Achim BACKHAUS & Aliya ZHAKANOVA ISIKSAL, 2016. "The Impact of Momentum Factors on Multi Asset Portfolio," Journal for Economic Forecasting, Institute for Economic Forecasting, vol. 0(4), pages 146-169, December.
    20. Jinho Lee & Sungwoo Park & Jungyu Ahn & Jonghun Kwak, 2022. "ETF Portfolio Construction via Neural Network trained on Financial Statement Data," Papers 2207.01187, arXiv.org.

    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:eee:ecofin:v:47:y:2019:i:c:p:552-567. 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: Catherine Liu (email available below). General contact details of provider: http://www.elsevier.com/locate/inca/620163 .

    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.