A Hybrid ARIMA–LSTM Model Optimized with a Tree-Structured Parzen Estimator for Automatic Hyperparameter Tuning to Forecast Indonesia's Chili and Climate Data
Received: 31 October 2025 | Revised: 28 December 2025 and 23 January 2026 | Accepted: 25 January 2026 | Online: 6 June 2026
Corresponding author: Ifan Prihandi
Abstract
Red chili peppers are a strategic agricultural commodity in Indonesia, yet their prices and production are highly volatile due to climate variability and supply chain disruptions. Accurate forecasting is therefore essential to support agricultural planning and price stabilization policies. This study proposes an automated forecasting framework based on a hybrid Autoregressive Integrated Moving Average–Long Short-Term Memory (ARIMA–LSTM) computational modeling approach that integrates statistical and deep learning methods while incorporating weather variables, namely rainfall and sunshine duration. The main novelties of this research are the application of Tree-Structured Parzen Estimator (TPE) for efficient automated hyperparameter optimization, improving upon conventional Grid Search (GS), and the construction of a hybrid model capable of capturing both linear and nonlinear temporal patterns. The framework is evaluated using time-series data from North Sumatra, Central Java, and Bali covering the period from March 2021 to December 2023. The results show that the proposed hybrid ARIMA–LSTM model significantly outperforms standalone and benchmark models. For retail price forecasting, the hybrid model achieves a Mean Absolute Percentage Error (MAPE) of 1.45%, compared to 42.74% for ARIMA, 32.41% for Seasonal ARIMA (SARIMA), and 31.73% for Temporal Convolutional Network (TCN), indicating a substantial reduction in forecasting error. These findings confirm the effectiveness of combining TPE-based optimization with hybrid modeling in capturing complex agricultural and climatic dynamics. Overall, the proposed framework provides a scalable and data-driven forecasting tool to support farmers in production planning and assist policymakers in designing more effective price stabilization and agricultural resource management strategies under climate variability.
Keywords:
ARIMA, LSTM, TPE, forecasting, automation, time series, hybrid model, computational modelingReferences
W. A. Zakaria, V. P. Tambunan, and Y. Indriani, "Predicting the cassava economy in Lampung province: An ARIMA-based forecast of supply, demand, and price," Edelweiss Applied Science and Technology, vol. 9, no. 4, pp. 2905–2922, Apr. 2025.
S. B. Bhusanar, S. S. Meena, and A. Beniwal, "Forecasting of Arrival and Price of Groundnut in Rajasthan by ARIMA Model for Livelihood of Farmers," Asian Journal of Agricultural Extension, Economics & Sociology, vol. 41, no. 9, pp. 684–690, Aug. 2023.
M. Omar, F. Hassan, S. Shahin, and M. shahat, "The usage of the autoregressive integrated moving average (ARIMA) model for forecasting milk production in Egypt (2022-2025)," Open Veterinary Journal, vol. 14, no. 1, pp. 256–265, Feb. 2024.
R. Faridi, S. Ahmmed, and S. Ahmmed, "Forecasting Inflation Rate with Algorithmic Arima Modeling," Indian Journal of Economics and Financial Issues, vol. 5, no. 2, pp. 143–157, Dec. 2024.
A. Sutany, "Forecasting Weekly Stock of PT. Astra International Tbk (ASII) using ARIMA Model," Proceeding of The Symposium on Data Science, vol. 5, pp. 23–32, Aug. 2025.
I. Prihandi, S. Wijono, I. Sembiring, and E. Maria, "Implementation of ARIMA with Min-Max Normalization for predicting the Price and Production Quantity of Red Chili Peppers in North Sumatra Province considering Rainfall and Sunlight Duration Factors," Engineering, Technology & Applied Science Research, vol. 15, no. 2, pp. 21876–21887, Apr. 2025.
D. Protić et al., "Numerical Feature Selection and Hyperbolic Tangent Feature Scaling in Machine Learning-Based Detection of Anomalies in the Computer Network Behavior," Electronics, vol. 12, no. 19, Oct. 2023, Art. no. 4158.
A. K. Rad et al., "Machine Learning for Determining Interactions between Air Pollutants and Environmental Parameters in Three Cities of Iran," Sustainability, vol. 14, no. 13, June 2022, Art. no. 8027.
X. Wen and W. Li, "Time Series Prediction Based on LSTM-Attention-LSTM Model," IEEE Access, vol. 11, pp. 48322–48331, 2023.
I. Naouadir, O. E. Ogri, J. E. Mekkaoui, M. Benslimane, and A. Hjouji, "Celestial Object Detection in Astronomical Images Using MSE and Jacobi Moments," Statistics, Optimization & Information Computing, vol. 12, no. 3, pp. 660–671, Feb. 2024.
Q. Deng, S. Wang, and J. Lyu, "Comparative effectiveness analysis of univariate time-series forecasting models for disease mortality rates in the global burden of disease database: a case study of global hypertensive heart disease among women of childbearing age," Frontiers in Public Health, vol. 13, Nov. 2025, Art. no. 1681569.
A. M. Khan and M. Osińska, "Comparing forecasting accuracy of selected grey and time series models based on energy consumption in Brazil and India," Expert Systems with Applications, vol. 212, Feb. 2023, Art. no. 118840.
J. Zhou, H. Li, and W. Zhong, "A modified Diebold–Mariano test for equal forecast accuracy with clustered dependence," Economics Letters, vol. 207, Oct. 2021, Art. no. 110029.
D. F. McCaffrey, "Volume 14: Quantitative Research and Educational Measurement," in International Encyclopedia of Education, 4th ed., R. J. Tierney, F. Rizvi, and K. Ercikan, Eds. Amsterdam, Netherlands: Elsevier, 2023, pp. xix–xxiv.
I. Prihandi, "Public Dataset for Chili Price and Weather Variables in Indonesia (2021–2023)." Zenodo, Jan. 23, 2026.
C. D. Lewis, Industrial and Business Forecasting Methods: A Practical Guide to Exponential Smoothing and Curve Fitting. Oxford, UK: Butterworth Scientific, 1982.
U. Singh, S. Tamrakar, K. Saurabh, R. Vyas, and O. P. Vyas, "Hyperparameter Tuning for LSTM and ARIMA Time Series Model: A Comparative Study," in 2023 IEEE 4th Annual Flagship India Council International Subsections Conference, Mysore, India, 2023, pp. 1–6.
A. E. Ouardi, B. Er-Raha, and K. Tatane, "LSTM Adaptive Hyperparameter Tuning for Financial Time Series Forecasting Using Custom Gradient-Based Methods: A Comparative Study with Bayesian Optimization," Journal of Theoretical and Applied Information Technology, vol. 102, no. 24, pp. 8913–8936, Dec. 2024.
Downloads
How to Cite
License
Copyright (c) 2026 Irwan Sembiring, Ifan Prihandi, Sutarto Wijono, Evi Maria

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain the copyright and grant the journal the right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) after its publication in ETASR with an acknowledgement of its initial publication in this journal.
