Implementasi Ensemble Learning untuk Multi-Step Time Series Forecasting Harga Bitcoin dan Emas Menggunakan XGBoost, Gradient Boosting dan Random forest
DOI:
https://doi.org/10.62712/juktisi.v5i2.1303Keywords:
Ensemble Learning, Time Series Forecasting, Bitcoin, Emas, Random Forest, XGBoost, Gradient BoostingAbstract
Prediksi harga aset keuangan seperti Bitcoin dan emas merupakan salah satu tantangan dalam analisis data keuangan karena pergerakannya yang dinamis dan sulit diprediksi. Penelitian ini mengimplementasikan metode ensemble learning yang terdiri dari Random Forest, Gradient Boosting, dan XGBoost untuk memprediksi harga Bitcoin dan emas menggunakan pendekatan multi-step time series forecasting. Dataset diperoleh dari Yahoo Finance untuk periode 2021–2026 dan diproses menggunakan 59 fitur teknikal yang mencakup indikator momentum, volatilitas, tren, dan pola candlestick. Target regresi ditransformasikan ke dalam bentuk log-return untuk meningkatkan stabilitas model terhadap pergeseran skala harga (distribution shift), sementara arah pergerakan harga diprediksi menggunakan model klasifikasi biner. Hasil pengujian menunjukkan bahwa Random Forest menghasilkan performa regresi terbaik pada kedua aset. Pada data Bitcoin diperoleh MAE sebesar 1.541,79, RMSE sebesar 2.130,74, MAPE sebesar 1,6850%, dan R² sebesar 0,9858. Pada data emas diperoleh MAE sebesar 55,64, RMSE sebesar 83,58, MAPE sebesar 1,2957%, dan R² sebesar 0,9825. Untuk klasifikasi arah pergerakan harga, Gradient Boosting menghasilkan akurasi tertinggi pada Bitcoin sebesar 50,00%, sedangkan Random Forest menghasilkan akurasi terbaik pada emas sebesar 53,75% dengan Recall sebesar 71,01%. Selain itu, dilakukan simulasi prediksi harga 7 hari ke depan menggunakan pendekatan recursive forecasting.
Downloads
References
[1] S. Nakamoto, "Bitcoin: A Peer-to-Peer Electronic Cash System," 2008. [Online]. Available: https://bitcoin.org/bitcoin.pdf
[2] G. E. P. Box, G. M. Jenkins, G. C. Reinsel, and G. M. Ljung, Time Series Analysis: Forecasting and Control, 5th ed. Hoboken, NJ: Wiley, 2015, ISBN: 978-1-118-67502-1.
[3] J. Chen, "Analysis of Bitcoin Price Prediction Using Machine Learning," Journal of Risk and Financial Management, vol. 16, no. 1, p. 51, 2023, doi: 10.3390/jrfm16010051.
[4] A. Bouteska, M. Z. Abedin, P. Hajek, and K. Yuan, "Cryptocurrency price forecasting: a comparative analysis of ensemble learning and deep learning methods," International Review of Financial Analysis, vol. 92, p. 103055, 2024, doi: 10.1016/j.irfa.2023.103055.
[5] L. Breiman, "Random Forests," Machine Learning, vol. 45, no. 1, pp. 5–32, 2001, doi: 10.1023/A:1010933404324.
[6] J. H. Friedman, "Greedy function approximation: A gradient boosting machine," The Annals of Statistics, vol. 29, no. 5, pp. 1189–1232, 2001, doi: 10.1214/aos/1013203451.
[7] T. Chen and C. Guestrin, "XGBoost: A Scalable Tree Boosting System," in Proc. 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, New York, NY: ACM, 2016, pp. 785–794, doi: 10.1145/2939672.2939785.
[8] Y. Peng, H. N. Kanani, and N. Sanjari, "Ensemble Machine Learning Models for Forecasting Cryptocurrency Price," Applied Soft Computing, vol. 103, p. 107123, 2021, doi: 10.1016/j.asoc.2021.107123.
[9] M. A. Naeem, J. Fronzetti Colladon, and M. W. Murad, "Machine Learning for Cryptocurrencies: A Systematic Review," Expert Systems with Applications, vol. 213, p. 119025, 2023, doi: 10.1016/j.eswa.2022.119025.
[10] K. Murray, A. Rossi, D. Carraro, and A. Visentin, "On forecasting cryptocurrency prices: A comparison of machine learning, deep learning, and ensembles," Forecasting, vol. 5, no. 1, pp. 196–209, 2023, doi: 10.3390/forecast5010010.
[11] M. F. Rizkilloh and S. Widiyanesti, "Prediksi Harga Cryptocurrency Menggunakan Algoritma Long Short Term Memory (LSTM)," Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi), vol. 6, no. 1, pp. 25–31, 2022, doi: 10.29207/resti.v6i1.3630.
[12] F. A. R. Aldi and N. D. Nathasia, "Prediksi Harga dan Kinerja Aset Bitcoin Menggunakan Algoritma Long Short-Term Memory," Jurnal Fasilkom, vol. 15, no. 1, pp. 68–76, 2025, doi: 10.37905/jfk.v15i1.
[13] A . S. Riyadi et al., "Aplikasi Perbandingan Prediksi Harga Bitcoin Menggunakan Deep Learning Dengan Metode ARIMA, SARIMA, LSTM dan Gradient Boosting Regressor," Seminar Nasional Teknologi Informasi dan Komunikasi STI&K, vol. 7, no. 1, pp. 192–199, 2023.
[14] E. Aurelio Matra, "Implementasi Metode Random Forest dan XGBoost untuk Memprediksi Arah Harga Penutupan pada Cryptocurrency Bitcoin," Skripsi, Institut Pertanian Bogor, Bogor, 2024.
[15] I. E. Livieris, E. Pintelas, and P. Pintelas, "A CNN–LSTM model for gold price time-series forecasting," Neural Computing and Applications, vol. 32, no. 23, pp. 17351–17360, 2020, doi: 10.1007/s00521-020-04867-x.
[16] G. Cohen and A. Aiche, "Forecasting gold price using machine learning methodologies," Chaos, Solitons & Fractals, vol. 175, p. 114079, 2023, doi: 10.1016/j.chaos.2023.114079.
[17] P. L. Seabe, M. Moutsinga, and E. Pindza, "Sentiment-based bitcoin price prediction using hybrid deep learning models," Social Network Analysis and Mining, vol. 15, no. 1, p. 35, 2025, doi: 10.1007/s13278-025-01433-4.
[18] S. Saadah and H. Salsabila, "Prediksi Harga Bitcoin Menggunakan Metode Random Forest (Studi Kasus: Data Acak Pada Masa Pandemic Covid-19)," Jurnal Komputer Terapan, vol. 7, no. 1, pp. 24–32, 2021, doi: 10.35143/jkt.v7i1.4618.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Leo Kanda Prayoga, Deasy Purwaningtias, Ali Mustopa

This work is licensed under a Creative Commons Attribution 4.0 International License.















