Open Source AI Model Accurately Predicted Olive Oil Prices
07/08/2024 (Olive Oil Times) - Olive oil prices around the world have reached historic highs due to poor harvests caused by drought and high springtime temperatures in key producing countries, most notably Spain.
While prices at origin have fallen from their mid-January record high, retail prices remain well above average, leading to changes in shopper behavior in traditionally heavy olive oil consumers.
Leading experts in the sector anticipate prices to decline based on expectations of global olive oil production returning to about three million tons in the 2024/25 crop year. However, the future direction of prices remains far from certain.
To that end, a researcher in the southern Spanish autonomous community of Andalusia, the world’s largest olive oil-producing region, developed an artificial intelligence (AI) program to predict olive oil prices.
Diego Hueltes, a computer engineer and the chief executive of TADA.ai, an AI consultancy, developed three predictive price models, including a one-week forecast, a four-week forecast and a prediction of whether prices will go up or down.
“I come from Alcalá la Real, a town in Jaén where olive farming is the main livelihood, and there’s a deep-rooted culture around olive oil,” he told Olive Oil Times.
“I found it fascinating that the elders could predict market movements based on weather and prices,” he added. “If they could do it based on experience, my premise was that an AI model could achieve the same in a more systematic way.”
Hueltes used automatic learning algorithms and artificial intelligence research to analyze historic olive oil prices, meteorological data and production data to make accurate price estimates in 2017 and 2018.
“I developed two models,” Hueltes said. “The first one could predict the price, an absolute number. In this case, my model had a mean error of three percent. For example, if my model predicts that next week the price will be €10.00, the actual price will probably be between €9.97 and €10.03.”
“The second model predicted ‘next week the price will go up’ or ‘next week the price will go down,’ making it very straightforward,” he added. “It accurately predicted the price direction 76 percent of the time.”
“To evaluate this model, I used a financial technique that analyzes returns by seeing what the accumulated return would be if, each time the model predicted the price would rise next week, I bought olive oil, and each time it predicted the price would fall, I sold olive oil,” Hueltes continued. “If I had invested €100 following the model between 2017 and 2018, I would have €140 after a year.”
However, many things have happened since 2018, including United States tariffs on Spanish olive oil, the Covid-19 pandemic, the Russian invasion of Ukraine and Europe’s historic drought.
“The model wouldn’t be valid for 2024 even though its scientific basis remains valid,” said Hueltes, who published his research on GitHub, making it available to the general public.
“I’m a huge fan of open source, and I believe scientific research, especially in AI, should be universally accessible and free,” he said. “Since there was very little open and accessible work in the field of olive oil, I decided to make all my research available.”
Hueltes hopes that this technology will positively impact the world’s largest olive oil-producing province in the future.
“The AI model, using price, production and meteorological data, can extract the underlying patterns in the data,” he said. “These patterns, which are very difficult for humans to detect, even for experts in the sector, are entirely feasible for AI models.”
According to Hueltes, predicting olive oil prices “allows for the optimization of the oil trade, especially for small producers, as they receive indicators on whether prices are fair or not, or whether it is better to wait or act quickly.”
Additionally, the research could benefit actors across the olive oil value chain, including farmers, retailers and distributors, consumers, investors and traders.
Farmers and producers can more effectively plan their sales strategies to maximize profits and manage resources efficiently.
Retailers and distributors also can use accurate price predictions to manage inventory and develop pricing strategies that remain competitive and profitable.
Meanwhile, consumers can make informed purchasing decisions based on potential price changes, such as buying in bulk when prices are expected to rise.
Finally, investors and commodity traders can make better investment decisions and increase their returns. Understanding price trends can also help formulate policies to support the agricultural sector and stabilize the market.
While Hueltes said the research may not directly impact climate change, the symptoms of which are widely attributed to the recent production declines, “it can help understand how climate factors affect olive oil production.”
“The open-source nature of the research allows for the development of new models to make the olive oil trade more equitable,” he added.