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

Stock Price Prediction Using CNN and LSTM-Based Deep Learning Models

Author

Listed:
  • Sidra Mehtab
  • Jaydip Sen

Abstract

Designing robust and accurate predictive models for stock price prediction has been an active area of research for a long time. While on one side, the supporters of the efficient market hypothesis claim that it is impossible to forecast stock prices accurately, many researchers believe otherwise. There exist propositions in the literature that have demonstrated that if properly designed and optimized, predictive models can very accurately and reliably predict future values of stock prices. This paper presents a suite of deep learning based models for stock price prediction. We use the historical records of the NIFTY 50 index listed in the National Stock Exchange of India, during the period from December 29, 2008 to July 31, 2020, for training and testing the models. Our proposition includes two regression models built on convolutional neural networks and three long and short term memory network based predictive models. To forecast the open values of the NIFTY 50 index records, we adopted a multi step prediction technique with walk forward validation. In this approach, the open values of the NIFTY 50 index are predicted on a time horizon of one week, and once a week is over, the actual index values are included in the training set before the model is trained again, and the forecasts for the next week are made. We present detailed results on the forecasting accuracies for all our proposed models. The results show that while all the models are very accurate in forecasting the NIFTY 50 open values, the univariate encoder decoder convolutional LSTM with the previous two weeks data as the input is the most accurate model. On the other hand, a univariate CNN model with previous one week data as the input is found to be the fastest model in terms of its execution speed.

