CAAI Transactions on Intelligence Technology (Mar 2023)

Research on stock trend prediction method based on optimized random forest

  • Lili Yin,
  • Benling Li,
  • Peng Li,
  • Rubo Zhang

DOI
https://doi.org/10.1049/cit2.12067
Journal volume & issue
Vol. 8, no. 1
pp. 274 – 284

Abstract

Read online

Abstract As a complex hot problem in the financial field, stock trend forecasting uses a large amount of data and many related indicators; hence it is difficult to obtain sustainable and effective results only by relying on empirical analysis. Researchers in the field of machine learning have proved that random forest can form better judgements on this kind of problem, and it has an auxiliary role in the prediction of stock trend. This study uses historical trading data of four listed companies in the USA stock market, and the purpose of this study is to improve the performance of random forest model in medium‐ and long‐term stock trend prediction. This study applies the exponential smoothing method to process the initial data, calculates the relevant technical indicators as the characteristics to be selected, and proposes the D‐RF‐RS method to optimize random forest. As the random forest is an ensemble learning model and is closely related to decision tree, D‐RF‐RS method uses a decision tree to screen the importance of features, and obtains the effective strong feature set of the model as input. Then, the parameter combination of the model is optimized through random parameter search. The experimental results show that the average accuracy of random forest is increased by 0.17 after the above process optimization, which is 0.18 higher than the average accuracy of light gradient boosting machine model. Combined with the performance of the ROC curve and Precision–Recall curve, the stability of the model is also guaranteed, which further demonstrates the advantages of random forest in medium‐ and long‐term trend prediction of the stock market.

Keywords