CNN-BiLSTM-Attention Based Stock Price Prediction and Quantitative Investment Strategy

Authors

  • Chunzhong Li
  • Weiqi Hua

DOI:

https://doi.org/10.54097/jxs44k42

Keywords:

Stock price prediction, Quantitative trading, XGBoost multifactor stock picking, Deep learning

Abstract

With the rapid development of technology and the increasing maturity of financial markets, stock price prediction has become a hot topic and an important trend in the financial field. However, the stock market has complexity and volatility, in order to reduce the investment risk and ensure the maximization of benefits, selecting the optimal stock to predict the stock price and formulating the quantitative trading strategy are extremely important issues for financial academics and investors. For the research of stock price prediction and quantitative trading, firstly, the quantitative stock selection model combining XGBoost and multi-factor stock selection model is constructed, and four stocks are screened out, and then the CNN-BiLSTM-Attention model is proposed to predict the stock price trend of the selected stocks, and it is found from the prediction results of the four stocks that the prediction accuracies all reach more than 95%, which is higher than that of the single model prediction. accuracy and passed the validity test of the fitted model. Secondly, based on the quantitative investment portfolio given in the above analysis and the quantitative stock trading strategy of MACD, the prediction results are verified, and the total return of most stocks based on the strategy is higher than 40% at the highest, and the loss is controlled within 10%, which indicates that the trading strategy in this paper is effective and feasible. The study concludes that greater returns can be obtained by calculating the total returns of stock portfolios based on different portfolio approaches.

Downloads

Download data is not yet available.

References

[1] Box G E P, Jenkins G M. Time Series Analysis: Forecasting and Control [M]. San Francisco: Holden-Day, 1970.

[2] Ariyo A A, Adewumi A O, Ayo C K. Stock Price Prediction Using the ARIMAModel [C]//2014 UKSim-AMSS 16th Intemational Conference on ComputerModelling and Simulation. IEEE, 2014:106-112.

[3] Wen F, Xiao J, Zhifang H E, et al. Stock Price Prediction Based on SSA and SVM [J]. Procedia Computer Science, 2014, 31: 625-631.

[4] Lahmiri S. Minute-ahead stock price forecasting based on singular spectrum analysis and support vector regression [J]. Applied Mathematics and Computation, 2018, 320: 444-451.

[5] Md A Q, Kapoor S, AV C J, et al. Novel optimization approach for stock price forecasting using multi-layered sequential LSTM [J]. Applied Soft Computing, 2023, 134: 109830.

[6] Ren S, Wang X, Zhou X, et al. A novel hybrid model for stock price forecasting integrating encoder forest and informer [J]. Expert Systems with Applications, 2023, 234: 121080.

[7] Long W, Gao J, Bai K, et al. A hybrid model for stock price prediction based on multi-view heterogeneous data [J]. Financial Innovation, 2024, 10(1): 48.

[8] BREIMAN L. Random Forests [J]. Machine Learning, 2001,45(1):5-32.

[9] Iranzad R, Liu X. A review of random forest-based feature selection methods for data science education and applications [J]. International Journal of Data Science and Analytics, 2024: 1-15.

[10] CHEN T, GUESTRIN C. XGBoost: A scalable tree boosting svstem [C]//In proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. ACM, 2016: 785-794.

[11] Niazkar M, Menapace A, Brentan B, et al. Applications of XGBoost in water resources engineering: A systematic literature review (Dec 2018–May 2023) [J]. Environmental Modelling & Software, 2024: 105971.

[12] Joshi A, Vishnu C, Mohan C K, et al. Application of XGBoost model for early prediction of earthquake magnitude from waveform data [J]. Journal of Earth System Science, 2023, 133(1): 5.

[13] Kang M. Stock Price Prediction with Heavy-Tailed Distribution Time-Series Generation Based on WGAN-BiLSTM [J]. Computational Economics, 2024: 1-20.

[14] Bukhari A H, Raja M A Z, Sulaiman M, et al. Fractional Neuro-se⁃quential ARFIMA-LSTM for Financial Market Forecasting [J]. IEEE Access,2020,(8).

[15] Khetarpal P, Nagpal N, Siano P, et al. Power quality disturbance signal segmentation and classification based on modified BI‐LSTM with double attention mechanism [J]. IET Generation, Transmission & Distribution, 2024, 18(1): 50-62.

[16] Ye Z, Zuo T, Chen W, et al. Textual emotion recognition method based on ALBERT-BiLSTM model and SVM-NB classification [J]. Soft Computing, 2023, 27(8): 5063-5075.

[17] Thumilvannan S, Balamanigandan R. A novel adaptive weight bi-directional long short-term memory (AWBi-LSTM) classifier model for heart stroke risk level prediction in IoT [J]. PeerJ Computer Science, 2024, 10: e2196.

[18] Li H, Wu X J. CrossFuse: A novel cross attention mechanism based infrared and visible image fusion approach [J]. Information Fusion, 2024, 103: 102147.

[19] Agudelo Aguirre A A, Duque Méndez N D, Rojas Medina R A. Artificial intelligence applied to investment in variable income through the MACD (moving average convergence/divergence) indicator [J]. Journal of Economics, Finance and Administrative Science, 2021, 26(52): 268-281.

[20] Yang X, Liu W, Zhou D, et al. Qlib: An AI-oriented Quantitative Investment Platform [J]. arXiv preprint arXiv:2009.11189, 2020.

Downloads

Published

30-09-2024

Issue

Section

Articles

How to Cite

Li, C., & Hua, W. (2024). CNN-BiLSTM-Attention Based Stock Price Prediction and Quantitative Investment Strategy. Frontiers in Business, Economics and Management, 16(3), 76-84. https://doi.org/10.54097/jxs44k42