Information Technology Education Journal
Vol. 4, No. 3, August (2025)

Short-Term IHSG Closing Price Prediction Using Random Forest

Hernita, Ayu (Unknown)
Oki Derajat Sudarmojo (Unknown)
Sabarudin Saputra (Unknown)
Nur Alinuddin Kaharu (Unknown)
Wildan (Unknown)



Article Info

Publish Date
28 Aug 2025

Abstract

Predicting stock market prices is challenging due to the complex and volatile nature of financial time series. This study examines the use of Random Forest Regression (RFR) to predict the closing prices of the Jakarta Composite Index (IHSG) from January 2015 to May 2025. Historical data were collected from Yahoo Finance, preprocessed, and engineered into seven predictor features, including lagged prices, moving averages, volatility measures, and a COVID-19 event indicator.The dataset was split into training and testing sets (80:20) using a time-based approach. Hyperparameters were optimized via RandomizedSearchCV with TimeSeriesSplit cross-validation. The final model achieved an RMSE of 177.55 and an R² of 0.71 on the testing set, demonstrating strong predictive performance. Feature importance analysis indicated that the previous day’s closing price (lag_1) was the most influential predictor, followed by lag_2 and MA_7.Visualizations showed that the model effectively captured major trends and turning points, with minor deviations during extreme volatility. The next-day prediction for May 23, 2025, yielded a closing price of 7145.12, indicating practical applicability for short-term investment decisions. The results highlight that Random Forest Regression is a robust and effective method for predicting financial time series, capable of handling non-linear patterns and market fluctuations

Copyrights © 2025






Journal Info

Abbrev

INTEC

Publisher

Subject

Computer Science & IT Education

Description

INTEC Journal is published by the Informatics and Computer Engineering Education Study Program at Makassar State University. INTEC Journal is published periodically three times a year, containing articles on research results and / or critical studies in the field of Informatics and Computer ...