ISSN 0253-2778

CN 34-1054/N

Open AccessOpen Access JUSTC Management 04 March 2024

A novel CBAMs-BiLSTM model for Chinese stock market forecasting

Cite this:
https://doi.org/10.52396/JUSTC-2023-0066
More Information
  • Author Bio:

    Chenhao Cui received his master’s degree from the University of Science and Technology of China in 2023. His research mainly focuses on the application of deep learning in time series prediction

    Yong Li is an Associate Professor at the University of Science and Technology of China (USTC). He received his Ph.D. degree from USTC in 2012. His research mainly focuses on FinTech and data mining

  • Corresponding author: E-mail: yonglee@ustc.edu.cn
  • Received Date: 16 November 2022
  • Accepted Date: 29 May 2023
  • Available Online: 04 March 2024
  • The convolutional block attention module (CBAM) has demonstrated its superiority in various prediction problems, as it effectively enhances the prediction accuracy of deep learning models. However, there has been limited research testing the effectiveness of CBAM in predicting stock indexes. To fill this gap and improve the prediction accuracy of stock indexes, we propose a novel model called CBAMs-BiLSTM, which combines multiple CBAM modules with a bidirectional long short-term memory network (BiLSTM). In this study, we employ the standard metric evaluation method (SME) and the model confidence set test (MCS) to comprehensively evaluate the superiority and robustness of our model. We utilize two representative Chinese stock index data sets, namely, the SSE Composite Index and the SZSE Composite Index, as our experimental data. The numerical results demonstrate that CBAMs-BiLSTM outperforms BiLSTM alone, achieving average reductions of 13.06%, 13.39%, and 12.48% in MAE, RMSE, and MAPE, respectively. These findings confirm that CBAM can effectively enhance the prediction accuracy of BiLSTM. Furthermore, we compare our proposed model with other popular models and examine the impact of changing data sets, prediction methods, and the size of the training set. The results consistently demonstrate the superiority and robustness of our proposed model in terms of prediction accuracy and investment returns.
    The proposed CBAMs-BiLSTM model has robustness and superiority in prediction performance.
    The convolutional block attention module (CBAM) has demonstrated its superiority in various prediction problems, as it effectively enhances the prediction accuracy of deep learning models. However, there has been limited research testing the effectiveness of CBAM in predicting stock indexes. To fill this gap and improve the prediction accuracy of stock indexes, we propose a novel model called CBAMs-BiLSTM, which combines multiple CBAM modules with a bidirectional long short-term memory network (BiLSTM). In this study, we employ the standard metric evaluation method (SME) and the model confidence set test (MCS) to comprehensively evaluate the superiority and robustness of our model. We utilize two representative Chinese stock index data sets, namely, the SSE Composite Index and the SZSE Composite Index, as our experimental data. The numerical results demonstrate that CBAMs-BiLSTM outperforms BiLSTM alone, achieving average reductions of 13.06%, 13.39%, and 12.48% in MAE, RMSE, and MAPE, respectively. These findings confirm that CBAM can effectively enhance the prediction accuracy of BiLSTM. Furthermore, we compare our proposed model with other popular models and examine the impact of changing data sets, prediction methods, and the size of the training set. The results consistently demonstrate the superiority and robustness of our proposed model in terms of prediction accuracy and investment returns.
    • The impact of the position and quantity of CBAM on the prediction performance of the stock index is analyzed.
    • A novel stock index forecasting model, CBAMs-BiLSTM, with superiority and robustness in prediction performance and simulated returns, is proposed.
    • The MCS test is introduced to measure the prediction performance of different models.

  • loading
  • [1]
    Liu H, Long Z. An improved deep learning model for predicting stock market price time series. Digital Signal Processing, 2020, 102: 102741. doi: 10.1016/j.dsp.2020.102741
    [2]
    Mokni K. A dynamic quantile regression model for the relationship between oil price and stock markets in oil-importing and oil-exporting countries. Energy, 2020, 213: 118639. doi: 10.1016/j.energy.2020.118639
    [3]
    Wang L, Ma F, Liu J, et al. Forecasting stock index volatility: New evidence from the GARCH-MIDAS model. International Journal of Forecasting, 2020, 36 (2): 684–694. doi: 10.1016/j.ijforecast.2019.08.005
    [4]
    Olaniyi S A S, Adewole K S, Jimoh R G. Stock trend prediction using regression analysis: A data mining approach. ARPN Journal of Systems and Software, 2011, 1 (4): 154–157.
    [5]
    Franses P H, Ghijsels H. Additive outliers, GARCH and forecasting volatility. International Journal of Forecasting, 1999, 15 (1): 1–9. doi: 10.1016/S0169-2070(98)00053-3
    [6]
    Mondal P, Shift L, Goswami S. Study of effectiveness of time series modeling (ARIMA) in forecasting stock indexs. International Journal of Computer Science, Engineering and Applications, 2014, 4 (2): 13–29. doi: 10.5121/ijcsea.2014.4202
    [7]
    Challa M L, Malepati V, Kolusu S N R. S&P BSE Sensex and S&P BSE IT return forecasting using ARIMA. Financial Innovation, 2020, 6: 47. doi: 10.1186/s40854-020-00201-5
    [8]
    Sarantis N. Nonlinearities, cyclical behavior and predictability in stock markets: International evidence. International Journal of Forecasting, 2001, 17 (3): 459–482. doi: 10.1016/S0169-2070(01)00093-0
    [9]
    Long J, Chen Z, He W, et al. An integrated framework of deep learning and knowledge graph for prediction of stock index trend: An application in Chinese stock exchange market. Applied Soft Computing, 2020, 91: 106205. doi: 10.1016/j.asoc.2020.106205
    [10]
    Chen Y, Wu J, Wu Z. China’s commercial bank stock index prediction using a novel K-means-LSTM hybrid approach. Expert Systems with Applications, 2022, 202: 117370. doi: 10.1016/j.eswa.2022.117370
    [11]
    Tay F E H, Cao L. Application of support vector machines in financial time series forecasting. Omega, 2001, 29 (4): 309–317. doi: 10.1016/S0305-0483(01)00026-3
    [12]
    Bishop C M. Neural networks and their applications. Review of Scientific Instruments, 1994, 65 (6): 1803–1832. doi: 10.1063/1.1144830
    [13]
    Yu Z, Qin L, Chen Y, et al. Stock index forecasting based on LLE-BP neural network model. Physica A: Statistical Mechanics and Its Applications, 2020, 553: 124197. doi: 10.1016/j.physa.2020.124197
    [14]
    Liang Y, Lin Y, Lu Q. Forecasting gold price using a novel hybrid model with ICEEMDAN and LSTM-CNN-CBAM. Expert Systems with Applications, 2022, 206: 117847. doi: 10.1016/j.eswa.2022.117847
    [15]
    Cao J, Wang J. Stock index forecasting model based on modified convolution neural network and financial time series analysis. International Journal of Communication Systems, 2019, 32 (12): e3987. doi: 10.1002/dac.3987
    [16]
    Sherstinsky A. Fundamentals of recurrent neural network (RNN) and long short-term memory (LSTM) network. Physica D: Nonlinear Phenomena, 2020, 404: 132306. doi: 10.1016/j.physd.2019.132306
    [17]
    Yu Y, Si X, Hu C, et al. A review of recurrent neural networks: LSTM cells and network architectures. Neural computation, 2019, 31 (7): 1235–1270. doi: 10.1162/neco_a_01199
    [18]
    Xu G, Meng Y, Qiu X, et al. Sentiment analysis of comment texts based on BiLSTM. IEEE Access, 2019, 7: 51522–51532. doi: 10.1109/ACCESS.2019.2909919
    [19]
    Siami-Namini S, Tavakoli N, Namin A S. The performance of LSTM and BiLSTM in forecasting time series. In: 2019 IEEE International Conference on Big Data (Big Data). Los Angeles, USA: IEEE, 2019: 3285–3292.
    [20]
    Pirani M, Thakkar P, Jivrani P, et al. A comparative analysis of ARIMA, GRU, LSTM and BiLSTM on financial time series forecasting. In: 2022 IEEE International Conference on Distributed Computing and Electrical Circuits and Electronics (ICDCECE). Ballari, India: IEEE, 2022: 1–6.
    [21]
    Lu W, Li J, Wang J, et al. A CNN-BiLSTM-AM method for stock index prediction. Neural Computing and Applications, 2021, 33 (10): 4741–4753. doi: 10.1007/s00521-020-05532-z
    [22]
    Guo Y, Mao J, Zhao M. Rolling bearing fault diagnosis method based on attention CNN and BiLSTM network. Neural Processing Letters, 2022, 55: 3377–3410. doi: 10.1007/s11063-022-11013-2
    [23]
    Cheng W, Wang Y, Peng Z, et al. High-efficiency chaotic time series prediction based on time convolution neural network. Chaos, Solitons & Fractals, 2021, 152: 111304. doi: 10.1016/j.chaos.2021.111304
    [24]
    Li J, Liu Y, Li Q. Intelligent fault diagnosis of rolling bearings under imbalanced data conditions using attention-based deep learning method. Measurement, 2022, 189: 110500. doi: 10.1016/j.measurement.2021.110500
    [25]
    Song S, Yang Z, Goh H H, et al. A novel sky image-based solar irradiance nowcasting model with convolutional block attention mechanism. Energy Reports, 2022, 8: 125–132. doi: 10.1016/j.egyr.2022.02.166
    [26]
    Li D, Liu J, Zhao Y. Prediction of multi-site PM2.5 concentrations in Beijing using CNN-Bi LSTM with CBAM. Atmosphere, 2022, 13 (10): 1719. doi: 10.3390/atmos13101719
    [27]
    Bengio Y, Courville A, Vincent P. Representation learning: A review and new perspectives. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2013, 35 (8): 1798–1828. doi: 10.1109/TPAMI.2013.50
    [28]
    Ismail Fawaz H, Forestier G, Weber J, et al. Deep learning for time series classification: A review. Data Mining and Knowledge Discovery, 2019, 33 (4): 917–963. doi: 10.1007/s10618-019-00619-1
    [29]
    Greff K, Srivastava R K, Koutník J, et al. LSTM: A search space odyssey. IEEE Transactions on Neural Networks and Learning Systems, 2016, 28 (10): 2222–2232. doi: 10.1109/TNNLS.2016.2582924
    [30]
    Huang C G, Huang H Z, Li Y F. A bidirectional LSTM prognostics method under multiple operational conditions. IEEE Transactions on Industrial Electronics, 2019, 66 (11): 8792–8802. doi: 10.1109/TIE.2019.2891463
    [31]
    Woo S, Park J, Lee J Y, et al. CBAM: Convolutional block attention module. In: Computer Vision – ECCV 2018. Cham, Switzerland: Springer, 2018: 3–19.
    [32]
    Dessain J. Machine learning models predicting returns: Why most popular performance metrics are misleading and proposal for an efficient metric. Expert Systems with Applications, 2022, 199: 116970. doi: 10.1016/j.eswa.2022.116970
    [33]
    Hansen P R, Lunde A, Nason J M. The model confidence set. Econometrica, 2011, 79 (2): 453–497. doi: 10.3982/ECTA5771
    [34]
    Masini R P, Medeiros M C, Mendes E F. Machine learning advances for time series forecasting. Journal of Economic Surveys, 2023, 37 (1): 76–111. doi: 10.1111/joes.12429
    [35]
    Liang C, Umar M, Ma F, et al. Climate policy uncertainty and world renewable energy index volatility forecasting. Technological Forecasting and Social Change, 2022, 182: 121810. doi: 10.1016/j.techfore.2022.121810
    [36]
    Vidal A, Kristjanpoller W. Gold volatility prediction using a CNN-LSTM approach. Expert Systems with Applications, 2020, 157: 113481. doi: 10.1016/j.eswa.2020.113481
    [37]
    Md A Q, Kapoor S, AV C J, et al. Novel optimization approach for stock price forecasting using multilayered sequential LSTM. Applied Soft Computing, 2023, 134: 109830. doi: 10.1016/j.asoc.2022.109830
    [38]
    Maqbool J, Aggarwal P, Kaur R, et al. Stock prediction by integrating sentiment scores of financial news and MLP-regressor: A machine learning approach. Procedia Computer Science, 2023, 218: 1067–1078. doi: 10.1016/j.procs.2023.01.086
    [39]
    Gülmez B. Stock price prediction with optimized deep LSTM network with artificial rabbits optimization algorithm. Expert Systems with Applications, 2023, 227 (C): 120346. doi: 10.1016/j.eswa.2023.120346
    [40]
    Cui X, Shang W, Jiang F, et al. Stock index forecasting by hidden Markov models with trends recognition. In: 2019 IEEE International Conference on Big Data (Big Data). Los Angeles, USA: IEEE, 2019: 5292–5297.
  • 加载中

