Optimizing Random Forest Models for Stock Market Prediction with Hyperparameter Analysis

The forecasting of financial markets is an essential practice in the assessment of risk in financial transactions and investments. Traditional statistical techniques often suffer from various issues while analyzing such financial data and the evolving structure of market data. Random Forest (RF) is one of the most powerful machine learning methods to address the issues due to its ability to handle high-dimensional features and reduce overfitting. This paper assesses the effects of the alpha parameter, a tuning parameter for controlling the number of decision trees in RF models, on prediction accuracy. We collected the stock price data from the Yahoo Finance website and further preprocessed the data using feature engineering and time series smoothing methods to better fit a model. Although RF is proved to perform well in basic cases, it suffers from a temporal dependency problem considering the time-series data where the relationship between the features is dependent on time. To overcome these disadvantages, RF is proposed to be combined with time series analyses (for instance, ARIMA, GARCH) to handle temporal components within financial data for a specific time period. We evaluate the performance of RF and show that it can handle and generalize the complex relationships between the high-dimensional data. Our experimental analysis underscores the importance of hyperparameter tuning and data preprocessing in enhancing the performance of the RF model and points to imperative areas for integrating the RF with other machine learning algorithms in enhancing financial forecasts.

Authors

Institutions

Publication Details

Published
2025-03-28
DOI
https://doi.org/10.1145/3745238.3745250
Primary Topic
Stock Market Forecasting Methods
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Optimizing Random Forest Models for Stock Market Prediction with Hyperparameter Analysis

Yicong Li
Stock Market Forecasting Methods
article

Optimizing Random Forest Models for Stock Market Prediction with Hyperparameter Analysis

Yicong Li
article en

Abstract

The forecasting of financial markets is an essential practice in the assessment of risk in financial transactions and investments. Traditional statistical techniques often suffer from various issues while analyzing such financial data and the evolving structure of market data. Random Forest (RF) is one of the most powerful machine learning methods to address the issues due to its ability to handle high-dimensional features and reduce overfitting. This paper assesses the effects of the alpha parameter, a tuning parameter for controlling the number of decision trees in RF models, on prediction accuracy. We collected the stock price data from the Yahoo Finance website and further preprocessed the data using feature engineering and time series smoothing methods to better fit a model. Although RF is proved to perform well in basic cases, it suffers from a temporal dependency problem considering the time-series data where the relationship between the features is dependent on time. To overcome these disadvantages, RF is proposed to be combined with time series analyses (for instance, ARIMA, GARCH) to handle temporal components within financial data for a specific time period. We evaluate the performance of RF and show that it can handle and generalize the complex relationships between the high-dimensional data. Our experimental analysis underscores the importance of hyperparameter tuning and data preprocessing in enhancing the performance of the RF model and points to imperative areas for integrating the RF with other machine learning algorithms in enhancing financial forecasts.

New York University (US)
Openalex Percentile: Top 78%
Stock Market Forecasting Methods
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.

Optimizing Random Forest Models for Stock Market Prediction with Hyperparameter Analysis — Yicong Li · (2025) | TGRS Research Map | TGRS