A Comparative Analysis Study of Stock Prediction Based on Random Forest and Decision Tree

As financial markets become increasingly complex and volatile, so does the need for accurate and efficient stock forecasting models. This study expects to investigate the effectiveness and accuracy of machine learning methods in stock price forecasting. In the article, the performance of random forest algorithm and decision tree algorithm in reducing stock investment risk is systematically evaluated and compared by using the MSE, MAE and R2 score as evaluation indicators through cross-validation technology. On this basis, this paper also deeply discusses the performance differences of the two algorithms in the field of stock forecasting through hyperparameter tuning and feature importance analysis. The study found that random forest was better than decision tree in prediction accuracy. The MSE and MAE of random forest are lower, 2.605 and 1.152 respectively, and R<sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">2</sup> is closer to 1 (0.983). In contrast, the performance of decision tree model is slightly inferior, with higher MSE and MAE, 5.124 and 1.644, also a lower R2 (0.966). This conclusion that random forests are superior highlights the ability of random forests to process complex data. Although this paper has some limitations on the size of the dataset and the optimization of the model, the random forest algorithm still shows greater advantages in the comparative analysis with the decision tree algorithm in stock prediction. This study provides a reference for stock investors to choose a more accurate stock price prediction model in the future. This can effectively reduce investment risks and increase returns.

Authors

Institutions

Publication Details

Published
2024-09-23
DOI
https://doi.org/10.1109/icedcs64328.2024.00022
Citations
9
Primary Topic
Stock Market Forecasting Methods
Type
article
Field-Weighted Citation Impact
4.41
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A Comparative Analysis Study of Stock Prediction Based on Random Forest and Decision Tree

Yixiao Gu
9 citations
Stock Market Forecasting Methods
4.41
article

A Comparative Analysis Study of Stock Prediction Based on Random Forest and Decision Tree

Yixiao Gu
article en
9 citations

Abstract

As financial markets become increasingly complex and volatile, so does the need for accurate and efficient stock forecasting models. This study expects to investigate the effectiveness and accuracy of machine learning methods in stock price forecasting. In the article, the performance of random forest algorithm and decision tree algorithm in reducing stock investment risk is systematically evaluated and compared by using the MSE, MAE and R2 score as evaluation indicators through cross-validation technology. On this basis, this paper also deeply discusses the performance differences of the two algorithms in the field of stock forecasting through hyperparameter tuning and feature importance analysis. The study found that random forest was better than decision tree in prediction accuracy. The MSE and MAE of random forest are lower, 2.605 and 1.152 respectively, and R<sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">2</sup> is closer to 1 (0.983). In contrast, the performance of decision tree model is slightly inferior, with higher MSE and MAE, 5.124 and 1.644, also a lower R2 (0.966). This conclusion that random forests are superior highlights the ability of random forests to process complex data. Although this paper has some limitations on the size of the dataset and the optimization of the model, the random forest algorithm still shows greater advantages in the comparative analysis with the decision tree algorithm in stock prediction. This study provides a reference for stock investors to choose a more accurate stock price prediction model in the future. This can effectively reduce investment risks and increase returns.

University of Glasgow (GB)
Life in Land
Openalex Percentile: Top 5%
Stock Market Forecasting Methods
4.41
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.