Prediksi Harga Beras Tingkat Perdagangan Besar Menggunakan Algoritma Extreme Gradient Boosting Berbasis Indikator Ekonomi Makro


  • Josua Jhon Radho Hutahaean * Mail Universitas HKBP Nommensen, Kota Pematangsiantar, Indonesia
  • (*) Corresponding Author
Keywords: XGBoost; Rice Price Forecasting; Macroeconomic Indicators; Time-Series Forecasting; Feature Engineering

Abstract

Wholesale rice prices are an important indicator for food-price monitoring because their movements affect supply chains, distribution actors, and household purchasing power. This study develops an Indonesian wholesale rice-price forecasting model using Extreme Gradient Boosting (XGBoost) with macroeconomic indicators and temporal features. Official secondary data from Statistics Indonesia were collected from January 2018 to May 2026, comprising 101 monthly observations. The predictor variables include general inflation, rice production, harvested area, Farmers’ Terms of Trade for food crops, population, and the food Consumer Price Index. In addition, lag-1, lag-3, and a three-month moving-average feature were constructed from historical rice-price observations. The dataset was divided chronologically into 84 training observations and 17 testing observations. Hyperparameter optimization was performed using Grid Search with TimeSeriesSplit on the training data. XGBoost performance was compared with ARIMA(1,1,1) and Random Forest Regression using RMSE, MAE, MAPE, and R². The test results show that XGBoost achieved an RMSE of IDR 234.17/kg, an MAE of IDR 189.43/kg, a MAPE of 1.63%, and an R² of 0.9621. These results outperform ARIMA and Random Forest on the same test set. Feature-importance analysis indicates that the lag-1 price, three-month moving average, and Farmers’ Terms of Trade provide the largest predictive contributions. The findings indicate that multivariate XGBoost has potential as a prototype for data-driven wholesale rice-price monitoring.

References

H. Yan, M. Manfredo, and A. K. Mishra, “Forecasting for Food Price Inflation Using Machine Learning Methodology: Expansion on FRED-MD,” Food Policy, vol. 140, p. 103077, 2026, doi: 10.1016/j.foodpol.2026.103077.

F. Muhammad Farhan Al Wahyub, “Analisis volatilitas bahan pangan pokok dan peramalan dengan metode GARCH,” Fakultas Sains dan Teknologi Universitas Terbuka, pp. 30–36, 2025.

I. B. P. Swardanasuta, W. A. Sofa, S. Muchlisoh, and A. W. Wijayanto, “Forecasting Indonesian Monthly Rice Prices at Milling Level Using Google Trends and Official Statistics Data,” Proceedings of The International Conference on Data Science and Official Statistics, vol. 2025, no. 1, pp. 847–860, 2025, doi: 10.34123/icdsos.v2025i1.521.

D. R. Lestari, E. A. S. Bangun, F. L. Gaol, and T. Matsuo, “Machine Learning-Based Forecasting of Agricultural Commodity Prices Using Ensemble Models,” Journal of Human, Earth, and Future, vol. 6, no. 4, pp. 887–899, 2025, doi: 10.28991/hef-2025-06-04-09.

T. Zhao, G. Chen, S. Suraphee, T. Phoophiwfa, and P. Busababodhin, “A hybrid TCN-XGBoost model for agricultural product market price forecasting,” PLoS ONE, vol. 20, no. 5 May, pp. 1–31, 2025, doi: 10.1371/journal.pone.0322496.

H. Rana, M. U. Farooq, A. Kazi, M. Baig, and M. Akhtar, “Prediction of Agricultural Commodity Prices Using Big Data Framework,” Engineering, Technology & Applied Science Research, vol. 14, no. 1, pp. 12652–12658, 2024, doi: 10.48084/etasr.6468.

T. Chen and C. Guestrin, “XGBoost: A Scalable Tree Boosting System,” in Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, in KDD ’16. New York, NY, USA: Association for Computing Machinery (ACM), 2016, pp. 785–794. doi: 10.1145/2939672.2939785.

I. N. G. A. M. Wardhiana et al., “Comparative Study of Statistical, Machine Learning, and Deep Learning for Rice Retail Price Forecasting in West Java,” in 2024 2nd International Conference on Technology Innovation and Its Applications (ICTIIA), 2024, pp. 1–6. doi: 10.1109/ICTIIA61827.2024.10761587.

I. N. G. A. M. Wardhiana, M. Z. Ghufron, R. Sarno, and A. T. Haryono, “Price Forecasting of West Java Rice using Multivariate Decomposition SARIMAX-Gated Recurrent Unit Combination,” International Journal of Intelligent Engineering and Systems, vol. 18, no. 1, pp. 769–778, 2025, doi: 10.22266/ijies2025.0229.54.

I. Sabilirrasyad, N. A. Prasetyo, and M. Hermansyad, “Modeling and Predicting Indonesia Rice Prices Using Hyperparameter Optimization XGBoost,” in Proceedings of the 5th International Conference on Economics, Business and Information Technology (ICEBIT), 2024, pp. 459–470. doi: 10.31967/prmandala.v5i0.1226.

S. Silalahi, J. Jhon, R. Hutahaean, L. Sinaga, C. Pardede, and J. Tata, “Analisis Dan Prediksi Harga Beras Grosir Indonesia Tingkat Perdagangan Besar Dengan Backpropagation,” vol. 4, no. 3, pp. 2163–2171, 2026.

A. T. Damaliana, S. W. Tyas, A. Muhaimin, Trimono, and M. Idhom, “Deep Stacking Ensemble with Stacked LSTM and SVR for Analysis and Forecasting: A Case Study of Rice Price in East Java,” in 2025 IEEE 11th Information Technology International Seminar (ITIS), IEEE, 2025, pp. 356–361. doi: 10.1109/ITIS67966.2025.11309025.

D. Mufidah, N. Santoso, M. A. Nafis, and P. Prediction, “Rice Price Prediction In East Java Based on Weather Using Long Short-Term Memory ( LSTM ),” vol. 10, no. 2, pp. 1561–1567, 2026.

I. R. Muchtar and Afiyati, “Comparison of Linear Regression and Random Forest Algorithms for Premium Rice Price Prediction (Case Study: West Java),” Jurnal Indonesia Sosial Teknologi, vol. 5, no. 7, pp. 3122–3135, 2024, doi: 10.59141/jist.v5i7.1184.

P. D. M. Bintang, N. L. W. S. R. Ginantra, I. B. A. I. Iswara, and N. M. M. R. Desmayani, “Performance Evaluation of Ensemble Learning Stacking in Rice Price Prediction,” in 2024 9th International Conference on Informatics and Computing (ICIC), IEEE, 2024, pp. 1–6. doi: 10.1109/ICIC64337.2024.10957374.


Bila bermanfaat silahkan share artikel ini

Berikan Komentar Anda terhadap artikel Prediksi Harga Beras Tingkat Perdagangan Besar Menggunakan Algoritma Extreme Gradient Boosting Berbasis Indikator Ekonomi Makro

Article History
Published: 2026-07-24
Abstract View: 29 times
PDF Download: 15 times
Issue
Vol 4 No 2 (2026): Juli
Pages: 118 - 125
Section
Articles