Attention-based CNN-LSTM and XGBoost hybrid model for stock prediction
Authors:
- Zhuangwei ShiZSZhuangwei Shi
- Yang HuYHYang Hu
- Guangliang MoGMGuangliang Mo
- Jian WuJWJian Wu
Preprint
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. 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.Keywords
All Related Versions
This publication has 8 references indexed in Scilit:
- An Interpretable Double-Scale Attention Model for Enzyme Protein Class Prediction Based on Transformer Encoders and Multi-Scale ConvolutionsFrontiers in Genetics, 2022
- TLCrys: Transfer Learning Based Method for Protein Crystallization PredictionInternational Journal of Molecular Sciences, 2022
- Predicting miRNA-Disease Association Based on Neural Inductive Matrix Completion with Graph Autoencoders and Self-Attention MechanismBiomolecules, 2022
- ATTCry: Attention-based neural network model for protein crystallization predictionNeurocomputing, 2021
- A representation learning model based on variational inference and graph autoencoder for predicting lncRNA-disease associationsBMC Bioinformatics, 2021
- BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding2019
- Sequence-to-Sequence Learning as Beam-Search Optimization2016
- Time series forecasting using a hybrid ARIMA and neural network modelNeurocomputing, 2003