Attention-based CNN-LSTM and XGBoost hybrid model for stock prediction

Zhuangwei Shi, Yang Hu, Guangliang Mo, Jian Wu
4/6/2022
q-fin.STcs.LG

Official code: zshicode/Attention-CLX-stock-prediction (443 stars, Python, last commit 2022-04-09).

Abstract

Stock market plays an important role in the economic development. Due to the complex volatility of the stock market, the research and prediction on the change of the stock price, can avoid the risk for the investors.

Show full abstract

The traditional time series model ARIMA can not describe the nonlinearity, and can not achieve satisfactory results in the stock prediction. As neural networks are with strong nonlinear generalization ability, this paper proposes an attention-based CNN-LSTM and XGBoost hybrid model to predict the stock price. The model constructed in this paper integrates the time series model, the Convolutional Neural Networks with Attention mechanism, the Long Short-Term Memory network, and XGBoost regressor in a non-linear relationship, and improves the prediction accuracy. The model can fully mine the historical information of the stock market in multiple periods. The stock data is first preprocessed through ARIMA. Then, the deep learning architecture formed in pretraining-finetuning framework is adopted. The pre-training model is the Attention-based CNN-LSTM model based on sequence-to-sequence framework. The model first uses convolution to extract the deep features of the original stock data, and then uses the Long Short-Term Memory networks to mine the long-term time series features. Finally, the XGBoost model is adopted for fine-tuning. The results show that the hybrid model is more effective and the prediction accuracy is relatively high, which can help investors or institutions to make decisions and achieve the purpose of expanding return and avoiding risk. Source code is available at https://github.com/zshicode/Attention-CLX-stock-prediction.

View on arXivView PDF

Code Implementations(1)

Attention-based CNN-LSTM and XGBoost hybrid model for stock prediction

44398PythonApr 4, 20224 years ago

Similar Papers

Cite this paper

@article{shi2022attentionbased,
  title  = {Attention-based CNN-LSTM and XGBoost hybrid model for stock prediction},
  author = {Zhuangwei Shi and Yang Hu and Guangliang Mo and Jian Wu},
  year   = {2022},
  eprint = {2204.02623},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2204.02623}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2204.02623.svg)](https://codeofpaper.com/paper/2204.02623)

Discussion