Klasifikasi Arah Tren Harga Bitcoin Menggunakan Metode Ensemble Learning Random Forest

Main Article Content

Fadhlan Subhan Fadilah
Indra Yustiana
Nugraha

Abstract

Bitcoin's extreme price volatility poses significant challenges for investors and traders in making informed investment decisions. Conventional technical analysis approaches are often subjective and unable to capture complex market dynamics accurately. This study aims to develop a Bitcoin price trend direction classification system as a more objective technical analysis tool using the Random Forest ensemble learning method. Historical Bitcoin price data from January 2017 to March 2026 with an H1 (1-hour) timeframe was obtained from MetaTrader 5 and Binance. Raw price data (Open, High, Low, Close, Volume) were processed through preprocessing stages and converted into 106 technical indicator features grouped into nine categories, including Trend Indicators, Momentum Oscillators, Volatility Features, and Rolling Statistics. The Random Forest Classifier model was built and optimized through hyperparameter tuning with time-series cross-validation, then evaluated using standard classification metrics as well as trading metrics under scenarios employing a trailing stop mechanism. The results show that the model achieved an accuracy of 58.65%, precision of 41.38%, recall of 99.50%, and F1-score of 0.5856. Although the low AUC-ROC value (0.5106) indicates the model can hardly distinguish between the two classes individually, the backtest generated significant trading performance with a net profit of 8,491 USD from an initial capital of 10,000 USD, a win rate of 45.08%, and a profit factor of 1.30. Feature importance analysis identified RSI_14_std_168 (3.77%), SMA_200 (3.03%), and ATR_pct_14_mean_168 (2.92%) as the three most influential technical indicators. This study concludes that although standard classification accuracy is limited, the Random Forest model combined with probability threshold optimization and risk management strategies can serve as a beneficial technical analysis tool. The system has been implemented as an interactive web dashboard providing real-time prediction features.

Article Details

Section
Articles

References

S. Nakamoto, "Bitcoin: A Peer-to-Peer Electronic Cash System," 2008.

S. Urgenc and B. Asikgil, "Bitcoin Trend Reversal Prediction with Tree-Based Ensemble Machine Learning," Turkish Journal of Forecasting, vol. 8, no. 1, pp. 13-22, 2024.

C. Hung, J. F. Wijaya, Victor, I. A. Pardosi, and F. M. Sinaga, "Prediksi Fluktuasi Harga Bitcoin Dengan Menggunakan Random Forest Classifier," Jurnal Sifo Mikroskil, vol. 24, no. 2, pp. 95-108, Oct. 2023.

Hafid, L. Kong, M. Rahouti, M. Ebrahim, M. A. Serhani, and M. Aledhari, "Predicting Market Trends with Enhanced Technical Indicator Integration and Classification Models," 2024.

E. de O. Carosia, "Using Sentiment and Technical Analysis to Predict Bitcoin with Machine Learning," 2024.

H. Awwaluddin, T. Tamrin, and N. A. Widiastuti, "Comparison of Accuracy of Linear Regression and Random Forest Models in Predicting Bitcoin Prices," Journal of Dinda, vol. 5, no. 2, pp. 220-229, Aug. 2025.

N. S. S. K. Balijepalli and V. Thangaraj, "Prediction of cryptocurrency's price using ensemble machine learning algorithms," European Journal of Management and Business Economics, 2024.

D. N. R. Nolejanduma and M. Rahardi, "Comparative Analysis of LightGBM and Random Forest for Daily Bitcoin Closing Price Prediction," Journal of Applied Informatics and Computing, vol. 9, no. 5, pp. 2102-2109, Oct. 2025.

Q. Yang, "Blending Ensemble for Classification with Genetic-algorithm generated Alpha factors and Sentiments (GAS)," Nov. 2024.

D. Máté, H. Raza, I. Ahmad, and S. Kovács, "Next step for bitcoin: Confluence of technical indicators and machine learning," Journal of International Studies, vol. 17, no. 3, pp. 68-94, 2024.

K. Öktem and A. Tekerek, "Bitcoin Price Direction Prediction Using Machine Learning on a Very Small Dataset," Journal of Polytechnic, vol. 28, no. 6, pp. 1731-1742, 2025.

Annisa, "Comparative Analysis of Machine Learning and Deep Learning Models for Cryptocurrency Price Prediction," INJURATECH, vol. 4, no. 2, pp. 276-286, 2024.

P. L. Seabe, C. R. B. Moutsinga, and E. Pindza, "Forecasting Cryptocurrency Prices Using LSTM, GRU, and Bi-Directional LSTM," Fractal and Fractional, vol. 7, no. 2, p. 203, Feb. 2023.

H. S. Abdullah and A. M. Abdulazeez, "Deep Learning and Ensemble Deep Learning for Cryptocurrency Time Series Price Prediction," ARO, vol. XIII, no. 2, Dec. 2025.

J. Chen, "Analysis of Bitcoin Price Prediction Using Machine Learning," Journal of Risk and Financial Management, vol. 16, no. 1, p. 51, Jan. 2023.

M. Wei, "Forecasting and trading Bitcoin with machine learning techniques and a hybrid leverage strategy," Journal of Forecasting, vol. 42, no. 4, pp. 852-871, 2023.

E. Loginova, W. K. Tsang, G. van Heijningen, L.-P. Kerkhove, and D. F. Benoit, "Fine-grained topic-sentiment features for cryptocurrency price prediction," Machine Learning, vol. 113, pp. 4761-4784, 2024.

P. Ashok, D. M. Reddy, and A. S. Shaik, "Cryptocurrency Price Prediction using Deep Learning Algorithms," Communications on Applied Nonlinear Analysis, vol. 32, no. 4s, pp. 537-551, 2024.

M.-C. Lee, "Bitcoin Trend Prediction with Attention-Based Deep Learning Models and Technical Indicators," Systems, vol. 12, no. 11, p. 498, Nov. 2024.

S. Qureshi et al., "Prediction of cryptocurrency price using machine learning classification models and technical indicators," PeerJ Computer Science, 2024.