Suggested Citation

  • Sidra Mehtab & Jaydip Sen, 2020. "Stock Price Prediction Using CNN and LSTM-Based Deep Learning Models," Papers 2010.13891, arXiv.org.
  • Handle: RePEc:arx:papers:2010.13891
    as

    Download full text from publisher

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

    References listed on IDEAS

    as
    1. Jaydip SEN & Tamal DATTA CHAUDHURI, 2016. "An Alternative Framework for Time Series Decomposition and Forecastingand its Relevance for Portfolio Choice – A Comparative Study of the Indian Consumer Durable and Small Cap Sectors," Journal of Economics Library, KSP Journals, vol. 3(2), pages 303-326, June.
    2. Jaydip Sen & Tamal Datta Chaudhuri, 2018. "Understanding the sectors of Indian economy for portfolio choice," International Journal of Business Forecasting and Marketing Intelligence, Inderscience Enterprises Ltd, vol. 4(2), pages 178-222.
    3. Sidra Mehtab & Jaydip Sen, 2019. "A Robust Predictive Model for Stock Price Prediction Using Deep Learning and Natural Language Processing," Papers 1912.07700, arXiv.org.
    4. Wei Bao & Jun Yue & Yulei Rao, 2017. "A deep learning framework for financial time series using stacked autoencoders and long-short term memory," PLOS ONE, Public Library of Science, vol. 12(7), pages 1-24, July.
    Full references (including those not matched with items on IDEAS)

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Jaydip Sen & Sidra Mehtab, 2021. "Accurate Stock Price Forecasting Using Robust and Optimized Deep Learning Models," Papers 2103.15096, arXiv.org.
    2. Jaydip Sen, 2022. "Designing Efficient Pair-Trading Strategies Using Cointegration for the Indian Stock Market," Papers 2211.07080, arXiv.org.
    3. Jaydip Sen & Subhasis Dasgupta, 2023. "Portfolio Optimization: A Comparative Study," Papers 2307.05048, arXiv.org.
    4. Huang, Wenyang & Wang, Huiwen & Qin, Haotong & Wei, Yigang & Chevallier, Julien, 2022. "Convolutional neural network forecasting of European Union allowances futures using a novel unconstrained transformation method," Energy Economics, Elsevier, vol. 110(C).
    5. Yiyang Zheng, 2022. "Neural Network and Order Flow, Technical Analysis: Predicting short-term direction of futures contract," Papers 2203.12457, arXiv.org.
    6. Adamantios Ntakaris & Moncef Gabbouj & Juho Kanniainen, 2023. "Optimum Output Long Short-Term Memory Cell for High-Frequency Trading Forecasting," Papers 2304.09840, arXiv.org, revised May 2023.
    7. Sidra Mehtab & Jaydip Sen & Subhasis Dasgupta, 2020. "Robust Analysis of Stock Price Time Series Using CNN and LSTM-Based Deep Learning Models," Papers 2011.08011, arXiv.org, revised Jan 2021.
    8. Jinan Zou & Qingying Zhao & Yang Jiao & Haiyao Cao & Yanxi Liu & Qingsen Yan & Ehsan Abbasnejad & Lingqiao Liu & Javen Qinfeng Shi, 2022. "Stock Market Prediction via Deep Learning Techniques: A Survey," Papers 2212.12717, arXiv.org, revised Feb 2023.
    9. Jaydip Sen & Abhishek Dutta, 2022. "Design and Analysis of Optimized Portfolios for Selected Sectors of the Indian Stock Market," Papers 2210.03943, arXiv.org.
    10. Jaydip Sen & Rajdeep Sen & Abhishek Dutta, 2021. "Machine Learning in Finance-Emerging Trends and Challenges," Papers 2110.11999, arXiv.org.
    11. Jaydip Sen & Sidra Mehtab, 2021. "Design and Analysis of Robust Deep Learning Models for Stock Price Prediction," Papers 2106.09664, arXiv.org.
    12. Rameshwar Garg & Shriya Barpanda & Girish Rao Salanke N S & Ramya S, 2022. "Machine Learning Algorithms for Time Series Analysis and Forecasting," Papers 2211.14387, arXiv.org.
    13. Jaydip Sen & Abhishek Dutta & Sidra Mehtab, 2021. "Profitability Analysis in Stock Investment Using an LSTM-Based Deep Learning Model," Papers 2104.06259, arXiv.org.
    14. Jaydip Sen & Arpit Awad & Aaditya Raj & Gourav Ray & Pusparna Chakraborty & Sanket Das & Subhasmita Mishra, 2022. "Stock Performance Evaluation for Portfolio Design from Different Sectors of the Indian Stock Market," Papers 2208.07166, arXiv.org.
    15. Jaydip Sen & Aditya Jaiswal & Anshuman Pathak & Atish Kumar Majee & Kushagra Kumar & Manas Kumar Sarkar & Soubhik Maji, 2023. "A Comparative Analysis of Portfolio Optimization Using Mean-Variance, Hierarchical Risk Parity, and Reinforcement Learning Approaches on the Indian Stock Market," Papers 2305.17523, arXiv.org.
    16. Jaydip Sen & Arup Dasgupta & Subhasis Dasgupta & Sayantani Roychoudhury, 2023. "A Portfolio Rebalancing Approach for the Indian Stock Market," Papers 2310.09770, arXiv.org.
    17. Jaydip Sen & Arup Dasgupta & Partha Pratim Sengupta & Sayantani Roy Choudhury, 2023. "A Comparative Study of Portfolio Optimization Methods for the Indian Stock Market," Papers 2310.14748, arXiv.org.
    18. Jaydip Sen & Saikat Mondal & Sidra Mehtab, 2021. "Analysis of Sectoral Profitability of the Indian Stock Market Using an LSTM Regression Model," Papers 2111.04976, arXiv.org.
    19. Jaydip Sen & Ashwin Kumar R S & Geetha Joseph & Kaushik Muthukrishnan & Koushik Tulasi & Praveen Varukolu, 2022. "Precise Stock Price Prediction for Robust Portfolio Design from Selected Sectors of the Indian Stock Market," Papers 2201.05570, arXiv.org.
    20. Abhiraj Sen & Jaydip Sen, 2023. "Performance Evaluation of Equal-Weight Portfolio and Optimum Risk Portfolio on Indian Stocks," Papers 2309.13696, arXiv.org.
    21. Jaydip Sen & Abhishek Dutta, 2022. "A Comparative Study of Hierarchical Risk Parity Portfolio and Eigen Portfolio on the NIFTY 50 Stocks," Papers 2210.00984, arXiv.org.
    22. Ananda Chatterjee & Hrisav Bhowmick & Jaydip Sen, 2021. "Stock Price Prediction Using Time Series, Econometric, Machine Learning, and Deep Learning Models," Papers 2111.01137, arXiv.org.

    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. Jaydip Sen & Sidra Mehtab, 2021. "Design and Analysis of Robust Deep Learning Models for Stock Price Prediction," Papers 2106.09664, arXiv.org.
    2. Jaydip Sen & Saikat Mondal & Sidra Mehtab, 2021. "Analysis of Sectoral Profitability of the Indian Stock Market Using an LSTM Regression Model," Papers 2111.04976, arXiv.org.
    3. Sidra Mehtab & Jaydip Sen, 2020. "Stock Price Prediction Using Convolutional Neural Networks on a Multivariate Timeseries," Papers 2001.09769, arXiv.org.
    4. Jaydip Sen & Subhasis Dasgupta, 2023. "Portfolio Optimization: A Comparative Study," Papers 2307.05048, arXiv.org.
    5. Sidra Mehtab & Jaydip Sen & Abhishek Dutta, 2020. "Stock Price Prediction Using Machine Learning and LSTM-Based Deep Learning Models," Papers 2009.10819, arXiv.org.
    6. Ananda Chatterjee & Hrisav Bhowmick & Jaydip Sen, 2021. "Stock Price Prediction Using Time Series, Econometric, Machine Learning, and Deep Learning Models," Papers 2111.01137, arXiv.org.
    7. Sidra Mehtab & Jaydip Sen, 2020. "A Time Series Analysis-Based Stock Price Prediction Using Machine Learning and Deep Learning Models," Papers 2004.11697, arXiv.org, revised May 2021.
    8. Jaydip Sen & Sidra Mehtab & Abhishek Dutta & Saikat Mondal, 2022. "Precise Stock Price Prediction for Optimized Portfolio Design Using an LSTM Model," Papers 2203.01326, arXiv.org.
    9. Sidra Mehtab & Jaydip Sen & Subhasis Dasgupta, 2020. "Robust Analysis of Stock Price Time Series Using CNN and LSTM-Based Deep Learning Models," Papers 2011.08011, arXiv.org, revised Jan 2021.
    10. Jaydip Sen & Abhishek Dutta & Sidra Mehtab, 2021. "Profitability Analysis in Stock Investment Using an LSTM-Based Deep Learning Model," Papers 2104.06259, arXiv.org.
    11. Sidra Mehtab & Jaydip Sen, 2019. "A Robust Predictive Model for Stock Price Prediction Using Deep Learning and Natural Language Processing," Papers 1912.07700, arXiv.org.
    12. Jaydip Sen & Arup Dasgupta & Partha Pratim Sengupta & Sayantani Roy Choudhury, 2023. "A Comparative Study of Portfolio Optimization Methods for the Indian Stock Market," Papers 2310.14748, arXiv.org.
    13. Jaydip Sen & Ashwin Kumar R S & Geetha Joseph & Kaushik Muthukrishnan & Koushik Tulasi & Praveen Varukolu, 2022. "Precise Stock Price Prediction for Robust Portfolio Design from Selected Sectors of the Indian Stock Market," Papers 2201.05570, arXiv.org.
    14. Jaydip Sen & Abhishek Dutta, 2022. "Design and Analysis of Optimized Portfolios for Selected Sectors of the Indian Stock Market," Papers 2210.03943, arXiv.org.
    15. Jaydip Sen & Aditya Jaiswal & Anshuman Pathak & Atish Kumar Majee & Kushagra Kumar & Manas Kumar Sarkar & Soubhik Maji, 2023. "A Comparative Analysis of Portfolio Optimization Using Mean-Variance, Hierarchical Risk Parity, and Reinforcement Learning Approaches on the Indian Stock Market," Papers 2305.17523, arXiv.org.
    16. Abhiraj Sen & Jaydip Sen, 2023. "Performance Evaluation of Equal-Weight Portfolio and Optimum Risk Portfolio on Indian Stocks," Papers 2309.13696, arXiv.org.
    17. Tasnim Uddin Chowdhury & Md. Shahidul Islam, 2021. "ARIMA Time Series Analysis in Forecasting Daily Stock Price of Chittagong Stock Exchange (CSE)," International Journal of Research and Innovation in Social Science, International Journal of Research and Innovation in Social Science (IJRISS), vol. 5(6), pages 214-233, June.
    18. Andrea Bucci, 2020. "Realized Volatility Forecasting with Neural Networks," Journal of Financial Econometrics, Oxford University Press, vol. 18(3), pages 502-531.
    19. Umut Ugurlu & Ilkay Oksuz & Oktay Tas, 2018. "Electricity Price Forecasting Using Recurrent Neural Networks," Energies, MDPI, vol. 11(5), pages 1-23, May.
    20. Adebayo Oshingbesan & Eniola Ajiboye & Peruth Kamashazi & Timothy Mbaka, 2022. "Model-Free Reinforcement Learning for Asset Allocation," Papers 2209.10458, arXiv.org.

    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:2010.13891. 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.