PERBANDINGAN ALGORITMA XGBOOST DAN RANDOM FOREST DALAM PERAMALAN HARGA EMAS ANTAM MENGGUNAKAN INDIKATOR TEKNIKAL
DOI:
https://doi.org/10.5281/zenodo.20742370Keywords:
Antam gold price, forecasting, Random Forest, technical indicators, XGBoostAbstract
Gold is a widely used investment instrument due to its characteristics as a store of value and a hedge. However, gold prices are volatile, necessitating a forecasting approach that can help predict future price movement trends. This study aims to compare the performance of the XGBoost and Random Forest algorithms in forecasting Antam gold prices using technical indicators. The data used is historical Antam gold price data for the 2020–2025 period with 2,048 observations. Predictor features are formed through a feature engineering process based on historical price data, including close, lag price, Exponential Moving Average (EMA), Relative Strength Index (RSI), Moving Average Convergence Divergence (MACD), and daily return. The prediction target used is the Antam gold price one day ahead or T+1. Model evaluation is carried out using the Walk Forward Validation scheme so that the testing process maintains the time sequence in the time series data. Model performance is measured using Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and Mean Absolute Percentage Error (MAPE). The results showed that Random Forest achieved the best performance with an RMSE of 21,503.71, an MAE of 15,020.22, and a MAPE of 0.780%. Meanwhile, XGBoost obtained an RMSE of 23,896.92, an MAE of 16,940.59, and a MAPE of 0.878%. These results indicate that Random Forest is superior to XGBoost in forecasting Antam gold prices in this research scenario. Feature importance analysis shows that the close feature, EMA 21, and EMA 9 are the most influential features on the prediction results.
Downloads
References
Ashwini, K. (2025). Gold price analysis and forecasting using a machine learning approach. Advances in Economics, Business and Management Research.
Cohen, G., & Aiche, A. (2023). Forecasting gold price using machine learning methodologies. Chaos, Solitons & Fractals, 175, 114079. https://doi.org/10.1016/j.chaos.2023.114079
Hisyam, M., Fitri, Z., & Aidilof, H. A. K. (2025). Implementasi algoritma XGBoost dengan Walk Forward Validation untuk prediksi harga emas Antam. Jurnal Riset Komputer (JURIKOM), 12(4), 403–413. https://doi.org/10.30865/jurikom.v12i4.8693
Lambang, R. T. P. H. (2026). Indonesian gold price forecasting using simple and stacked LSTM with expanding window time series cross-validation. Journal of Applied Informatics and Computing.
Li, Y. (2025). Predicting the gold price based on XGBoost. Proceedings of the International Conference on Economic Management and Green Development.
Magui, A., Elsiefy, E., & Bahaa, M. (2023). The impact of technical analysis on investors’ financial decisions in an emerging market: Evidence from the Egyptian stock market. American Journal of Industrial and Business Management, 13(10), 1123–1151. https://doi.org/10.4236/ajibm.2023.1310063
Madhika, Y. R., & Mulyana, A. (2023). Gold price prediction using the ARIMA and LSTM models. Sinkron: Jurnal dan Penelitian Teknik Informatika.
Mohamad, R., Rasyid, A. K., Pambudi, A., & Santoso, B. (2025). Penerapan metode Triple Exponential Smoothing untuk prediksi harga emas: Studi kasus pada PT. Aneka Tambang. Journal of Information System Management, 6(2).
Quang, P. D. (2025). Forecasting gold price using a SARIMA-LSTM approach with Random Forest technique. Cogent Economics & Finance. https://doi.org/10.1080/23322039.2025.2568969
Rahmansyah, I. C., & Rani, L. N. (2021). Gold price, inflation, and dollar exchange rate: The case of gold investment in Indonesia. Indonesian Capital Market Review, 13(1). https://doi.org/10.21002/icmr.v13i1.13238
Sinambela, R. S., Ula, M., & Ulva, A. F. (2024). Prediksi harga emas menggunakan algoritma regresi linear berganda dan Support Vector Machine (SVM). Jurnal Sistem dan Teknologi Informasi, 12(2), 253. https://doi.org/10.26418/justin.v12i2.73386
Tanudy, C., Handhayani, T., & Hendryli, J. (2023). Prediksi harga emas di Indonesia menggunakan Gated Recurrent Unit.
Wahyuddin, E. P., Caraka, R. E., Kurniawan, R., Caesarendra, W., Gio, P. U., & Pardamean, B. (2025). Improved LSTM hyperparameters alongside sentiment walk-forward validation for time series prediction. Journal of Open Innovation: Technology, Market, and Complexity, 11(1). https://doi.org/10.1016/j.joitmc.2024.100458
Yuliana, A. F., & Robiyanto, R. (2021). Peran emas sebagai safe haven bagi saham pertambangan di Indonesia pada periode pandemi COVID-19. Jurnal Ilmiah Bisnis dan Ekonomi Asia, 15(1), 1–11.
