Computer Engineering and Applications ›› 2022, Vol. 58 ›› Issue (12): 132-138.DOI: 10.3778/j.issn.1002-8331.2105-0367

• Pattern Recognition and Artificial Intelligence • Previous Articles     Next Articles

Predicting Stock Price Index Using Bagging Algorithm and GRU Model

NIU Hongli, ZHAO Yazhi   

  1. School of Economics & Management, University of Science and Technology Beijing, Beijing 100083, China
  • Online:2022-06-15 Published:2022-06-15

利用Bagging算法和GRU模型预测股票价格指数

牛红丽,赵亚枝   

  1. 北京科技大学 经济管理学院,北京 100083

Abstract: The prediction of stock price has a great significance for the regulators to find out the operation of the financial market and for the investors to avoid the risk of stock market. This paper proposes a method based on gated recurrent unit(GRU) neural network and bagging, and applies it to the research of forecasts of stock indexes. The model uses Bagging method to process the training data set, introduces randomness in the model construction process, and combines the GRU model to predict stock prices, which can ultimately reduce prediction errors and improve prediction accuracy. Through the comparison of the experimental results of the fourdata sets, it is found that:(1)The GRU model can better predict stock index data. Compared with the other two single models, it has smaller forecast errors in most cases. (2)The Bagging-GRU model has a strong predictive ability. Compared with the three benchmark models(GRU, ELM, BP), it has smaller prediction errors and higher prediction stability.

Key words: machine learning, Bagging method, Bagging and GRU prediction model

摘要: 股价预测对监管部门了解金融市场运行状况和投资者规避股市的高风险具有重要意义。提出了一种基于门控循环(gated recurrent unit,GRU)神经网络和装袋(Bagging)的方法,并将其应用于股指的预测研究。该模型通过Bagging方法处理训练数据集,在模型构建过程中引入随机性,并结合GRU模型预测股价,最终能够降低预测误差,提高预测准确性。通过4个数据集实验结果的对比发现:(1)GRU模型能够较好地预测股指数据,与另外两种单个模型相比,多数情况下具有更小的预测误差;(2)引入Bagging方法的GRU模型具有较强的预测能力,相比于三种基准模型(GRU、ELM、BP)有更小的预测误差和更高的预测稳定度。

关键词: 机器学习, Bagging方法, Bagging和GRU预测模型