Time series forecasting of price of the agricultural products using data science
Abstract
Purpose. The purpose of our article is to research and forecast prices for agricultural products using the example of potato prices based on the most effective models using data science techniques.
Methodology / approach. Various forecasting models are explored, starting from baseline models like decomposition and exponential smoothing models to more advanced techniques such as ARIMA, SARIMA, as well as deep learning models including neural network. The data is split into training and testing sets, and models are validated using cross-validation techniques and optimised through hyperparameter tuning. Model performance is evaluated using metrics such as MAE, MSE, RMSE, and MAPE. The selected model is then used to generate future price forecasts, with uncertainty quantified through confidence intervals.
Results. The study successfully applied advanced data science techniques to forecast potato prices, leveraging a range of effective models. By analysing historical price data and using various forecasting methods, the research identified the most accurate models for predicting future price trends. The results demonstrate that the selected models can provide reliable forecasts. In particular, the results showed that the model could achieve good forecast results when applied to real problems and, thus, can be effectively used for forecasting tasks especially considering seasonality. In addition, it should be noted that the model has a higher prediction accuracy at the time intervals closest to the original data. The obtained results support using both models simultaneously for forecasting, which can compensate for the shortcomings of each of them. The models can be used separately, to more accurately predict the values for the required period, or a combination of them is also possible.
Originality / scientific novelty. The study’s originality lies in development of methods for effectively accounting for seasonality in agricultural price data, such as using seasonal decomposition techniques or more advanced techniques that combine statistical and data science approaches. The novelty implies the implementation of real-time data processing and forecasting system allows for the timely prediction of price changes, enabling stakeholders to make more informed decisions.
Practical value / implications. Forecasting potato prices holds significant practical value for various stakeholders. For farmers, accurate forecasts enable informed decisions on the optimal times to plant, harvest, and sell their crops, thereby optimising their profits. In the supply chain, distributors and retailers can use these forecasts to manage inventory more effectively and plan contracts, reducing waste and avoiding shortages. Policymakers benefit from forecasts by anticipating market fluctuations and stabilising prices, which supports both consumers and producers. For consumers, stable pricing ensures better budgeting and helps avoid sudden price spikes, making essential foods more affordable. Overall, accurate price forecasting enhances market efficiency by reducing uncertainty and aiding investors in managing risk.
References
Bergmeir, C., & Benítez, J. M. (2012). Neural networks in R Using the Stuttgart neural network simulator: RSNNS. Journal of Statistical Software, 46(7), 1–26. https://doi.org/10.18637/jss.v046.i07.
Box, G. E. P., & Jenkins, G. M. (1976). Time series analysis: forecasting and control. Holden-Day, San Francisco.
Brockwell, P., & Davis, R. (1991). Time series: theory and methods (2nd ed.). Springer, New York. https://doi.org/10.1007/978-1-4419-0320-4.
Brown, R. G. (1959). Statistical forecasting for inventory control. McGraw-Hill, New York.
Conway, A. J., Macpherson, K. P., & Brown, J. C. (1998). Delayed time series predictions with neural networks. Neurocomputing, 18(1–3), 81–89. https://doi.org/10.1016/S0925-2312(97)00070-2.
Gardner, E. S. (2006). Exponential smoothing: the state of the art – part II. International Journal of Forecasting, 22(4), 637–666. https://doi.org/10.1016/j.ijforecast.2006.03.005.
Gately, E. (1995). Neural networks for financial forecasting. New York, John Wiley & Sons.
Holt, C. (1957). Forecasting trends and seasonal by exponentially weighted averages. International Journal of Forecasting, 20(1), 5–10. https://doi.org/10.1016/j.ijforecast.2003.09.015.
Hoptroff, R. G. (1993). The principles and practice of time series forecasting and business modelling using neural nets. Neural Computing & Applications, 1, 59–66. https://doi.org/10.1007/BF01411375.
Hyndman, R., Koehler, A. B., Ord, J. K., & Snyder, R. D. (2008). Forecasting with exponential smoothing the state space approach. Springer, Germany. https://doi.org/10.1007/978-3-540-71918-2.
Hyndman, R. J., & Khandakar, Y. (2008). Automatic time series forecasting: the forecast package for R. Journal of Statistical Software, 27(3), 1–22. https://doi.org/10.18637/jss.v027.i03.
Hyndman, R. J., & Athanasopoulos, G. (2018). Forecasting: principles and practice (2nd ed.). OTexts, Melbourne. Available at: https://otexts.com/fpp2.
Khashei, M., Bijari, M., & Ardali, G. (2012). Hybridization of autoregressive integrated moving average (ARIMA) with probabilistic neural networks (PNNs). Computers & Industrial Engineering. 63(1), 37–45. https://doi.org/10.1016/j.cie.2012.01.017.
Kmytiuk, T., & Majore, G. (2021). Time series forecasting of agricultural product prices using Elman and Jordan recurrent neural networks. Neuro-Fuzzy Modeling Techniques in Economics, 10, 67–85. http://doi.org/10.33111/nfmte.2021.067.
Konishi, S., & Kitagawa, G. (2008). Information criteria and statistical modeling. Springer, New York. https://doi.org/10.1007/978-0-387-71887-3.
Kotu, V., & Deshpande, B. (2019). Chapter 12 – Time Series Forecasting. In Data Science (2nd ed.), (pp. 395–445). Morgan Kaufmann. https://doi.org/10.1016/B978-0-12-814761-0.00 012-5.
Ljung, G. M., & Box, G. E. P. (1978). On a measure of lack of fit in time series models. Biometrika, 65(2), 297–303. https://doi.org/10.1093/biomet/65.2.297.
Long, J. D., & Teetor, P. (2019). R cookbook: proven recipes for data analysis, statistics, and graphics (2nd ed.). O’Reilly Media, USA. Available at: https://rc2e.com.
Makridakis, S. G., Wheelwright, S. C., & McGee, V. E. (1998). Forecasting: Methods and Applications (3d ed.). Wiley, New York.
Mbuli, N., Mathonsi, M., Seitshiro, M., & Pretorius, J. H. C. (2020). Decomposition forecasting methods: a review of applications in power systems, Energy Reports, 6(9), 298–306. https://doi.org/10.1016/j.egyr.2020.11.238.
Bowerman, B., & O’Connell, R. (1993). Forecasting and time series: an applied approach, 3rd ed. South-Western College Pub.
Official statistics of Latvia (2005–2021). Average retail prices of selected commodity (euro per 1 kg, if other – specified) 2005M01 – 2021M12. Available at: https://data.stat.gov.lv/pxweb/en/OSP_PUB/START__VEK__PC__PCC/PCC010m.
Rudenko, O., Bezsonov, O., & Romanyk, O. (2019). Neural network time series prediction based on multilayer perceptron. Development Management, 17(1), 23–34. https://doi.org/10.21511/dm.5(1).2019.03.
Shcherbakov, M. V., Brebels, A., Shcherbakova, N. L., Tyukov, A. P., Janosky, T. A., & Kamaev, V. A. (2013). A survey of forecast error measures. World Applied Sciences Journal, 24, 171–176. https://doi.org/10.5829/idosi.wasj.2013.24.itmies.80032.
Shumway, R. H., & Stoffer, D. S. (2011). Time series analysis and its applications. With R examples, 3 rd ed. Springer. https://doi.org/10.1007/978-1-4419-7865-3.
Shumway, R. H., & Stoffer, D. S. (2000). Time series regression and ARIMA models. In Time series analysis and its applications. Springer texts in statistics. Springer, New York. https://doi.org/10.1007/978-1-4757-3261-0_2.
Sun, F., Meng, X., Zhang, Y., Wang, Y., Jiang, H., & Liu, P. (2023). Agricultural product price forecasting methods: a review. Agriculture, 13(9), 1671. https://doi.org/10.3390/agriculture13091671.
Vandeput, N. (2021). Data science for supply chain forecasting, 2nd ed. Berlin, Boston, De Gruyter. Available at: https://www.researchgate.net/publication/350440225.
Wei, William W. S. (2006). Time series analysis: univariate and multivariate methods, 2nd ed. Pearson Addison Wesley. Available at: https://www.researchgate.net/publication/220693197.
Winters, P. R. (1960). Forecasting sales by exponentially weighted moving averages. Management Science, 6(3), 324–342. https://doi.org/10.1287/mnsc.6.3.324.
Zhang, P., Patuwo, E., & Hu, M. (1998). Forecasting with artificial neural networks: the state of the art. International Journal of Forecasting, 14(1), 35–62. https://doi.org/10.1016/S0169-2070(97)00044-7.