IDEAS home Printed from https://ideas.repec.org/a/hin/complx/6622927.html
   My bibliography  Save this article

A CNN-LSTM-Based Model to Forecast Stock Prices

Author

Listed:
  • Wenjie Lu
  • Jiazheng Li
  • Yifan Li
  • Aijun Sun
  • Jingyang Wang

Abstract

Stock price data have the characteristics of time series. At the same time, based on machine learning long short-term memory (LSTM) which has the advantages of analyzing relationships among time series data through its memory function, we propose a forecasting method of stock price based on CNN-LSTM. In the meanwhile, we use MLP, CNN, RNN, LSTM, CNN-RNN, and other forecasting models to predict the stock price one by one. Moreover, the forecasting results of these models are analyzed and compared. The data utilized in this research concern the daily stock prices from July 1, 1991, to August 31, 2020, including 7127 trading days. In terms of historical data, we choose eight features, including opening price, highest price, lowest price, closing price, volume, turnover, ups and downs, and change. Firstly, we adopt CNN to efficiently extract features from the data, which are the items of the previous 10 days. And then, we adopt LSTM to predict the stock price with the extracted feature data. According to the experimental results, the CNN-LSTM can provide a reliable stock price forecasting with the highest prediction accuracy. This forecasting method not only provides a new research idea for stock price forecasting but also provides practical experience for scholars to study financial time series data.

Suggested Citation

  • Wenjie Lu & Jiazheng Li & Yifan Li & Aijun Sun & Jingyang Wang, 2020. "A CNN-LSTM-Based Model to Forecast Stock Prices," Complexity, Hindawi, vol. 2020, pages 1-10, November.
  • Handle: RePEc:hin:complx:6622927
    DOI: 10.1155/2020/6622927
    as

    Download full text from publisher

    File URL: http://downloads.hindawi.com/journals/8503/2020/6622927.pdf
    Download Restriction: no

    File URL: http://downloads.hindawi.com/journals/8503/2020/6622927.xml
    Download Restriction: no

    File URL: https://libkey.io/10.1155/2020/6622927?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
    ---><---

    Citations

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


    Cited by:

    1. Ding, Lili & Zhang, Rui & Zhao, Xin, 2024. "Forecasting carbon price in China unified carbon market using a novel hybrid method with three-stage algorithm and long short-term memory neural networks," Energy, Elsevier, vol. 288(C).
    2. Parisa Foroutan & Salim Lahmiri, 2024. "Deep learning systems for forecasting the prices of crude oil and precious metals," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 10(1), pages 1-40, December.
    3. Yeh, Wei-Chang & Du, Chia-Ming & Tan, Shi-Yi & Forghani-elahabad, Majid, 2023. "Application of LSTM based on the BAT-MCS for binary-state network approximated time-dependent reliability problems," Reliability Engineering and System Safety, Elsevier, vol. 235(C).
    4. Fan Fang & Carmine Ventre & Michail Basios & Leslie Kanthan & David Martinez-Rego & Fan Wu & Lingbo Li, 2022. "Cryptocurrency trading: a comprehensive survey," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 8(1), pages 1-59, December.
    5. Cheng Zhang & Nilam Nur Amir Sjarif & Roslina Ibrahim, 2023. "Deep learning models for price forecasting of financial time series: A review of recent advancements: 2020-2022," Papers 2305.04811, arXiv.org, revised Sep 2023.
    6. Lin, Yong & Wang, Renyu & Gong, Xingyue & Jia, Guozhu, 2022. "Cross-correlation and forecast impact of public attention on USD/CNY exchange rate: Evidence from Baidu Index," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 604(C).
    7. 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.
    8. Esteban Vanegas & Andrés Mora-Valencia, 2025. "Skew Index: a machine learning forecasting approach," Risk Management, Palgrave Macmillan, vol. 27(1), pages 1-60, January.
    9. Saeed, Adnan & Li, Chaoshun & Gan, Zhenhao, 2024. "Short-term wind speed interval prediction using improved quality-driven loss based gated multi-scale convolutional sequence model," Energy, Elsevier, vol. 300(C).
    10. Barua, Ronil & Sharma, Anil K., 2022. "Dynamic Black Litterman portfolios with views derived via CNN-BiLSTM predictions," Finance Research Letters, Elsevier, vol. 49(C).
    11. Cheng, Wei & Wang, Yan & Peng, Zheng & Ren, Xiaodong & Shuai, Yubei & Zang, Shengyin & Liu, Hao & Cheng, Hao & Wu, Jiagui, 2021. "High-efficiency chaotic time series prediction based on time convolution neural network," Chaos, Solitons & Fractals, Elsevier, vol. 152(C).
    12. Yuze Lu & Hailong Zhang & Qiwen Guo, 2023. "Stock and market index prediction using Informer network," Papers 2305.14382, arXiv.org.
    13. Shrey Jain & Camille Bruckmann & Chase McDougall, 2022. "NFT Appraisal Prediction: Utilizing Search Trends, Public Market Data, Linear Regression and Recurrent Neural Networks," Papers 2204.12932, arXiv.org.
    14. Miao, Hua & Zhu, Wei & Dan, Yuanhong & Yu, Nanxiang, 2024. "Chaotic time series prediction based on multi-scale attention in a multi-agent environment," Chaos, Solitons & Fractals, Elsevier, vol. 183(C).
    15. Yuhao Zhou & Ruijie Wang & An Zeng, 2022. "Predicting the impact and publication date of individual scientists’ future papers," Scientometrics, Springer;Akadémiai Kiadó, vol. 127(4), pages 1867-1882, April.

    More about this item

    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:hin:complx:6622927. 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.

    We have no bibliographic references for this item. You can help adding them by using 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: Mohamed Abdelhakeem (email available below). General contact details of provider: https://www.hindawi.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.