Food commodity price prediction plays a crucial role in monitoring food price stability and inflation, particularly for commodities with varying volatility characteristics. This study compares the performance of Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU) models in forecasting daily food commodity prices in Bandung City, using chili and rice dataset. Daily price data were collected and modeled in two experimental scenarios: forecasting using only historical price data and forecasting with temporal feature engineering. The results showed that GRU consistently outperformed LSTM across all experiments. Without feature engineering, GRU achieved a MAPE score 0.49% and 3.26% for rice and chili, respectively. The incorporation of temporal features improved forecasting performance, reducing forecasting errors by up to 31.30% for rice and 29.55% for chili. The best overall performance was achieved by the GRU model with temporal feature engineering (MAPE rice = 0.48% and MAPE chili = 2.48%). These findings indicate that incorporating feature engineering remains beneficial for enhancing deep learning models performance. This study contributes to the development of deep learning methods for food commodity price forecasting and provides an understanding of the role of temporal feature engineering in handling commodities with different levels of volatility.
Copyrights © 2026