IDEAS home Printed from https://ideas.repec.org/p/arx/papers/2207.06605.html
   My bibliography  Save this paper

StockBot: Using LSTMs to Predict Stock Prices

Author

Listed:
  • Shaswat Mohanty
  • Anirudh Vijay
  • Nandagopan Gopakumar

Abstract

The evaluation of the financial markets to predict their behaviour have been attempted using a number of approaches, to make smart and profitable investment decisions. Owing to the highly non-linear trends and inter-dependencies, it is often difficult to develop a statistical approach that elucidates the market behaviour entirely. To this end, we present a long-short term memory (LSTM) based model that leverages the sequential structure of the time-series data to provide an accurate market forecast. We then develop a decision making StockBot that buys/sells stocks at the end of the day with the goal of maximizing profits. We successfully demonstrate an accurate prediction model, as a result of which our StockBot can outpace the market and can strategize for gains that are ~15 times higher than the most aggressive ETFs in the market.

Suggested Citation

  • Shaswat Mohanty & Anirudh Vijay & Nandagopan Gopakumar, 2022. "StockBot: Using LSTMs to Predict Stock Prices," Papers 2207.06605, arXiv.org, revised Jul 2022.
  • Handle: RePEc:arx:papers:2207.06605
    as

    Download full text from publisher

    File URL: http://arxiv.org/pdf/2207.06605
    File Function: Latest version
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. C. H. Hommes, 2001. "Financial markets as nonlinear adaptive evolutionary systems," Quantitative Finance, Taylor & Francis Journals, vol. 1(1), pages 149-167.
    2. Dhanya Jothimani & Ravi Shankar & Surendra S. Yadav, 2016. "Discrete Wavelet Transform-Based Prediction of Stock Index: A Study on National Stock Exchange Fifty Index," Papers 1605.07278, arXiv.org.
    3. Mohammad Rafiqul Islam & Nguyet Nguyen, 2020. "Comparison of Financial Models for Stock Price Prediction," JRFM, MDPI, vol. 13(8), pages 1-19, August.
    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. Westerhoff, Frank H. & Dieci, Roberto, 2006. "The effectiveness of Keynes-Tobin transaction taxes when heterogeneous agents can trade in different markets: A behavioral finance approach," Journal of Economic Dynamics and Control, Elsevier, vol. 30(2), pages 293-322, February.
    2. Turvey, Calum G., 2001. "Random Walks And Fractal Structures In Agricultural Commodity Futures Prices," Working Papers 34151, University of Guelph, Department of Food, Agricultural and Resource Economics.
    3. Chiarella, Carl & Dieci, Roberto & He, Xue-Zhong, 2007. "Heterogeneous expectations and speculative behavior in a dynamic multi-asset framework," Journal of Economic Behavior & Organization, Elsevier, vol. 62(3), pages 408-427, March.
    4. Kukacka, Jiri & Jang, Tae-Seok & Sacht, Stephen, 2018. "On the estimation of behavioral macroeconomic models via simulated maximum likelihood," Economics Working Papers 2018-11, Christian-Albrechts-University of Kiel, Department of Economics.
    5. Hommes, Cars & Huang, Hai & Wang, Duo, 2005. "A robust rational route to randomness in a simple asset pricing model," Journal of Economic Dynamics and Control, Elsevier, vol. 29(6), pages 1043-1072, June.
    6. Youwei Li & Xue-Zhong He, 2005. "Long Memory, Heterogeneity, and Trend Chasing," Computing in Economics and Finance 2005 113, Society for Computational Economics.
    7. Brock, William A. & Hommes, Cars H. & Wagener, Florian O. O., 2005. "Evolutionary dynamics in markets with many trader types," Journal of Mathematical Economics, Elsevier, vol. 41(1-2), pages 7-42, February.
    8. Reitz, Stefan, 2006. "On the predictive content of technical analysis," The North American Journal of Economics and Finance, Elsevier, vol. 17(2), pages 121-137, August.
    9. Yeh, Chia-Hsuan & Yang, Chun-Yi, 2010. "Examining the effectiveness of price limits in an artificial stock market," Journal of Economic Dynamics and Control, Elsevier, vol. 34(10), pages 2089-2108, October.
    10. Constantinos VORLOW & Antonios ANTONIOU & Catherine KYRTSOU, 2004. "Surrogate Data Analysis and Stochastic Chaotic Modelling: Application to Stock Exchange Returns Series," Computing in Economics and Finance 2004 27, Society for Computational Economics.
    11. Annarita Colasante & Simone Alfarano & Eva Camacho-Cuena & Mauro Gallegati, 2020. "Long-run expectations in a learning-to-forecast experiment: a simulation approach," Journal of Evolutionary Economics, Springer, vol. 30(1), pages 75-116, January.
    12. Serena Brianzoni & Roy Cerqueti & Elisabetta Michetti, 2010. "A Dynamic Stochastic Model of Asset Pricing with Heterogeneous Beliefs," Computational Economics, Springer;Society for Computational Economics, vol. 35(2), pages 165-188, February.
    13. Gaunersdorfer, A. & Hommes, C.H. & Wagener, F.O.O., 2000. "Bifurcation Routes to Volatility Clustering," CeNDEF Working Papers 00-04, Universiteit van Amsterdam, Center for Nonlinear Dynamics in Economics and Finance.
    14. Dieci, Roberto & Foroni, Ilaria & Gardini, Laura & He, Xue-Zhong, 2006. "Market mood, adaptive beliefs and asset price dynamics," Chaos, Solitons & Fractals, Elsevier, vol. 29(3), pages 520-534.
    15. Witte, Björn-Christopher, 2012. "Fund managers - Why the best might be the worst: On the evolutionary vigor of risk-seeking behavior," Economics Discussion Papers 2012-20, Kiel Institute for the World Economy (IfW Kiel).
    16. He, Xue-Zhong & Li, Youwei, 2015. "Testing of a market fraction model and power-law behaviour in the DAX 30," Journal of Empirical Finance, Elsevier, vol. 31(C), pages 1-17.
    17. Tedeschi, Gabriele & Recchioni, Maria Cristina & Berardi, Simone, 2019. "An approach to identifying micro behavior: How banks’ strategies influence financial cycles," Journal of Economic Behavior & Organization, Elsevier, vol. 162(C), pages 329-346.
    18. Sornette, Didier & Zhou, Wei-Xing, 2006. "Importance of positive feedbacks and overconfidence in a self-fulfilling Ising model of financial markets," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 370(2), pages 704-726.
    19. F. Cavalli & A. Naimzada & N. Pecora & M. Pireddu, 2021. "Market sentiment and heterogeneous agents in an evolutive financial model," Journal of Evolutionary Economics, Springer, vol. 31(4), pages 1189-1219, September.
    20. Mohamed S. Ahmed & John A. Doukas, 2021. "Revisiting disposition effect and momentum: a quantile regression perspective," Review of Quantitative Finance and Accounting, Springer, vol. 56(3), pages 1087-1128, April.

    More about this item

    NEP fields

    This paper has been announced in the following NEP Reports:

    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:arx:papers:2207.06605. 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: arXiv administrators (email available below). General contact details of provider: http://arxiv.org/ .

    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.