Home Forecasting Spanish Olive Oil Prices Using Machine Learning: A Comprehensive Analysis of Contributing Factors and Model Performance
Article
Licensed
Unlicensed Requires Authentication

Forecasting Spanish Olive Oil Prices Using Machine Learning: A Comprehensive Analysis of Contributing Factors and Model Performance

  • Mohamed Rochdi Keffala ORCID logo EMAIL logo and Safoua Mahjoub
Published/Copyright: April 28, 2025

Abstract

The main goal of this study was to create a strong predictive model for forecasting olive oil prices. To do this, we applied four machine learning models in Python: Random Forest, Gradient Boosting, Decision Tree, and Support Vector Regression, using 164 monthly price observations along with factors like temperature, precipitation, consumer price index, IBEX35 stock market prices, EUR/USD exchange rate, and import/export quantities. The results showed that Random Forest and Gradient Boosting models performed the best. The Spearman correlation analysis revealed that the exchange rate had a strong negative correlation with prices, while the consumer price index and import quantity had moderate positive correlations. Random Forest highlighted the consumer price index as the most important factor in predicting olive oil prices. This study fills a gap in existing research and provides practical insights for companies in the olive oil industry to better monitor and forecast prices, helping with profitability, risk management, stock optimization, and investment decisions.


Corresponding author: Mohamed Rochdi Keffala, Assistant Professor in Finance at High Institute of Accountancy and Business Administration, and Member of Ligue Laboratory LR99ES24, University of Manouba, Manouba, Tunisia. E-mail:

References

Abo-Ragab, S. A. S., A. R. S. Hany, and S. S. Essam. 2009. “Econometric Analysis of Some Factors Affecting the Production and Consumption of Olive Oil in Egypt and the Features of its Foreign Trade.” Journal of Applied Sciences Research 5 (10): 1535–46.Search in Google Scholar

Avinash, G., V. Ramasubramanian, M. Ray, R. K. Paul, S. Godara, G. H. Harish Nayak, B. Manjunatha, S. Dahiya, and M.A. Iquebal. 2024. “Hidden Markov Guided Deep Learning Models for Forecasting Highly Volatile Agricultural Commodity Prices.” Applied Soft Computing 158 (111557). https://doi.org/10.1016/j.asoc.2024.111557.Search in Google Scholar

Breiman, L. 2001. “Random Forests.” Machine Learning 45 (1): 5–32. https://doi.org/10.1023/a:1010933404324.10.1023/A:1010933404324Search in Google Scholar

Cutler, A., J. R. Stevens, and R. Cutler. 2011. “Random Forests.” Machine Learning 45 (1): 157–76.10.1007/978-1-4419-9326-7_5Search in Google Scholar

Deepa, S., A. Alli, Sheetac, and S. Gokila. 2023. “Machine Learning Regression Model for Material Synthesis Prices Prediction in Agriculture.”In Materials Today: Proceedings, Vol. 81 (2): 989–93.10.1016/j.matpr.2021.04.327Search in Google Scholar

Fatih, C., L. Charfeddine, and P. Mishra. 2020. “Modeling and Forecasting Olive Oil Price Using Fuzzy Time Series and a Fractional Integrated Stochastic Process.” Middle-East Journal of Scientific Research 28 (4): 322–36.Search in Google Scholar

Fernández-Lobato, L., B. Ruiz-Carrasco, M. Tostado-Veliz, F. Jurado, and D. Vera. 2024. “Environmental Impact of the Most Representative Spanish Olive Oil Farming Systems: A Life Cycle Assessment Study.” Journal of Cleaner Production 442: 1–14. https://doi.org/10.1016/j.jclepro.2024.141169.Search in Google Scholar

Fousekis, P. 2022. “Price Risk Connectedness in the Principal Olive Oil Markets of the EU.” The Journal of Economic Asymmetries 26 (00258). https://doi.org/10.1016/j.jeca.2022.e00258.Search in Google Scholar

Garrido-Cuevas, M-d-M., A.-M. Garrido-Varo, F. Marini, M.-T Sánchez, and D. Pérez-Marín. 2025. “Enhancing Virgin Olive Oil Authentication With Bayesian Probabilistic Models and Near Infrared Spectroscopy.” Journal of Food Engineering 391: 112443. https://doi.org/10.1016/j.jfoodeng.2024.112443.Search in Google Scholar

Ho, T. K. 1995. “Random Decision Forests.”In Proceedings of 3rd International Conference on Document Analysis and Recognition, Vol. 1, 278–82.10.1109/ICDAR.1995.598994Search in Google Scholar

Li, G. 2024. “Research on Global Olive Oil Price Forecasting.” Highlights in Business, Economics and Management 30: 84–90. https://doi.org/10.54097/xnj7dh82.Search in Google Scholar

Malavi, D., K. Raes, and S. Van Haute. 2024. “Integrating Near-Infrared Hyperspectral Imaging with Machine Learning and Feature Selection: Detecting Adulteration of Extra-virgin Olive Oil with Lower-Grade Olive Oils and Hazelnut Oil.” Current Research in Food Science 9 (100913): 1–23. https://doi.org/10.1016/j.crfs.2024.100913.Search in Google Scholar

Messaoudi, H., A. Abbassi, and N. Khraief. 2024. “Olive Oil World Price Forecasting: A Bayesian VAR Approach.” Journal of Agricultural and Food Industrial Organization 22 (1): 41–52. https://doi.org/10.1515/jafio-2023-0015.Search in Google Scholar

Pérez-Godoy, M. D., P. Pérez-Recuerda, M. P. Frías, A. J. Rivera, C. J. Carmona, and M. Parras. 2010. “CO2RBFN for Short and Medium Term Forecasting of the Extra-Virgin Olive Oil Price.” Studies in Computational Intelligence, Nature Inspired Cooperative Strategies for Optimization 284: 113–25. https://doi.org/10.1007/978-3-642-12538-6_10.Search in Google Scholar

Reda, R., T. Saffaj, I. Bouzida, O. Saidi, M. Belgrir, B. Lakssir, and E. M. El Hadrami. 2023. “Optimized Variable Selection and Machine Learning Models for Olive Oil Quality Assessment Using Portable Near Infrared Spectroscopy.” Spectrochimica Acta Part A: Molecular and Biomolecular Spectroscopy 303: 123213, https://doi.org/10.1016/j.saa.2023.123213.Search in Google Scholar

Siskos, Y., N. F. Matsatsinis, and G. Baourakis. 2001. “Multicriteria Analysis in Agricultural Marketing: The Case of French Olive Oil Market.” European Journal of Operational Research 130 (2): 315–31. https://doi.org/10.1016/s0377-2217(00)00043-6.Search in Google Scholar

Wang, L., J. Feng, X. Sui, X. Chu, and W. Mu. 2020. “Agricultural Product Price Forecasting Methods: Research Advances and Trend.” British Food Journal 122 (7): 2121–38. https://doi.org/10.1108/bfj-09-2019-0683.Search in Google Scholar

Yoon, S., T. H. Kim, and D. S. Kim. 2024. “Data-driven Analysis of Climate Impact on Tomato and Apple Prices Using Machine Learning.” Helyion e41478: 1–29.10.1016/j.heliyon.2024.e41478Search in Google Scholar

Received: 2024-11-07
Accepted: 2025-01-28
Published Online: 2025-04-28

© 2025 Walter de Gruyter GmbH, Berlin/Boston

Downloaded on 22.11.2025 from https://www.degruyterbrill.com/document/doi/10.1515/jafio-2024-0067/html
Scroll to top button