Catalog

    Figure  1.  Structure of CBAM-BiLSTM.

    Figure  2.  Structure of LSTM and BiLSTM.

    Figure  3.  Structure of CBAM.

    Figure  4.  Two stock indexes.

    Figure  5.  Data formats.

    Figure  6.  Two modeling schemes.

    Figure  7.  Results for models with different amounts of CBAM on test sets, which are calculated based on the data without normalization.

    Figure  8.  Impact of the size of the training set on the prediction accuracy of CBAM-BiLSTM.

    [1]
    Liu H, Long Z. An improved deep learning model for predicting stock market price time series. Digital Signal Processing, 2020, 102: 102741. doi: 10.1016/j.dsp.2020.102741
    [2]
    Mokni K. A dynamic quantile regression model for the relationship between oil price and stock markets in oil-importing and oil-exporting countries. Energy, 2020, 213: 118639. doi: 10.1016/j.energy.2020.118639
    [3]
    Wang L, Ma F, Liu J, et al. Forecasting stock index volatility: New evidence from the GARCH-MIDAS model. International Journal of Forecasting, 2020, 36 (2): 684–694. doi: 10.1016/j.ijforecast.2019.08.005
    [4]
    Olaniyi S A S, Adewole K S, Jimoh R G. Stock trend prediction using regression analysis: A data mining approach. ARPN Journal of Systems and Software, 2011, 1 (4): 154–157.
    [5]
    Franses P H, Ghijsels H. Additive outliers, GARCH and forecasting volatility. International Journal of Forecasting, 1999, 15 (1): 1–9. doi: 10.1016/S0169-2070(98)00053-3
    [6]
    Mondal P, Shift L, Goswami S. Study of effectiveness of time series modeling (ARIMA) in forecasting stock indexs. International Journal of Computer Science, Engineering and Applications, 2014, 4 (2): 13–29. doi: 10.5121/ijcsea.2014.4202
    [7]
    Challa M L, Malepati V, Kolusu S N R. S&P BSE Sensex and S&P BSE IT return forecasting using ARIMA. Financial Innovation, 2020, 6: 47. doi: 10.1186/s40854-020-00201-5
    [8]
    Sarantis N. Nonlinearities, cyclical behavior and predictability in stock markets: International evidence. International Journal of Forecasting, 2001, 17 (3): 459–482. doi: 10.1016/S0169-2070(01)00093-0
    [9]
    Long J, Chen Z, He W, et al. An integrated framework of deep learning and knowledge graph for prediction of stock index trend: An application in Chinese stock exchange market. Applied Soft Computing, 2020, 91: 106205. doi: 10.1016/j.asoc.2020.106205
    [10]
    Chen Y, Wu J, Wu Z. China’s commercial bank stock index prediction using a novel K-means-LSTM hybrid approach. Expert Systems with Applications, 2022, 202: 117370. doi: 10.1016/j.eswa.2022.117370
    [11]
    Tay F E H, Cao L. Application of support vector machines in financial time series forecasting. Omega, 2001, 29 (4): 309–317. doi: 10.1016/S0305-0483(01)00026-3
    [12]
    Bishop C M. Neural networks and their applications. Review of Scientific Instruments, 1994, 65 (6): 1803–1832. doi: 10.1063/1.1144830
    [13]
    Yu Z, Qin L, Chen Y, et al. Stock index forecasting based on LLE-BP neural network model. Physica A: Statistical Mechanics and Its Applications, 2020, 553: 124197. doi: 10.1016/j.physa.2020.124197
    [14]
    Liang Y, Lin Y, Lu Q. Forecasting gold price using a novel hybrid model with ICEEMDAN and LSTM-CNN-CBAM. Expert Systems with Applications, 2022, 206: 117847. doi: 10.1016/j.eswa.2022.117847
    [15]
    Cao J, Wang J. Stock index forecasting model based on modified convolution neural network and financial time series analysis. International Journal of Communication Systems, 2019, 32 (12): e3987. doi: 10.1002/dac.3987
    [16]
    Sherstinsky A. Fundamentals of recurrent neural network (RNN) and long short-term memory (LSTM) network. Physica D: Nonlinear Phenomena, 2020, 404: 132306. doi: 10.1016/j.physd.2019.132306
    [17]
    Yu Y, Si X, Hu C, et al. A review of recurrent neural networks: LSTM cells and network architectures. Neural computation, 2019, 31 (7): 1235–1270. doi: 10.1162/neco_a_01199
    [18]
    Xu G, Meng Y, Qiu X, et al. Sentiment analysis of comment texts based on BiLSTM. IEEE Access, 2019, 7: 51522–51532. doi: 10.1109/ACCESS.2019.2909919
    [19]
    Siami-Namini S, Tavakoli N, Namin A S. The performance of LSTM and BiLSTM in forecasting time series. In: 2019 IEEE International Conference on Big Data (Big Data). Los Angeles, USA: IEEE, 2019: 3285–3292.
    [20]
    Pirani M, Thakkar P, Jivrani P, et al. A comparative analysis of ARIMA, GRU, LSTM and BiLSTM on financial time series forecasting. In: 2022 IEEE International Conference on Distributed Computing and Electrical Circuits and Electronics (ICDCECE). Ballari, India: IEEE, 2022: 1–6.
    [21]
    Lu W, Li J, Wang J, et al. A CNN-BiLSTM-AM method for stock index prediction. Neural Computing and Applications, 2021, 33 (10): 4741–4753. doi: 10.1007/s00521-020-05532-z
    [22]
    Guo Y, Mao J, Zhao M. Rolling bearing fault diagnosis method based on attention CNN and BiLSTM network. Neural Processing Letters, 2022, 55: 3377–3410. doi: 10.1007/s11063-022-11013-2
    [23]
    Cheng W, Wang Y, Peng Z, et al. High-efficiency chaotic time series prediction based on time convolution neural network. Chaos, Solitons & Fractals, 2021, 152: 111304. doi: 10.1016/j.chaos.2021.111304
    [24]
    Li J, Liu Y, Li Q. Intelligent fault diagnosis of rolling bearings under imbalanced data conditions using attention-based deep learning method. Measurement, 2022, 189: 110500. doi: 10.1016/j.measurement.2021.110500
    [25]
    Song S, Yang Z, Goh H H, et al. A novel sky image-based solar irradiance nowcasting model with convolutional block attention mechanism. Energy Reports, 2022, 8: 125–132. doi: 10.1016/j.egyr.2022.02.166
    [26]
    Li D, Liu J, Zhao Y. Prediction of multi-site PM2.5 concentrations in Beijing using CNN-Bi LSTM with CBAM. Atmosphere, 2022, 13 (10): 1719. doi: 10.3390/atmos13101719
    [27]
    Bengio Y, Courville A, Vincent P. Representation learning: A review and new perspectives. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2013, 35 (8): 1798–1828. doi: 10.1109/TPAMI.2013.50
    [28]
    Ismail Fawaz H, Forestier G, Weber J, et al. Deep learning for time series classification: A review. Data Mining and Knowledge Discovery, 2019, 33 (4): 917–963. doi: 10.1007/s10618-019-00619-1
    [29]
    Greff K, Srivastava R K, Koutník J, et al. LSTM: A search space odyssey. IEEE Transactions on Neural Networks and Learning Systems, 2016, 28 (10): 2222–2232. doi: 10.1109/TNNLS.2016.2582924
    [30]
    Huang C G, Huang H Z, Li Y F. A bidirectional LSTM prognostics method under multiple operational conditions. IEEE Transactions on Industrial Electronics, 2019, 66 (11): 8792–8802. doi: 10.1109/TIE.2019.2891463
    [31]
    Woo S, Park J, Lee J Y, et al. CBAM: Convolutional block attention module. In: Computer Vision – ECCV 2018. Cham, Switzerland: Springer, 2018: 3–19.
    [32]
    Dessain J. Machine learning models predicting returns: Why most popular performance metrics are misleading and proposal for an efficient metric. Expert Systems with Applications, 2022, 199: 116970. doi: 10.1016/j.eswa.2022.116970
    [33]
    Hansen P R, Lunde A, Nason J M. The model confidence set. Econometrica, 2011, 79 (2): 453–497. doi: 10.3982/ECTA5771
    [34]
    Masini R P, Medeiros M C, Mendes E F. Machine learning advances for time series forecasting. Journal of Economic Surveys, 2023, 37 (1): 76–111. doi: 10.1111/joes.12429
    [35]
    Liang C, Umar M, Ma F, et al. Climate policy uncertainty and world renewable energy index volatility forecasting. Technological Forecasting and Social Change, 2022, 182: 121810. doi: 10.1016/j.techfore.2022.121810
    [36]
    Vidal A, Kristjanpoller W. Gold volatility prediction using a CNN-LSTM approach. Expert Systems with Applications, 2020, 157: 113481. doi: 10.1016/j.eswa.2020.113481
    [37]
    Md A Q, Kapoor S, AV C J, et al. Novel optimization approach for stock price forecasting using multilayered sequential LSTM. Applied Soft Computing, 2023, 134: 109830. doi: 10.1016/j.asoc.2022.109830
    [38]
    Maqbool J, Aggarwal P, Kaur R, et al. Stock prediction by integrating sentiment scores of financial news and MLP-regressor: A machine learning approach. Procedia Computer Science, 2023, 218: 1067–1078. doi: 10.1016/j.procs.2023.01.086
    [39]
    Gülmez B. Stock price prediction with optimized deep LSTM network with artificial rabbits optimization algorithm. Expert Systems with Applications, 2023, 227 (C): 120346. doi: 10.1016/j.eswa.2023.120346
    [40]
    Cui X, Shang W, Jiang F, et al. Stock index forecasting by hidden Markov models with trends recognition. In: 2019 IEEE International Conference on Big Data (Big Data). Los Angeles, USA: IEEE, 2019: 5292–5297.

    Article Metrics

    Article views (267) PDF downloads(687)
    Proportional views

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return