IDEAS home Printed from https://ideas.repec.org/a/gam/jmathe/v11y2023i9p1985-d1130400.html
   My bibliography  Save this article

Stock Price Prediction Using CNN-BiLSTM-Attention Model

Author

Listed:
  • Jilin Zhang

    (School of Computer Science and Mathematics, Fujian University of Technology, Fuzhou 350108, China)

  • Lishi Ye

    (School of Computer Science and Mathematics, Fujian University of Technology, Fuzhou 350108, China)

  • Yongzeng Lai

    (Department of Mathematics, Wilfrid Laurier University, Waterloo, ON N2L 3C5, Canada)

Abstract

Accurate stock price prediction has an important role in stock investment. Because stock price data are characterized by high frequency, nonlinearity, and long memory, predicting stock prices precisely is challenging. Various forecasting methods have been proposed, from classical time series methods to machine-learning-based methods, such as random forest (RF), recurrent neural network (RNN), convolutional neural network (CNN), Long Short-Term Memory (LSTM) neural networks and their variants, etc. Each method can reach a certain level of accuracy but also has its limitations. In this paper, a CNN-BiLSTM-Attention-based model is proposed to boost the accuracy of predicting stock prices and indices. First, the temporal features of sequence data are extracted using a convolutional neural network (CNN) and bi-directional long and short-term memory (BiLSTM) network. Then, an attention mechanism is introduced to fit weight assignments to the information features automatically; and finally, the final prediction results are output through the dense layer. The proposed method was first used to predict the price of the Chinese stock index—the CSI300 index and was found to be more accurate than any of the other three methods—LSTM, CNN-LSTM, CNN-LSTM-Attention. In order to investigate whether the proposed model is robustly effective in predicting stock indices, three other stock indices in China and eight international stock indices were selected to test, and the robust effectiveness of the CNN-BiLSTM-Attention model in predicting stock prices was confirmed. Comparing this method with the LSTM, CNN-LSTM, and CNN-LSTM-Attention models, it is found that the accuracy of stock price prediction is highest using the CNN-BiLSTM-Attention model in almost all cases.

Suggested Citation

  • Jilin Zhang & Lishi Ye & Yongzeng Lai, 2023. "Stock Price Prediction Using CNN-BiLSTM-Attention Model," Mathematics, MDPI, vol. 11(9), pages 1-18, April.
  • Handle: RePEc:gam:jmathe:v:11:y:2023:i:9:p:1985-:d:1130400
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/2227-7390/11/9/1985/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/2227-7390/11/9/1985/
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Ying Xiang & Wen-Tsao Pan, 2022. "Using ARIMA-GARCH Model to Analyze Fluctuation Law of International Oil Price," Mathematical Problems in Engineering, Hindawi, vol. 2022, pages 1-7, March.
    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. Riaz Ud Din & Salman Ahmed & Saddam Hussain Khan, 2024. "A Novel Decision Ensemble Framework: Customized Attention-BiLSTM and XGBoost for Speculative Stock Price Forecasting," Papers 2401.11621, 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.

      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:jmathe:v:11:y:2023:i:9:p:1985-:d:1130400. 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.