Computer Engineering and Applications ›› 2021, Vol. 57 ›› Issue (15): 286-296.DOI: 10.3778/j.issn.1002-8331.2011-0419

Previous Articles    

Random Forest Model Stock Price Prediction Based on Pearson Feature Selection

YAN Zhengxu, QIN Chao, SONG Gang   

  1. 1.School of Finance, Shandong University of Finance and Economics, Jinan 250014, China
    2.School of Computer Science and Technology, Shandong University of Finance and Economics, Jinan 250014, China
    3.School of Mathematics, Shandong University, Jinan 250100, China
  • Online:2021-08-01 Published:2021-07-26



  1. 1.山东财经大学 金融学院,济南 250014
    2.山东财经大学 计算机科学与技术学院,济南 250014
    3.山东大学 数学学院,济南 250100


In order to better predict the trend of stocks, the problem of low prediction accuracy under a large number of features and big data is solved.In this study, a new combinational model method of random forest based on Pearson coefficient is proposed on the basis of random forest. Pearson coefficient is used for correlation test to remove irrelevant features.The improved grid search method is used to optimize the decision tree parameters. Stochastic forest is used for modeling regression prediction of residual characteristics, and a final conclusion is drawn.The experimental results show that the MAE and MSE of the improved random forest are greatly improved.Among them, the MSE value and MAE value of the improved random forest are 56% and 37.3% lower than those of the traditional random forest, and the prediction effect of the other two stocks is also improved.The new portfolio model can realize the short-term forecast regression of stock price and reduce the influence of noise on stock price forecast.This study provides effective evidence for better forecasting of stock prices and provides investors with the choice of factors influencing the stock.

Key words: Pearson coefficient, random forest, stock, predict



关键词: Pearson系数, 随机森林, 股票, 预测