Time: 2022-01-10 | Counts: |
doi:10.16186/j.cnki.1673-9787.2019100021
Received:2020/08/10
Revised:2020/12/02
Published:2022/01/10
Stock price prediction based on RF-LSTM combination model
LI Hui1, HUA Jinjin2, ZOU Borong1
1.School of Physics and Electronic Information Engineering, Henan Polytechnic University, Jiaozuo 454000 , Henan, China;2.School of Electrical Engineering and Automation, Henan Polytechnic University, Jiaozuo 454000 , Henan, China
Abstract: Stock data is characterized by non-linear complexity,and a single model has poor prediction results.Aiming to the above problems,RF-LSTM combination model was proposed to predict the closing price of stocks.First,the Tushare financial data package was used to obtain stock data,the feature sets were built and the data was normalized.Secondly,considering the high non-linearity and information redundancy between multiple features,the random forest(RF) was used to select the optimal feature sets and to reduce the dimension of data and the complexity of training.Then,the long-short term memory(LSTM) ,which was suitable for processing time series in deep learning,was used to predict stock prices and to optimize the parameters of the prediction model.The experimental results showed that compared with the single structure LSTM neural network model,the mean absolute error(MAE) ,mean square error(MSE) and root mean square error(RMSE) of the combined RF-LSTM model were reduced by 13.11% ,6.70% ,and 12.54% respectively.The combination model could increase the predicton accuracy of stockprice.
Key words:stockprice prediction;machine learning;long-short term memory;random forest