Abstract
In this study, we propose an ensemble hybrid model called seasonal trend decomposition based on Loess and long short-term memory (STL-LSTM) for forecasting non-stationary, nonlinear, and seasonal agricultural price series. The model integrates STL, a decomposition technique, with a recurrent neural network-based forecasting method, long short-term memory (LSTM). The STL technique decomposes the original price series into its seasonal, trend, and remainder components, while the LSTM network forecasts each component individually. The predictions from all components are then aggregated to produce the final ensemble forecast. The developed model effectively captures the temporal patterns of complex time series through the analysis of the simplified decomposed components. Empirical results from monthly potato price data of two major markets in India reveal the superior forecasting ability of the proposed model. The STL-LSTM achieves up to 12% lower root mean square error (RMSE) and 9% lower mean absolute percentage error (MAPE) compared to benchmark models which includes both individual and hybrid ones. Additionally, the Diebold-Mariano (DM) test confirms the statistical significance of the model's improved performance. The results highlight the STL-LSTM hybrid model as a promising tool for agricultural price forecasting and provide a foundation for further advancements in this domain.





Similar content being viewed by others
Explore related subjects
Discover the latest articles and news from researchers in related subjects, suggested using machine learning.Data Availability
The data supporting the findings of this study are available from the sources cited in the main text.
Code Availability
The code used for the analysis in this study is available from the corresponding author upon reasonable request.
References
Wang J, Wang Z, Li X, Zhou H (2022) Artificial bee colony-based combination approach to forecasting agricultural commodity prices. Int J Forecast 38:21–34. https://doi.org/10.1016/j.ijforecast.2019.08.006
Xiong T, Li C, Bao Y (2018) Seasonal forecasting of agricultural commodity price using a hybrid STL and ELM method: Evidence from the vegetable market in China. Neurocomputing 275:2831–2844. https://doi.org/10.1016/j.neucom.2017.11.053
Wang L, Feng J, Sui X et al (2020) Agricultural product price forecasting methods: research advances and trend. British Food Journal 122:2121–2138
Box GE, Jenkins GM, Reinsel GC, Ljung GM (2015) Time series analysis: forecasting and control, 5th edn. John Wiley & Sons Inc, Hoboken, New Jersey
Jadhav V, Chinnappa Reddy BV, Gaddi GM (2017) Application of ARIMA model for forecasting agricultural prices. J Agric Sci Technol 19:981–992
Zhang G, Patuwo BE, Hu MY (1998) Forecasting with artificial neural networks: The state of the art. Int J Forecast 14:35–62. https://doi.org/10.1016/S0169-2070(97)00044-7
Jha GK, Sinha K (2014) Time-delay neural networks for time series prediction: An application to the monthly wholesale price of oilseeds in India. Neural Comput Appl 24:563–571. https://doi.org/10.1007/s00521-012-1264-z
Zhanga JH, Kongb FT, Wu JZ et al (2014) Tomato prices time series prediction model based on wavelet neural network. Appl Mech Mater 644–650:2636–2640. https://doi.org/10.4028/www.scientific.net/AMM.644-650.2636
Widiyaningtyas T, Ari Elbaith Zaeni I, Ismi Zahrani T (2020) Food Commodity Price Prediction in East Java Using Extreme Learning Machine (ELM) Method. In: Proceedings - 2020 International Seminar on Application for Technology of Information and Communication: IT Challenges for Sustainability, Scalability, and Security in the Age of Digital Disruption, iSemantic 2020. IEEE, pp 93–97
Bianchi FM, Maiorino E, Kampffmeyer MC et al (2017). An overview and comparative analysis of Recurrent Neural Networks for Short Term Load Forecasting. https://doi.org/10.1007/978-3-319-70338-1
Jason Brownlee (2018) Deep Learning for Time Series Forecasting: Predict the Future with MLPs, CNNs and LSTMs in Python. Machine Learning Mastery
Shetty DK, Ismail B (2021) Forecasting stock prices using hybrid non-stationary time series model with ERNN. Commun Stat Simul Comput 0:1–13. https://doi.org/10.1080/03610918.2021.1872631
Tahir M, Ali S, Sohail A et al (2024) Unlocking Online Insights: LSTM Exploration and Transfer Learning Prospects. Annals of Data Science 11:1421–1434. https://doi.org/10.1007/s40745-024-00551-2
Hochreiter S, Schmidhuber J (1997) Long Short-Term Memory. Neural Comput 9:1735–1780. https://doi.org/10.1162/neco.1997.9.8.1735
Toharudin T, Pontoh RS, Caraka RE, et al (2020) Employing long short-term memory and Facebook prophet model in air temperature forecasting. Commun Stat Simul Comput 0:1–24. https://doi.org/10.1080/03610918.2020.1854302
Jaiswal R, Jha GK, Kumar RR, Choudhary K (2022) Deep long short-term memory based model for agricultural price forecasting. Neural Comput Appl 34:4661–4676. https://doi.org/10.1007/s00521-021-06621-3
Sundermeyer M, Schlüter R, Ney H (2012) LSTM neural networks for language processing. Interspeech 2012:194–197
Zhang J, Zhu Y, Zhang X et al (2018) Developing a Long Short-Term Memory (LSTM) based model for predicting water table depth in agricultural areas. J Hydrol (Amst) 561:918–929. https://doi.org/10.1016/j.jhydrol.2018.04.065
Sutskever I, Vinyals O, Le QV (2014) Sequence to sequence learning with neural networks. Adv Neural Inf Process Syst 4:3104–3112
Graves A, Jaitly N (2014) Towards end-to-end speech recognition with recurrent neural networks. In: 31st International Conference on Machine Learning, ICML 2014. pp 3771–3779
Wang C, Yang H, Bartz C, Meinel C (2016) Image Captioning with Deep Bidirectional LSTMs. In: Proceedings of the 24th ACM international conference on Multimedia. ACM, New York, NY, USA, pp 988–997
Sagheer A, Kotb M (2019) Time series forecasting of petroleum production using deep LSTM recurrent networks. Neurocomputing 323:203–213. https://doi.org/10.1016/j.neucom.2018.09.082
Yu P, Yan X (2020) Stock price prediction based on deep neural networks. Neural Comput Appl 32:1609–1628. https://doi.org/10.1007/s00521-019-04212-x
Claveria O, Monte E, Torra S (2015) Data pre-processing for neural network-based forecasting: does it really matter? Technol Econ Dev Econ 23:709–725. https://doi.org/10.3846/20294913.2015.1070772
Hewamalage H, Bergmeir C, Bandara K (2021) Recurrent Neural Networks for Time Series Forecasting: Current status and future directions. Int J Forecast 37:388–427. https://doi.org/10.1016/j.ijforecast.2020.06.008
Cleveland RB, Cleveland WS, McRae JE, Terpenning I (1990) STL: A Seasonal-Trend Decomposition Procedure Based on Loess. J Off Stat 6:3–73
Ni J, Hu X (2024) Monthly electricity generation forecast based on similar month screening and STL decomposition. Journal of Computational Methods in Sciences and Engineering 24:1539–1556. https://doi.org/10.3233/JCM-247141
Divisekara RW, Jayasinghe GJMSR, Kumari KWSN (2021) Forecasting the red lentils commodity market price using SARIMA models. SN Business & Economics 1:20. https://doi.org/10.1007/s43546-020-00020-x
Nóbrega JP, Oliveira ALI (2019) A sequential learning method with Kalman filter and extreme learning machine for regression and time series forecasting. Neurocomputing 337:235–250. https://doi.org/10.1016/j.neucom.2019.01.070
Jha GK, Jaiswal R, Choudhary K, Kumar RR (2021) stlELM: Hybrid Forecasting Model Based on STL Decomposition and ELM
Jaiswal R, Jha GK, Choudhary K, Kumar RR (2021) stlARIMA: STL Decomposition and ARIMA Hybrid Forecasting Model
Jaiswal R, Jha GK, Choudhary K, Kumar RR (2021) stlTDNN: STL Decomposition and TDNN Hybrid Time Series Forecasting
Jaiswal R, Choudhary K, Kumar RR (2022) STL-ELM: A Decomposition-Based Hybrid Model for Price Forecasting of Agricultural Commodities. National Academy Science Letters 45:477–480. https://doi.org/10.1007/s40009-022-01169-9
Rumelhart DE, Hinton GE, Williams RJ (2013) Learning Internal Representations by Error Propagation. In: Readings in Cognitive Science: A Perspective from Psychology and Artificial Intelligence. pp 399–421
Pascanu R, Mikolov T, Bengio Y (2013) On the difficulty of training recurrent neural networks. In: 30th International Conference on Machine Learning. pp 2347–2355
Chandola D, Mehta A, Singh S et al (2023) Forecasting Directional Movement of Stock Prices using Deep Learning. Annals of Data Science 10:1361–1378. https://doi.org/10.1007/s40745-022-00432-6
Choudhary K, Jha GK, Jaiswal R, Kumar RR (2024) Decomposition-based long short-term memory model for price forecasting of agricultural commodities. Iran Journal of Computer Science 7:861–873. https://doi.org/10.1007/s42044-024-00203-x
Qu BYY, Lang BFF, Liang JJJ et al (2016) Two-hidden-layer extreme learning machine for regression and classification. Neurocomputing 175:826–834. https://doi.org/10.1016/j.neucom.2015.11.009
Haykin S (2018) Neural Networks and Learning Machines Neural Networks and Learning Machines. PHI Learning
Livieris IE, Pintelas E, Pintelas P (2020) A CNN–LSTM model for gold price time-series forecasting. Neural Comput Appl 32:17351–17360. https://doi.org/10.1007/s00521-020-04867-x
Kumar RR, Jha GK, Jaiswal R, Choudhary K (2023) A hybrid approach for forecasting mustard price having long-memory property. Curr Sci 124:632–635. https://doi.org/10.18520/cs/v124/i5/632-635
Diebold FX, Mariano RS (2002) Comparing Predictive Accuracy. Journal of Business & Economic Statistics 20:134–144. https://doi.org/10.1198/073500102753410444
Jarque CM, Bera AK (1980) Efficient tests for normality, homoscedasticity and serial independence of regression residuals. Econ Lett 6:255–259. https://doi.org/10.1016/0165-1765(80)90024-5
Kim A, Ryu D, Webb A (2024) Forecasting oil futures markets using machine learning and seasonal trend decomposition. Investment Analysts Journal 1–14. https://doi.org/10.1080/10293523.2024.2405294
Said SE, Dickey DA (1984) Testing for unit roots in autoregressive-moving average models of unknown order. Biometrika 71:599–607. https://doi.org/10.1093/biomet/71.3.599
Cromwell J, Labys W, Terraza M (2011) Univariate Tests for Time Series Models. Sage, Thousand Oaks, California, USA
Glorot X, Bordes A, Bengio Y (2011) Deep sparse rectifier neural networks. J Mach Learn Res 15:315–323
Kingma DP, Ba JL (2015) Adam: A method for stochastic optimization. 3rd International Conference on Learning Representations, ICLR 2015 - Conference Track Proceedings
Wu L, Huang G, Fan J et al (2020) Hybrid extreme learning machine with meta-heuristic algorithms for monthly pan evaporation prediction. Comput Electron Agric 168:105115. https://doi.org/10.1016/j.compag.2019.105115
Wang X, Wang C, Wang J, et al (2024) Hybrid prediction model for dam seepage pressure based on STL decomposition and integrated learning. Shuili Fadian Xuebao/Journal of Hydroelectric Engineering 43:106–123. https://doi.org/10.11660/slfdxb.20240910
Jha GK, Sinha K (2013) Agricultural Price Forecasting Using Neural Network Model: An Innovative Information Delivery System. Agric Econ Res Rev 26:229–239
Acknowledgements
The authors sincerely thank the anonymous reviewers for their insightful feedback and constructive suggestions, which were invaluable in enhancing the quality of this paper.
Funding
This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.
Author information
Authors and Affiliations
Contributions
Ronit Jaiswal: Conceptualization, Methodology, Software, Validation, Formal Analysis, Investigation, Writing—Original Draft, Visualization. Girish Kumar Jha: Conceptualization, Validation, Formal Analysis, Investigation, Writing—Review & Editing, Supervision. Kapil Choudhary: Validation, Formal Analysis, Investigation, Writing—Review & Editing, Supervision. Rajeev Ranjan Kumar: Validation, Formal Analysis, Investigation, Writing—Review & Editing, Supervision.
Corresponding author
Ethics declarations
Conflict of interest
The authors declare no competing financial interests or personal relationships that could have influenced the work reported in this paper.
Ethical approval
The conducted research is not related to either human or animal use. All of the followed procedures were in accordance with the ethical and scientific standards. Authors declare that this manuscript is the result of their independent creation under the reviewers' comment and this work does not cause any harm to human or society.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Jaiswal, R., Jha, G.K., Kumar, R.R. et al. STL-LSTM Hybrid Model for Forecasting Seasonal Agricultural Price Series. Ann. Data. Sci. (2025). https://doi.org/10.1007/s40745-025-00590-3
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1007/s40745-025-00590-3
Keywords
Profiles
- Rajeev Ranjan Kumar View author profile