# Investigating and forecasting the impact of crop production shocks on global commodity prices

Rotem Zelingher, David Makowski

► To cite this version:

Rotem Zelingher, David Makowski. Investigating and forecasting the impact of crop production shocks on global commodity prices. Environmental Research Letters, 2023, 19 (1), pp.014026. 10.1088/1748-9326/ad0dda. hal-04341715

HAL Id: hal-04341715

https://hal.science/hal-04341715

Submitted on 30 Apr 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
LETTER • OPEN ACCESS

Investigating and forecasting the impact of crop
production shocks on global commodity prices

To cite this article: Rotem Zelingher and David Makowski 2024 *Environ. Res. Lett.* **19** 014026

View the [article online](#) for updates and enhancements.

You may also like

- [Is voluntary certification of tropical agricultural commodities achieving sustainability goals for small-scale producers? A review of the evidence](#)
Ruth S DeFries, Jessica Fanzo, Pinki Mondal et al.

- [Development of Superior Plantation Commodities Based on Land Suitability in Pining Sub District Gayo Lues Regency Aceh Province](#)
I Alfiansyah and Lindawati

- [Identifying the community structure of the food-trade international multi-network](#)
S Torreggiani, G Mangioni, M J Puma et al.

<figure><img src="image_1.png" /></figure>

This content was downloaded from IP address 193.48.96.180 on 30/04/2024 at 19:54
LETTER • OPEN ACCESS

# Investigating and forecasting the impact of crop production shocks on global commodity prices

To cite this article: Rotem Zelingher and David Makowski 2024 *Environ. Res. Lett.* 19 014026

View the [article online](#) for updates and enhancements.

You may also like

- [Is voluntary certification of tropical agricultural commodities achieving sustainability goals for small-scale producers? A review of the evidence](#)
Ruth S DeFries, Jessica Fanzo, Pinki Mondal et al.

- [Development of Superior Plantation Commodities Based on Land Suitability in Pining Sub District Gayo Lues Regency Aceh Province](#)
I Alfiansyah and Lindawati

- [Identifying the community structure of the food-trade international multi-network](#)
S Torreggiani, G Mangioni, M J Puma et al.

<figure><img src="image_2.png" /></figure>

This content was downloaded from IP address 193.48.96.180 on 30/04/2024 at 19:54
<figure><img src="image_2.png" /></figure>

CrossMark

OPEN ACCESS

RECEIVED

23 April 2023

REVISED

9 November 2023

ACCEPTED FOR PUBLICATION

17 November 2023

PUBLISHED

5 December 2023

Original Content from
this work may be used
under the terms of the
Creative Commons
Attribution 4.0 licence.

Any further distribution
of this work must
maintain attribution to
the author(s) and the title
of the work, journal
citation and DOI.

<figure><img src="image_3.png" /></figure>

LETTER

# Investigating and forecasting the impact of crop production shocks on global commodity prices

Rotem Zelingher<fnref n="1" />,<fnref n="2" />,* and David Makowski<fnref n="3" />

E-mail: zelingher@iiasa.ac.at

**Keywords:** food-security, agricultural commodities, price forecasting, agricultural production, interpretable machine learning

## Abstract

In this study, we investigate and forecast the impact of crop production shocks on the global prices of three major international agricultural commodities: maize, soybean, and cocoa. We perform a thorough assessment of the forecasting performances of five econometric and machine learning models using 60 years of data. First, we train the models on production and price data to forecast the monthly price variations for each crop separately considering different time horizons. Next, we implement a cross-validation procedure to identify the models with the most accurate forecasting ability for each crop. After choosing the best forecaster, we identify the most influential producing areas using several local and global model-agnostic interpretation tools. Our findings indicate significant differences among commodities in terms of prediction accuracy, with cocoa exhibiting a higher level of prediction error compared to less volatile markets like maize and soybean. Our results reveal a significant influence of Northern America's maize and soybean production on the global prices of these commodities. The effects of production on prices are asymmetrical: small decreases in US production lead to substantial price increases, while small increases in production do not systematically decrease prices. In contrast, cocoa price variations are influenced by production coming from several regions, not from a single one.

## 1. Introduction

This paper introduces a novel machine learning (ML) approach to forecast agricultural commodity (AC) prices and identify the most influential producing regions, addressing a critical gap in the existing literature and informing policies and strategies for global food security. Decades of AC market instability have posed persistent challenges, impacting farmers, traders, and policymakers worldwide. Influenced by diverse factors such as supply-demand dynamics, weather conditions, geopolitical events, and financial speculation, the fluctuation in prices, as documented by the Food and Agriculture Organization (FAO) dataset (FAO 2023), underscores a critical issue. Historical instances like the 2007–2008 food crisis, the 2020 COVID-19 pandemic and the Ukraine–Russia war demonstrate the profound implications of price shocks on food security, societal stability, and global

supply chains (Kalkuhl 2016, Schmidhuber et al 2020, Glauber and Laborde Debucquet 2023).

This study navigates the complex terrain of price dynamics, particularly focusing on three globally traded ACs, namely maize, soybean, and cocoa<fnref n="4" />, emphasizing their historical impact on food security, especially in developing nations (Headey 2011, Kalkuhl 2016). The COVID-19 pandemic and subsequent disruptions in 2020 revealed vulnerabilities in global food supply chains, leading to significant price spikes in ACs, including rice, wheat, and maize (Schmidhuber et al 2020). Even the cocoa market experienced dramatic price swings during the pandemic, driven by logistical challenges and supply chain disruptions (Organization 2021). More recently, the Russian–Ukrainian war has added

<footnote n="1">¹ Advancing Systems Analysis, International Institute for Applied Systems analysis, Schlossplatz 1, 2361 Laxenburg, Austria</footnote>

<footnote n="2">² School of Social and Policy Studies and The Steinhardt Museum of Natural History, Tel Aviv University, Tel Aviv, Israel</footnote>

<footnote n="3">³ Université Paris-Saclay, INRAE, AgroParisTech, UMR MIA-PS, 91120 Palaiseau, France</footnote>

<footnote>* Author to whom any correspondence should be addressed.</footnote>

<footnote n="4">4 for more information, see appendix A.</footnote>
<figure><img src="image_3.png" /></figure>

CrossMark

OPEN ACCESS

RECEIVED

23 April 2023

REVISED

9 November 2023

ACCEPTED FOR PUBLICATION

17 November 2023

PUBLISHED

5 December 2023

Original Content from
this work may be used
under the terms of the
Creative Commons
Attribution 4.0 licence.

Any further distribution
of this work must
maintain attribution to
the author(s) and the title
of the work, journal
citation and DOI.

<figure><img src="image_4.png" /></figure>

LETTER

# Investigating and forecasting the impact of crop production shocks on global commodity prices

Rotem Zelingher<fnref n="1" />,<fnref n="2" />,* and David Makowski<fnref n="3" />

E-mail: zelingher@iiasa.ac.at

**Keywords:** food-security, agricultural commodities, price forecasting, agricultural production, interpretable machine learning

## Abstract

In this study, we investigate and forecast the impact of crop production shocks on the global prices of three major international agricultural commodities: maize, soybean, and cocoa. We perform a thorough assessment of the forecasting performances of five econometric and machine learning models using 60 years of data. First, we train the models on production and price data to forecast the monthly price variations for each crop separately considering different time horizons. Next, we implement a cross-validation procedure to identify the models with the most accurate forecasting ability for each crop. After choosing the best forecaster, we identify the most influential producing areas using several local and global model-agnostic interpretation tools. Our findings indicate significant differences among commodities in terms of prediction accuracy, with cocoa exhibiting a higher level of prediction error compared to less volatile markets like maize and soybean. Our results reveal a significant influence of Northern America's maize and soybean production on the global prices of these commodities. The effects of production on prices are asymmetrical: small decreases in US production lead to substantial price increases, while small increases in production do not systematically decrease prices. In contrast, cocoa price variations are influenced by production coming from several regions, not from a single one.

## 1. Introduction

This paper introduces a novel machine learning (ML) approach to forecast agricultural commodity (AC) prices and identify the most influential producing regions, addressing a critical gap in the existing literature and informing policies and strategies for global food security. Decades of AC market instability have posed persistent challenges, impacting farmers, traders, and policymakers worldwide. Influenced by diverse factors such as supply-demand dynamics, weather conditions, geopolitical events, and financial speculation, the fluctuation in prices, as documented by the Food and Agriculture Organization (FAO) dataset (FAO 2023), underscores a critical issue. Historical instances like the 2007–2008 food crisis, the 2020 COVID-19 pandemic and the Ukraine–Russia war demonstrate the profound implications of price shocks on food security, societal stability, and global

supply chains (Kalkuhl 2016, Schmidhuber et al 2020, Glauber and Laborde Debucquet 2023).

This study navigates the complex terrain of price dynamics, particularly focusing on three globally traded ACs, namely maize, soybean, and cocoa<fnref n="4" />, emphasizing their historical impact on food security, especially in developing nations (Headey 2011, Kalkuhl 2016). The COVID-19 pandemic and subsequent disruptions in 2020 revealed vulnerabilities in global food supply chains, leading to significant price spikes in ACs, including rice, wheat, and maize (Schmidhuber et al 2020). Even the cocoa market experienced dramatic price swings during the pandemic, driven by logistical challenges and supply chain disruptions (Organization 2021). More recently, the Russian–Ukrainian war has added

<footnote n="1">¹ Advancing Systems Analysis, International Institute for Applied Systems analysis, Schlossplatz 1, 2361 Laxenburg, Austria</footnote>

<footnote n="2">² School of Social and Policy Studies and The Steinhardt Museum of Natural History, Tel Aviv University, Tel Aviv, Israel</footnote>

<footnote n="3">³ Université Paris-Saclay, INRAE, AgroParisTech, UMR MIA-PS, 91120 Palaiseau, France</footnote>

<footnote>* Author to whom any correspondence should be addressed.</footnote>

<footnote n="4">⁴ for more information, see appendix A.</footnote>
another layer of uncertainty and volatility to the global food market, as both countries are major producers and exporters of wheat and other grains (FAO 2023). The war has disrupted the Black Sea trade routes and caused prices to soar for staple foods that are essential for food security in many regions (Glauber and Laborde Debucquet 2023).

Price volatility in AC markets profoundly affects farmers, particularly smallholders who lack resources for effective price risk management (Wollni and Zeller 2007). Furthermore, price instability can strain food assistance programs, exacerbating food security challenges for vulnerable populations (Headey 2011). Anticipating price shocks is crucial for mitigating their impact on food security, and the literature emphasizes the importance of proactive measures, including effective risk management strategies for farmers and policies promoting market transparency (Wollni and Zeller 2007, Kalkuhl et al 2016).

ML, once considered complex, is now more easily accessible thanks to user-friendly methods and open-access databases (Henrique et al 2019, Zelingher and Makowski 2022), offering new opportunities for predicting commodity price variations. By using these methods and data to forecasting prices at a medium time horizon, our study thus addresses a critical gap in the existing literature.

This study evaluates five econometric and ML techniques to provide interpretable medium-term forecasts over different forecast horizons (1–12 months), with a focus on the accessibility of the methods and results to a wide audience. Notably, random forest (RF) and gradient boosting machine (GBM) emerge as top-performing models, showcasing significant variations in prediction accuracy across commodities. The study also unveils the distinctive influence of Northern American production changes, emphasizing their asymmetrical impact on maize and soybean prices.

In addition to model evaluation, the study explores the broader dynamics of agricultural commodity markets. It identifies influential producing regions, answering specific research questions about the regions or countries with the most substantial impact on selected commodity prices. The paper concludes with a nuanced discussion of findings, offering insights that extend beyond mere forecasting to inform policies and strategies in the intricate realm of global food markets.

The paper is structured as follows. Section 2 outlines the data used in the study. Section 3 presents the five models used in this study, including the open-source packages for their implementation. Furthermore, this section describes the method used to evaluate the forecasting performances of the models and the different model-agnostic techniques implemented to identify the most influential producing regions (or countries). Section 4 presents

the results for the three commodities. Section 5 discusses the findings and draws conclusions.

## 2. Data and methodology

### 2.1. Data

#### 2.1.1. Model output—monthly global price variation

We extracted global monthly price data for maize, soybean, and cocoa from the World Bank's commodity market database (World-Bank 2023) between January 1960 and December 2020 (732 values). To remove the effect of inflation, all three price time series were deflated into real 2010 USD values, using the agricultural price index of the corresponding period. Let us define $p_{m,y}^n$ as a nominal price relative to a month $m$ in a year $y$, $p_{m,y}^d$ as the deflated prices and $In_{m,y}$ as the price index, both relative to the same period. Setting 2010 as the year of basis ($In_{m,2010} \approx 100$) the deflation was as follows:

$$p_{m,y}^d = \frac{p_{m,y}^n \times In_{m,2010}}{In_{m,y}}. \quad (1)$$

Typically, globally traded crops are harvested in a main harvest season, according to the climate conditions of the area. Consequently, changes in production levels can potentially affect yearly price changes of that crop. On account of this, we define the dependent variable in the analysis as the proportion of price change relative to the same month $m$ of the previous year such as

$$p_{m,y} = \frac{p_{m,y}^{d} - p_{m,y-1}^{d}}{p_{m,y-1}^{d}} \quad (2)$$

for any year $y$.

Figure 1(left) presents the global monthly prices of the three AC's over the past six decades in real 2010 USD.

#### 2.1.2. Model predictors

Our dataset comprises annual crop yields and production. This information was sourced from the FAOstat database (FAO 2023) (1960–2020) and encompassed two geographical scales: national (individual countries) and regional (clusters of countries defined by the FAO). To illustrate, a representative regional cluster is Western Africa, spanning 16 countries including Nigeria, Ghana, and Côte d'Ivoire. The adopted methodology involved (i) adhering to FAOstat's region delineations, (ii) calculating regional production as the summation of national yields multiplied by respective national cultivated areas, and (iii) determining regional yield by dividing regional production by regional cultivated area.

To continue along the same line as the relative price change function (equation (2)), we transformed
another layer of uncertainty and volatility to the global food market, as both countries are major producers and exporters of wheat and other grains (FAO 2023). The war has disrupted the Black Sea trade routes and caused prices to soar for staple foods that are essential for food security in many regions (Glauber and Laborde Debucquet 2023).

Price volatility in AC markets profoundly affects farmers, particularly smallholders who lack resources for effective price risk management (Wollni and Zeller 2007). Furthermore, price instability can strain food assistance programs, exacerbating food security challenges for vulnerable populations (Headey 2011). Anticipating price shocks is crucial for mitigating their impact on food security, and the literature emphasizes the importance of proactive measures, including effective risk management strategies for farmers and policies promoting market transparency (Wollni and Zeller 2007, Kalkuhl et al 2016).

ML, once considered complex, is now more easily accessible thanks to user-friendly methods and open-access databases (Henrique et al 2019, Zelingher and Makowski 2022), offering new opportunities for predicting commodity price variations. By using these methods and data to forecasting prices at a medium time horizon, our study thus addresses a critical gap in the existing literature.

This study evaluates five econometric and ML techniques to provide interpretable medium-term forecasts over different forecast horizons (1–12 months), with a focus on the accessibility of the methods and results to a wide audience. Notably, random forest (RF) and gradient boosting machine (GBM) emerge as top-performing models, showcasing significant variations in prediction accuracy across commodities. The study also unveils the distinctive influence of Northern American production changes, emphasizing their asymmetrical impact on maize and soybean prices.

In addition to model evaluation, the study explores the broader dynamics of agricultural commodity markets. It identifies influential producing regions, answering specific research questions about the regions or countries with the most substantial impact on selected commodity prices. The paper concludes with a nuanced discussion of findings, offering insights that extend beyond mere forecasting to inform policies and strategies in the intricate realm of global food markets.

The paper is structured as follows. Section 2 outlines the data used in the study. Section 3 presents the five models used in this study, including the open-source packages for their implementation. Furthermore, this section describes the method used to evaluate the forecasting performances of the models and the different model-agnostic techniques implemented to identify the most influential producing regions (or countries). Section 4 presents

the results for the three commodities. Section 5 discusses the findings and draws conclusions.

## 2. Data and methodology

### 2.1. Data

#### 2.1.1. Model output—monthly global price variation

We extracted global monthly price data for maize, soybean, and cocoa from the World Bank's commodity market database (World-Bank 2023) between January 1960 and December 2020 (732 values). To remove the effect of inflation, all three price time series were deflated into real 2010 USD values, using the agricultural price index of the corresponding period. Let us define $p_{m,y}^n$ as a nominal price relative to a month $m$ in a year $y$, $p_{m,y}^d$ as the deflated prices and $In_{m,y}$ as the price index, both relative to the same period. Setting 2010 as the year of basis ($In_{m,2010} \approx 100$) the deflation was as follows:

$$p_{m,y}^d = \frac{p_{m,y}^n \times In_{m,2010}}{In_{m,y}}. \quad (1)$$

Typically, globally traded crops are harvested in a main harvest season, according to the climate conditions of the area. Consequently, changes in production levels can potentially affect yearly price changes of that crop. On account of this, we define the dependent variable in the analysis as the proportion of price change relative to the same month $m$ of the previous year such as

$$p_{m,y} = \frac{p_{m,y}^d - p_{m,y-1}^d}{p_{m,y-1}^d} \quad (2)$$

for any year $y$.

Figure 1(left) presents the global monthly prices of the three AC's over the past six decades in real 2010 USD.

#### 2.1.2. Model predictors

Our dataset comprises annual crop yields and production. This information was sourced from the FAOstat database (FAO 2023) (1960–2020) and encompassed two geographical scales: national (individual countries) and regional (clusters of countries defined by the FAO). To illustrate, a representative regional cluster is Western Africa, spanning 16 countries including Nigeria, Ghana, and Côte d'Ivoire. The adopted methodology involved (i) adhering to FAOstat's region delineations, (ii) calculating regional production as the summation of national yields multiplied by respective national cultivated areas, and (iii) determining regional yield by dividing regional production by regional cultivated area.

To continue along the same line as the relative price change function (equation (2)), we transformed
<figure><img src="image_4.png" /><figcaption>Figure 1. Prices of cocoa, maize, and soybean from 1961 to 2020 in real USD (left) and relative price change compared to the same month of the previous year (right). The red dashed horizontal lines at −0.5 and +0.5 indicate relative price changes of this magnitude.</figcaption></figure>

the national and regional yield and production data into relative annual changes, as follows:

$$x_{k,y} = \frac{q_{k,y} - q_{k,y-1}}{q_{k,y-1}} \quad (3)$$

where $q_{k,y}$ is the production (or yield) in a geographical unit (country or region) $k$ ($k = 1, \dots, K$) and year $y$, and $x_{k,y}$ is the relative production (or yield) change in the same year and area.

The values of $x_{k,y}$ obtained for different regions were used as predictors to forecast global price changes $p_{m,y}$. Appendix B features tables 7–12, presenting an inclusive inventory of the production (or yield) locations for each crop along with accompanying descriptive statistics for production (and yield). Annual yield and production changes were computed at the national and regional scales, leading to four different sets of predictors. These sets were considered separately because of their strong correlations. Note that the price change obtained in a given year and a given month was forecast using yield or production data available prior to that month. To do this, we used local crop calendars (ITC and UNCTAD/WTO 2001, FAS-USDA 2023) to determine the harvest periods for each crop in all the countries and regions considered.

Figure 2 shows the production data for the leading producers of each of the considered commodities, in

terms of total quantity produced between 1961 and 2020.

Of the three commodities, cocoa is the least stable in terms of price fluctuations (figure 1) and soybean has the highest change in terms of regional production share in the global soybean production (figure 2). Despite several important shocks over the years, the maize market is stable relative to soybean and cocoa, both in terms of price fluctuations and production trends.

A more complete description of the data is supplied in table 5 and data sources are provided in table 6, both in appendix B.

In addition to yield and production changes, we considered the price changes observed the previous years ($p_{m,y-1}$, $p_{m,y-2}$, ...) as additional predictors.

## 2.2. Models

### 2.2.1. Machine-learning models

This study examines the forecasting accuracy of three ML models, namely CART, RF, and GBM, to predict price changes $p_{m,y}$ for each month $m$ as a function of $x_{k,y}$, $k = 1, \dots, K$, using each set of predictors in turn (i.e. yield or production changes, at the national or regional scales). CART (Breiman et al 1984) builds an individual recursive tree. At each step, CART splits the data sample into two homogeneous groups relative to the highest ranked predictor, in a way that minimizes
<figure><img src="image_5.png" /><figcaption>Figure 1. Prices of cocoa, maize, and soybean from 1961 to 2020 in real USD (left) and relative price change compared to the same month of the previous year (right). The red dashed horizontal lines at −0.5 and +0.5 indicate relative price changes of this magnitude.</figcaption></figure>

the national and regional yield and production data into relative annual changes, as follows:

$$x_{k,y} = \frac{q_{k,y} - q_{k,y-1}}{q_{k,y-1}} \quad (3)$$

where $q_{k,y}$ is the production (or yield) in a geographical unit (country or region) $k$ ($k = 1, \dots, K$) and year $y$, and $x_{k,y}$ is the relative production (or yield) change in the same year and area.

The values of $x_{k,y}$ obtained for different regions were used as predictors to forecast global price changes $p_{m,y}$. Appendix B features tables 7–12, presenting an inclusive inventory of the production (or yield) locations for each crop along with accompanying descriptive statistics for production (and yield). Annual yield and production changes were computed at the national and regional scales, leading to four different sets of predictors. These sets were considered separately because of their strong correlations. Note that the price change obtained in a given year and a given month was forecast using yield or production data available prior to that month. To do this, we used local crop calendars (ITC and UNCTAD/WTO 2001, FAS-USDA 2023) to determine the harvest periods for each crop in all the countries and regions considered.

Figure 2 shows the production data for the leading producers of each of the considered commodities, in

terms of total quantity produced between 1961 and 2020.

Of the three commodities, cocoa is the least stable in terms of price fluctuations (figure 1) and soybean has the highest change in terms of regional production share in the global soybean production (figure 2). Despite several important shocks over the years, the maize market is stable relative to soybean and cocoa, both in terms of price fluctuations and production trends.

A more complete description of the data is supplied in table 5 and data sources are provided in table 6, both in appendix B.

In addition to yield and production changes, we considered the price changes observed the previous years ($p_{m,y-1}$, $p_{m,y-2}$, ...) as additional predictors.

## 2.2. Models

### 2.2.1. Machine-learning models

This study examines the forecasting accuracy of three ML models, namely CART, RF, and GBM, to predict price changes $p_{m,y}$ for each month $m$ as a function of $x_{k,y}$, $k = 1, \dots, K$, using each set of predictors in turn (i.e. yield or production changes, at the national or regional scales). CART (Breiman et al 1984) builds an individual recursive tree. At each step, CART splits the data sample into two homogeneous groups relative to the highest ranked predictor, in a way that minimizes
<figure><img src="image_5.png" /><figcaption>Figure 2. Cocoa, maize, and soybean production of five biggest producing regions. Data from 1961 to 2020: production as percentage of the global amount produced (left); production quantity, in 1000 tonnes (middle); and yield in 1000 hectograms per hectare (right).</figcaption></figure>

the forecasting error. CART continues the splitting process until reaching the point where the data partition does not reduce the forecasting error. The resulting set of splitting rules defines a tree that can be used to predict the target variable, here price change. We fit CART using the rpart package (Therneau et al 2019) in a regression form, in which the algorithm aims to reduce the residual sum of squares.

Although CART has the advantage of being simple to interpret, it is considered as a ‘weak learner’. Its high sensitivity to minor changes in the data makes it a rather unstable, thus not always reliable forecaster. To overcome this problem, we test another two ML techniques, namely RF and GBM.

RF (Hastie et al 2009) is a bagging algorithm processing a collection of random sub-datasets, training a single decision tree with each one, and combining all trees derived from all sub-datasets. RF predictions are usually smoother and more stable than CART. Here, we applied RF to forecast price changes using the R package randomForest (Liaw and Wiener 2002). To maximize the forecast ability of the model, we tuned RF by testing 14 different numbers of trees (hyper-parameter ntree, whose values were set equal to 10, 20, 30, 40, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, successively). Additionally, we searched for the optimal number of variables to sample randomly at each split (hyperparameter mtry). Values of ntree

and mtry were optimized to minimize the out-of-bag mean square error.

The third ML algorithm, GBM, relies on a boosting technique. As RF, GBM generates sub-datasets and fits trees to each of them but, unlike RF, the trees defined by GBM are not independent; each tree is designed to predict the errors of the previous tree. GBM was applied here using the gm package (Greenwell et al 2020). We tuned two hyperparameters of GBM, namely the number of trees (same numbers as those considered for RF) and the maximal depth of each tree (1, 2, ..., or 9). Both hyperparameters were optimized to minimize the out-of-bag mean square error.

### 2.2.2. Econometric models

Within the class of econometric models, we consider two types of models: a standard multivariate LM and the Trigonometric Seasonal Box Transformation with ARMA residuals Trend and Seasonal Components (TBATSs).

The model LM describes the impact of $x_{k,y}$ on the $p_{m,y}$ through linear relationships, as follows:

$$p_{m,y} = \alpha_0 + \alpha_1 p_{m,y-1} + \sum_{k=1}^{K} \beta_k x_{k,y} + \epsilon_{m,y} \quad (4)$$
<figure><img src="image_6.png" /><figcaption>Figure 2. Cocoa, maize, and soybean production of five biggest producing regions. Data from 1961 to 2020: production as percentage of the global amount produced (left); production quantity, in 1000 tonnes (middle); and yield in 1000 hectograms per hectare (right).</figcaption></figure>

the forecasting error. CART continues the splitting process until reaching the point where the data partition does not reduce the forecasting error. The resulting set of splitting rules defines a tree that can be used to predict the target variable, here price change. We fit CART using the rpart package (Therneau et al 2019) in a regression form, in which the algorithm aims to reduce the residual sum of squares.

Although CART has the advantage of being simple to interpret, it is considered as a ‘weak learner’. Its high sensitivity to minor changes in the data makes it a rather unstable, thus not always reliable forecaster. To overcome this problem, we test another two ML techniques, namely RF and GBM.

RF (Hastie et al 2009) is a bagging algorithm processing a collection of random sub-datasets, training a single decision tree with each one, and combining all trees derived from all sub-datasets. RF predictions are usually smoother and more stable than CART. Here, we applied RF to forecast price changes using the R package randomForest (Liaw and Wiener 2002). To maximize the forecast ability of the model, we tuned RF by testing 14 different numbers of trees (hyper-parameter ntree, whose values were set equal to 10, 20, 30, 40, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, successively). Additionally, we searched for the optimal number of variables to sample randomly at each split (hyperparameter mtry). Values of ntree

and mtry were optimized to minimize the out-of-bag mean square error.

The third ML algorithm, GBM, relies on a boosting technique. As RF, GBM generates sub-datasets and fits trees to each of them but, unlike RF, the trees defined by GBM are not independent; each tree is designed to predict the errors of the previous tree. GBM was applied here using the gbm package (Greenwell et al 2020). We tuned two hyperparameters of GBM, namely the number of trees (same numbers as those considered for RF) and the maximal depth of each tree (1, 2, ..., or 9). Both hyperparameters were optimized to minimize the out-of-bag mean square error.

### 2.2.2. Econometric models

Within the class of econometric models, we consider two types of models: a standard multivariate LM and the Trigonometric Seasonal Box Transformation with ARMA residuals Trend and Seasonal Components (TBATSs).

The model LM describes the impact of $x_{k,y}$ on the $p_{m,y}$ through linear relationships, as follows:

$$p_{m,y} = \alpha_0 + \alpha_1 p_{m,y-1} + \sum_{k=1}^{K} \beta_k x_{k,y} + \epsilon_{m,y} \quad (4)$$
where $\alpha_0$ is the intercept; $\alpha_1$ and $\beta_k$ are regression parameters and $\epsilon_{m,y}$ are the residuals, all relative to a month $m$. Note that this model includes two types of predictors; the price change in year $y-1$ and the production (or yield) changes in the $K$ regions. A separate model was fitted for each set of predictors (yield vs. production, national vs. regional scale) and each month (one set of regression parameters was estimated for each type of predictors and each month). For each model, the final set of predictors is selected using a stepwise selection based on the Akaike (1974) information criterion (AIC).

TBATS (De Livera et al 2011) is a more sophisticated time-series model used here to forecast price changes from a combination of trend, seasonal, and residual components, such as:

$$p_{m,y} = \text{Tr}_{m,y} + S_{m,y} + \text{ARMA}_{m,y} \quad (5)$$

where $\text{Tr}_{m,y}$ is the trend component (including a generalization of the Holt-Winters algorithm), $S_{m,y}$ is the seasonal component based on Fourier series, and $\text{ARMA}_{m,y}$ is the residual component expressed as an auto-regressive moving average (ARMA) model. The model can also use a Box-Cox transformation of the price data, if required. The TBATS model does not rely on production data but on past price data only. It is a powerful time series model for short-term forecasting (Kyriazi et al 2019, Chrułski 2021, Crespo Cuaresma et al 2021, Perone 2022). It includes an internal model selection procedure to automatically evaluate and select the best model among a large number of time series models (with/without seasonality, with/without trends, with/without Box-Cox transformation, with/without AR/MA components) based on the AIC. Here, we included the TBATS model as a benchmark in our evaluation to determine whether models using production data as predictors were able to outperform a powerful forecasting tool based solely on price data. TBATS was applied using the R package forecast (Hyndman et al 2020), and was used to predict price changes at a 1 to 12 month forecasting horizons.

### 2.3. Model training and selection

The process of model training and selection involved several crucial steps to build an effective predictive model. Firstly, the dataset was divided into a training set (consisting of the first $T$ years of observations, with $T \ge 44$) and a testing set (consisting of the next observation following the year $T$). In our study, we aim to forecast the global prices of ACs for the year following the last year of price observation. Our evaluation method was chosen to reflect this type of real-life application. To achieve this, we employ a rolling cross-validation approach (Hyndman and Athanasopoulos 2018) where we iteratively expand the training set by adding one year of data in each iteration. This approach allows us to forecast the price of

the following year using the data available up to the previous year. By selecting $T=44$ as the minimum training period, we ensure that our training sets encompass a substantial historical data range, providing a robust basis for model training. As we progress through each iteration, the training set expands (i.e. it includes $T=45, 46, \dots$ observations), capturing the temporal dynamics and fluctuations in the global food market over time. All models were trained using different combinations of hyperparameters as explained in the previous section, resulting in several variants for each model type. All model variants were then used to predict the observation (price change) available at the year $T+1$. This process is repeated using rolling cross-validation in order to predict all price changes (for the years $> 44$), with each model variant in turn.

The performances of the different models were evaluated month by month by comparing the RMSE of each model to the standard deviation of the observed price changes over the same time period. This comparison was done by computing a relative advantage (RA) index for each model, defined as

$$RA_m = 1 - \frac{\text{RMSE}_m}{\text{SD}(p_{m,y})} \quad (6)$$

⁵Finally, mean absolute error (MAE) is also used as an additional evaluation criterion to check the robustness of the model selection. Further details and explanations regarding the model comparison and the rationale behind it are available in appendix A.1.

In the last phase of our analysis, we used a one-way ANOVA and t-test to determine if there are any significant differences between the commodities in terms of mean values of RMSE and RA. To compare the performance of different forecasting methods, we select the top three forecasters that exhibit the highest accuracy among 16 possibilities ((3 ML models + 1 LM model) × 2 types of inputs (production/yield) × 2 geographic scales (regional/national)).

### 2.4. Model interpretation

Understanding the origins of the variability of the model predictions is essential to increase the confidence of the model users (Spavound and Kourentzes 2022). We implemented several model-agnostic techniques (Molnar 2022) that provide detailed and straightforward explanations of the model outcomes. These techniques were implemented with the most

<footnote n="5">⁵By definition, the value of $\text{SD}(p_{m,y})$ is equal to the RMSE of the historical data average. Thus, a value of RA higher than one indicates that the model considered performs better (i.e. has a lower RMSE) than the historical average. On the opposite, a value equal to or lower than one indicates that the model is not more accurate or is even less accurate than a constant prediction equal to the historical average.</footnote>
where $\alpha_0$ is the intercept; $\alpha_1$ and $\beta_k$ are regression parameters and $\epsilon_{m,y}$ are the residuals, all relative to a month $m$. Note that this model includes two types of predictors; the price change in year $y-1$ and the production (or yield) changes in the $K$ regions. A separate model was fitted for each set of predictors (yield vs. production, national vs. regional scale) and each month (one set of regression parameters was estimated for each type of predictors and each month). For each model, the final set of predictors is selected using a stepwise selection based on the Akaike (1974) information criterion (AIC).

TBATS (De Livera et al 2011) is a more sophisticated time-series model used here to forecast price changes from a combination of trend, seasonal, and residual components, such as:

$$p_{m,y} = \text{Tr}_{m,y} + S_{m,y} + \text{ARMA}_{m,y} \quad (5)$$

where Tr$_{m,y}$ is the trend component (including a generalization of the Holt-Winters algorithm), S$_{m,y}$ is the seasonal component based on Fourier series, and ARMA$_{m,y}$ is the residual component expressed as an auto-regressive moving average (ARMA) model. The model can also use a Box-Cox transformation of the price data, if required. The TBATS model does not rely on production data but on past price data only. It is a powerful time series model for short-term forecasting (Kyriazi et al 2019, Chrułski 2021, Crespo Cuaresma et al 2021, Perone 2022). It includes an internal model selection procedure to automatically evaluate and select the best model among a large number of time series models (with/without seasonality, with/without trends, with/without Box-Cox transformation, with/without AR/MA components) based on the AIC. Here, we included the TBATS model as a benchmark in our evaluation to determine whether models using production data as predictors were able to outperform a powerful forecasting tool based solely on price data. TBATS was applied using the R package forecast (Hyndman et al 2020), and was used to predict price changes at a 1 to 12 month forecasting horizons.

## 2.3. Model training and selection

The process of model training and selection involved several crucial steps to build an effective predictive model. Firstly, the dataset was divided into a training set (consisting of the first $T$ years of observations, with $T \ge 44$) and a testing set (consisting of the next observation following the year $T$). In our study, we aim to forecast the global prices of ACs for the year following the last year of price observation. Our evaluation method was chosen to reflect this type of real-life application. To achieve this, we employ a rolling cross-validation approach (Hyndman and Athanasopoulos 2018) where we iteratively expand the training set by adding one year of data in each iteration. This approach allows us to forecast the price of

the following year using the data available up to the previous year. By selecting $T=44$ as the minimum training period, we ensure that our training sets encompass a substantial historical data range, providing a robust basis for model training. As we progress through each iteration, the training set expands (i.e. it includes $T=45, 46, \text{etc observations}$), capturing the temporal dynamics and fluctuations in the global food market over time. All models were trained using different combinations of hyperparameters as explained in the previous section, resulting in several variants for each model type. All model variants were then used to predict the observation (price change) available at the year $T+1$. This process is repeated using rolling cross-validation in order to predict all price changes (for the years $> 44$), with each model variant in turn.

The performances of the different models were evaluated month by month by comparing the RMSE of each model to the standard deviation of the observed price changes over the same time period. This comparison was done by computing a relative advantage (RA) index for each model, defined as

$$RA_m = 1 - \frac{\text{RMSE}_m}{\text{SD}(p_{m,y})} \quad (6)$$

⁵Finally, mean absolute error (MAE) is also used as an additional evaluation criterion to check the robustness of the model selection. Further details and explanations regarding the model comparison and the rationale behind it are available in appendix A.1.

In the last phase of our analysis, we used a one-way ANOVA and t-test to determine if there are any significant differences between the commodities in terms of mean values of RMSE and RA. To compare the performance of different forecasting methods, we select the top three forecasters that exhibit the highest accuracy among 16 possibilities ((3 ML models + 1 LM model) × 2 types of inputs (production/yield) × 2 geographic scales (regional/national)).

## 2.4. Model interpretation

Understanding the origins of the variability of the model predictions is essential to increase the confidence of the model users (Spavound and Kourentzes 2022). We implemented several model-agnostic techniques (Molnar 2022) that provide detailed and straightforward explanations of the model outcomes. These techniques were implemented with the most

<footnote n="5">⁵By definition, the value of SD($p_{m,y}$) is equal to the RMSE of the historical data average. Thus, a value of RA higher than one indicates that the model considered performs better (i.e. has a lower RMSE) than the historical average. On the opposite, a value equal to or lower than one indicates that the model is not more accurate or is even less accurate than a constant prediction equal to the historical average.</footnote>
accurate models selected at each month<fnref n="6" />. The selec-
ted models were trained again using the whole set
of observations, and several global and local agnostic
methods were then implemented to shed light on the
nature of the forecasting results and the underlying
mechanism.

First, we analyzed and ranked the relative import-
ance of the predictors for predicting price changes
(Fisher et al 2018). We assessed the importance of
each x<sub>k,y</sub>, k = 1, ..., K by calculating its contribution
to the prediction errors of the model using a per-
mutation method. More precisely, we computed the
increase of mean square errors resulting from a ran-
dom permutation of each predictor in turn using
the *FeatureImp* R function. A large increase of mean
square errors indicates that the corresponding pre-
dictor is important. A low or absence of increase
indicates that the predictor is not important or even
useless. The results of this analysis are reported in rel-
ative importance plots for each crop in figures 4, 6,
and 8. On these plots, the ranking of the predictors is
indicated by the locations of the predictors along the
x-axis and by their colors, with 1 (dark purple) repres-
enting maximum importance and 0 (bright yellow)
representing no importance to the model. Error bars
are used to 95% confidence intervals of importance
values of the predictors.

Second, after measuring the impact of each pre-
dictor on the average prediction errors, we assessed
the contribution of each of the *K* predictors to each
individual price change prediction. To achieve this,
we implemented the game-theory approach, Shapley
(Shapley 1952), which measures the contribution of
a given model predictor to a given model predic-
tion. Here, Shapley values describe the contribution
of the regional/national yields/production to pre-
dicted price variations. These values can be used to
identifying the origins of the most extreme predicted
price variations corresponding to major price shocks.
Shapley values provide information on both the dir-
ections and the magnitudes of the effects of the pre-
dictors. When plotted as a function of the values of
x<sub>k,y</sub>, they provide a visualization tool to assess the risk
of price shocks as a function of the levels of variation
in regional production. The average absolute Shapley
values (computed by region and country) can also
serve for ranking the producing regions or countries
according to their influence on predicted price vari-
ations. Here, this approach was implemented with
the *iml* R package (Molnar *et al* 2018). The robust-
ness of the results obtained with the Shapley values is
assessed using an alternative approach based on local
models (LIME) implemented with the *iml* R package
(Molnar *et al* 2018).

3. Results

**3.1. Accuracy of model forecasts**

Table 1 presents the best forecasting options for differ-
ent months and different crops. The names of the ML
models correspond to the models showing the highest
RA for predicting price change at each month. The
name between brackets indicates the type of input,
which was found to have the most substantial impact
on price. The numerical values represent the values of
RA of the best ML models (RA<sub>ML</sub>) and of TBATS for
the lags (months).

For maize, the one-month-ahead predictions
made with TBATS tend to be higher in accuracy
than those obtained using ML techniques. The best
ML tool (GBM with national production inputs for
predicting price change in May) achieved a RA of
60%, while the highest RA for TBATS was 80%
in March, when considering one-month-ahead fore-
casts. The good performances of TBATS are not sus-
tained for extended time-horizon forecasts. Indeed,
the RA of TBATS decreases rapidly with each incre-
ment of time horizon (table 1). Thus, when con-
sidering longer term projections, the model com-
parison no longer favors TBATS and, compared to
other alternatives, GBM shows higher RA levels when
using regional production as predictors. In general,
for maize, production-based forecasts tend to be
more accurate than yield-based forecasts. In com-
parison to GBM, the models CART and LM tend to
have lower RA values, especially when using regional
predictors.

Results obtained for soybean, as shown in table 1,
are rather different. First, the average performance
of TBATS was lower, with average RA values of 58%
for one-month-ahead forecasts and 47% for two-
months-ahead forecasts. Second, there was a relat-
ively high variability in the forecasting accuracy of
the ML methods. Here, the highest RA reached 90%
in March with GBM and regional yields as predict-
ors, but was only equal to 29% in August. Overall,
for soybean, higher RA levels were achieved during
the first six months of the year, especially for price
changes in February (RA₂ = 87%), March and April
(RA₄ = 78%). Lastly, while GBM performed system-
atically better for maize, the RF method performed
better in forecasting soybean price variations for four
months of the year only.

For cocoa, TBATS has an average RA of 62% for
a one-month-ahead forecasting period and 52% for a
two-month-ahead forecasting horizon. On the other
hand, the use of machine learning techniques, par-
ticularly RF and GBM, shows more accurate price
forecasts, reaching a maximum value of 76% for the
August price change (regional yields as predictors).
The results also highlight the weakness of the linear
regression model, especially when relying on national
predictors.

<footnote n="6">⁶ TBATS is not concerned by the interpretation stage as it does not take crop production into account and is considered to be a black box.</footnote>
accurate models selected at each month<fnref n="6" />. The selec-
ted models were trained again using the whole set
of observations, and several global and local agnostic
methods were then implemented to shed light on the
nature of the forecasting results and the underlying
mechanism.

First, we analyzed and ranked the relative import-
ance of the predictors for predicting price changes
(Fisher et al 2018). We assessed the importance of
each x<sub>k,y</sub>, k = 1, ..., K by calculating its contribution
to the prediction errors of the model using a per-
mutation method. More precisely, we computed the
increase of mean square errors resulting from a ran-
dom permutation of each predictor in turn using
the *FeatureImp* R function. A large increase of mean
square errors indicates that the corresponding pre-
dictor is important. A low or absence of increase
indicates that the predictor is not important or even
useless. The results of this analysis are reported in rel-
ative importance plots for each crop in figures 4, 6,
and 8. On these plots, the ranking of the predictors is
indicated by the locations of the predictors along the
x-axis and by their colors, with 1 (dark purple) repres-
enting maximum importance and 0 (bright yellow)
representing no importance to the model. Error bars
are used to 95% confidence intervals of importance
values of the predictors.

Second, after measuring the impact of each pre-
dictor on the average prediction errors, we assessed
the contribution of each of the *K* predictors to each
individual price change prediction. To achieve this,
we implemented the game-theory approach, Shapley
(Shapley 1952), which measures the contribution of
a given model predictor to a given model predic-
tion. Here, Shapley values describe the contribution
of the regional/national yields/production to pre-
dicted price variations. These values can be used to
identifying the origins of the most extreme predicted
price variations corresponding to major price shocks.
Shapley values provide information on both the dir-
ections and the magnitudes of the effects of the pre-
dictors. When plotted as a function of the values of
x<sub>k,y</sub>, they provide a visualization tool to assess the risk
of price shocks as a function of the levels of variation
in regional production. The average absolute Shapley
values (computed by region and country) can also
serve for ranking the producing regions or countries
according to their influence on predicted price vari-
ations. Here, this approach was implemented with
the *iml* R package (Molnar *et al* 2018). The robust-
ness of the results obtained with the Shapley values is
assessed using an alternative approach based on local
models (LIME) implemented with the *iml* R package
(Molnar *et al* 2018).

3. Results

**3.1. Accuracy of model forecasts**

Table 1 presents the best forecasting options for differ-
ent months and different crops. The names of the ML
models correspond to the models showing the highest
RA for predicting price change at each month. The
name between brackets indicates the type of input,
which was found to have the most substantial impact
on price. The numerical values represent the values of
RA of the best ML models (RA<sub>ML</sub>) and of TBATS for
the lags (months).

For maize, the one-month-ahead predictions made with TBATS tend to be higher in accuracy than those obtained using ML techniques. The best ML tool (GBM with national production inputs for predicting price change in May) achieved a RA of 60%, while the highest RA for TBATS was 80% in March, when considering one-month-ahead forecasts. The good performances of TBATS are not sustained for extended time-horizon forecasts. Indeed, the RA of TBATS decreases rapidly with each increment of time horizon (table 1). Thus, when considering longer term projections, the model comparison no longer favors TBATS and, compared to other alternatives, GBM shows higher RA levels when using regional production as predictors. In general, for maize, production-based forecasts tend to be more accurate than yield-based forecasts. In comparison to GBM, the models CART and LM tend to have lower RA values, especially when using regional predictors.

Results obtained for soybean, as shown in table 1,
are rather different. First, the average performance
of TBATS was lower, with average RA values of 58%
for one-month-ahead forecasts and 47% for two-
months-ahead forecasts. Second, there was a relat-
ively high variability in the forecasting accuracy of
the ML methods. Here, the highest RA reached 90%
in March with GBM and regional yields as predict-
ors, but was only equal to 29% in August. Overall,
for soybean, higher RA levels were achieved during
the first six months of the year, especially for price
changes in February (RA<sub>2</sub> = 87%), March and April
(RA<sub>4</sub> = 78%). Lastly, while GBM performed system-
atically better for maize, the RF method performed
better in forecasting soybean price variations for four
months of the year only.

For cocoa, TBATS has an average RA of 62% for
a one-month-ahead forecasting period and 52% for a
two-month-ahead forecasting horizon. On the other
hand, the use of machine learning techniques, par-
ticularly RF and GBM, shows more accurate price
forecasts, reaching a maximum value of 76% for the
August price change (regional yields as predictors).
The results also highlight the weakness of the linear
regression model, especially when relying on national
predictors.

<footnote n="6">⁶ TBATS is not concerned by the interpretation stage as it does not take crop production into account and is considered to be a black box.</footnote>
<table><caption>**Table 1.** Relative advantage (RA) of the best machine learning models and TBATS for different months and different crops. The names and values reported for each month correspond to the models showing the highest RA for predicting price change at this period. NA's are reported for TBATS models with RAs values lower than the RA value of the best machine learning model.</caption><thead><tr><th colspan="2">a. Maize</th><th colspan="1">ML model (input)</th><th colspan="5">TBATS (by lag)</th></tr><tr><th>Month</th><th></th><th>RA<sub>ML</sub></th><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th></tr></thead><tbody><tr><td>1</td><td>GBM (regional production)</td><td>0.57</td><td>0.74</td><td>0.71</td><td>0.61</td><td>NA</td><td>NA</td></tr><tr><td>2</td><td>GBM (regional production)</td><td>0.50</td><td>0.73</td><td>0.67</td><td>0.64</td><td>0.56</td><td>NA</td></tr><tr><td>3</td><td>GBM (regional production)</td><td>0.50</td><td>0.80</td><td>0.70</td><td>0.64</td><td>0.60</td><td>0.54</td></tr><tr><td>4</td><td>GBM (countries' production)</td><td>0.54</td><td>0.59</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>5</td><td>GBM (countries' production)</td><td>0.60</td><td>0.70</td><td>0.68</td><td>0.62</td><td>0.55</td><td>0.51</td></tr><tr><td>6</td><td>GBM (countries' production)</td><td>0.48</td><td>0.58</td><td>0.56</td><td>0.50</td><td>NA</td><td>NA</td></tr><tr><td>7</td><td>GBM (regional production)</td><td>0.46</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>8</td><td>GBM (regional production)</td><td>0.57</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>9</td><td>GBM (regional yield)</td><td>0.47</td><td>0.54</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>10</td><td>GBM (regional production)</td><td>0.58</td><td>0.60</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>11</td><td>GBM (regional production)</td><td>0.45</td><td>0.56</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>12</td><td>GBM (regional production)</td><td>0.52</td><td>0.70</td><td>0.62</td><td>0.53</td><td>NA</td><td>NA</td></tr></tbody><thead><tr><th colspan="2">b. Soybean</th><th colspan="1">ML model (input)</th><th colspan="5">TBATS (by lag)</th></tr><tr><th>Month</th><th></th><th>RA<sub>ML</sub></th><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th></tr></thead><tbody><tr><td>1</td><td>GBM (countries' yield)</td><td>0.85</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>2</td><td>GBM (regional yield)</td><td>0.87</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>3</td><td>GBM (regional yield)</td><td>0.90</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>4</td><td>RF (countries' production)</td><td>0.78</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>5</td><td>RF (countries' yield)</td><td>0.74</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>6</td><td>GBM (countries' yield)</td><td>0.87</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>7</td><td>RF (regional yield)</td><td>0.33</td><td>0.52</td><td>0.42</td><td>0.36</td><td>NA</td><td>NA</td></tr><tr><td>8</td><td>RF (countries' yield)</td><td>0.44</td><td>0.54</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>9</td><td>RF (countries' yield)</td><td>0.44</td><td>0.47</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>10</td><td>GBM (regional yield)</td><td>0.61</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>11</td><td>GBM (countries' yield)</td><td>0.65</td><td>0.66</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>12</td><td>GBM (countries' yield)</td><td>0.68</td><td>0.76</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr></tbody><thead><tr><th colspan="2">c. Cocoa</th><th colspan="1">ML model (input)</th><th colspan="5">TBATS (by lag)</th></tr><tr><th>Month</th><th></th><th>RA<sub>ML</sub></th><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th></tr></thead><tbody><tr><td>1</td><td>RF (countries' production)</td><td>0.66</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>2</td><td>RF (countries' yield)</td><td>0.68</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>3</td><td>RF (countries' production)</td><td>0.61</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>4</td><td>RF (countries' production)</td><td>0.55</td><td>0.75</td><td>0.57</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>5</td><td>RF (countries' production)</td><td>0.58</td><td>0.75</td><td>0.68</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>6</td><td>GBM (countries' yield)</td><td>0.65</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>7</td><td>RF (regional yield)</td><td>0.60</td><td>0.63</td><td>0.62</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>8</td><td>RF (regional yield)</td><td>0.76</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>9</td><td>RF (countries' yield)</td><td>0.58</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>10</td><td>GBM (countries' production)</td><td>0.73</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>11</td><td>GBM (countries' production)</td><td>0.62</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>12</td><td>RF (countries' production)</td><td>0.68</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr></tbody></table>

## 3.2. Differences in performances between commodities

The differences in RMSE and RA between commodities are evaluated in figure 3. Regarding the RA, all three commodities have a mean RA greater than 0.5, indicating an overall advantage of model-based price forecasting compared to constant predictions. Soybean has the highest average RA (0.68), suggesting a stronger benefit of model-based forecasting for this commodity. The mean RA of cocoa is very similar (0.64). In terms of RMSE, soybean shows the

lowest mean RMSE (0.04) and cocoa has the highest mean (0.10). The three RMSE values are significantly different ($p < 0.05$) according on a two-sided t-test.

## 3.3. Effect of crop production on prices

In this section, we present the results of the analysis of the importance of the predictors on the prediction accuracy of the models (figures 4, 6, and 8). Next, we show the partial dependence of price changes on the most important predictors (figures 5, 7, and 9).
<table><caption>**Table 1.** Relative advantage (RA) of the best machine learning models and TBATS for different months and different crops. The names and values reported for each month correspond to the models showing the highest RA for predicting price change at this period. NA's are reported for TBATS models with RAs values lower than the RA value of the best machine learning model.</caption><thead><tr><th colspan="2">a. Maize</th><th colspan="1">ML model (input)</th><th colspan="5">TBATS (by lag)</th></tr><tr><th>Month</th><th></th><th>RA<sub>ML</sub></th><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th></tr></thead><tbody><tr><td>1</td><td>GBM (regional production)</td><td>0.57</td><td>0.74</td><td>0.71</td><td>0.61</td><td>NA</td><td>NA</td></tr><tr><td>2</td><td>GBM (regional production)</td><td>0.50</td><td>0.73</td><td>0.67</td><td>0.64</td><td>0.56</td><td>NA</td></tr><tr><td>3</td><td>GBM (regional production)</td><td>0.50</td><td>0.80</td><td>0.70</td><td>0.64</td><td>0.60</td><td>0.54</td></tr><tr><td>4</td><td>GBM (countries' production)</td><td>0.54</td><td>0.59</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>5</td><td>GBM (countries' production)</td><td>0.60</td><td>0.70</td><td>0.68</td><td>0.62</td><td>0.55</td><td>0.51</td></tr><tr><td>6</td><td>GBM (countries' production)</td><td>0.48</td><td>0.58</td><td>0.56</td><td>0.50</td><td>NA</td><td>NA</td></tr><tr><td>7</td><td>GBM (regional production)</td><td>0.46</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>8</td><td>GBM (regional production)</td><td>0.57</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>9</td><td>GBM (regional yield)</td><td>0.47</td><td>0.54</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>10</td><td>GBM (regional production)</td><td>0.58</td><td>0.60</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>11</td><td>GBM (regional production)</td><td>0.45</td><td>0.56</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>12</td><td>GBM (regional production)</td><td>0.52</td><td>0.70</td><td>0.62</td><td>0.53</td><td>NA</td><td>NA</td></tr></tbody><thead><tr><th colspan="2">b. Soybean</th><th colspan="1">ML model (input)</th><th colspan="5">TBATS (by lag)</th></tr><tr><th>Month</th><th></th><th>RA<sub>ML</sub></th><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th></tr></thead><tbody><tr><td>1</td><td>GBM (countries' yield)</td><td>0.85</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>2</td><td>GBM (regional yield)</td><td>0.87</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>3</td><td>GBM (regional yield)</td><td>0.90</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>4</td><td>RF (countries' production)</td><td>0.78</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>5</td><td>RF (countries' yield)</td><td>0.74</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>6</td><td>GBM (countries' yield)</td><td>0.87</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>7</td><td>RF (regional yield)</td><td>0.33</td><td>0.52</td><td>0.42</td><td>0.36</td><td>NA</td><td>NA</td></tr><tr><td>8</td><td>RF (countries' yield)</td><td>0.44</td><td>0.54</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>9</td><td>RF (countries' yield)</td><td>0.44</td><td>0.47</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>10</td><td>GBM (regional yield)</td><td>0.61</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>11</td><td>GBM (countries' yield)</td><td>0.65</td><td>0.66</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>12</td><td>GBM (countries' yield)</td><td>0.68</td><td>0.76</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr></tbody><thead><tr><th colspan="2">c. Cocoa</th><th colspan="1">ML model (input)</th><th colspan="5">TBATS (by lag)</th></tr><tr><th>Month</th><th></th><th>RA<sub>ML</sub></th><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th></tr></thead><tbody><tr><td>1</td><td>RF (countries' production)</td><td>0.66</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>2</td><td>RF (countries' yield)</td><td>0.68</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>3</td><td>RF (countries' production)</td><td>0.61</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>4</td><td>RF (countries' production)</td><td>0.55</td><td>0.75</td><td>0.57</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>5</td><td>RF (countries' production)</td><td>0.58</td><td>0.75</td><td>0.68</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>6</td><td>GBM (countries' yield)</td><td>0.65</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>7</td><td>RF (regional yield)</td><td>0.60</td><td>0.63</td><td>0.62</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>8</td><td>RF (regional yield)</td><td>0.76</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>9</td><td>RF (countries' yield)</td><td>0.58</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>10</td><td>GBM (countries' production)</td><td>0.73</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>11</td><td>GBM (countries' production)</td><td>0.62</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr><tr><td>12</td><td>RF (countries' production)</td><td>0.68</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td><td>NA</td></tr></tbody></table>

## 3.2. Differences in performances between commodities

The differences in RMSE and RA between commodities are evaluated in figure 3. Regarding the RA, all three commodities have a mean RA greater than 0.5, indicating an overall advantage of model-based price forecasting compared to constant predictions. Soybean has the highest average RA (0.68), suggesting a stronger benefit of model-based forecasting for this commodity. The mean RA of cocoa is very similar (0.64). In terms of RMSE, soybean shows the

lowest mean RMSE (0.04) and cocoa has the highest mean (0.10). The three RMSE values are significantly different ($p < 0.05$) according on a two-sided t-test.

## 3.3. Effect of crop production on prices

In this section, we present the results of the analysis of the importance of the predictors on the prediction accuracy of the models (figures 4, 6, and 8). Next, we show the partial dependence of price changes on the most important predictors (figures 5, 7, and 9).
<figure><img src="image_6.png" /><figcaption>**Figure 3.** Model performances for maize, soybean, and cocoa according to the RMSE (left) and relative advantage (RA = 1 – RMSE/Standard deviation of the price data) of model-based predictions versus constant predictions (right). The distributions of RMSE and RA across forecasting scenarios are presented in box plots, and the results of statistical tests comparing the mean values of RMSE and RA are presented in black. Signif. codes: ns: *p* > 0.05, not significant; \*: *p* ≤ 0.05; \*\*: *p* ≤ 0.01; \*\*\*: *p* ≤ 0.001; \*\*\*\*: *p* ≤ 0.0001.</figcaption></figure>

<figure><img src="image_7.png" /><figcaption>**Figure 4.** Assessment of the importance of regional production changes for maize price forecasting in January with the GBM model, using regional production changes as predictors. The left-side box-plot displays the distribution of Shapley values, indicating the impact of each predictor (regional production change) on the model output (price change). The gray points within each box represent the individual Shapley values attributed to specific predictor variables. The right-side feature importance plot illustrates the contribution of each predictor to the RMSE resulting from a random permutation, with dark purple indicating highly influential predictors and orange representing low-impact features.</figcaption></figure>
<figure><img src="image_7.png" /><figcaption>**Figure 3.** Model performances for maize, soybean, and cocoa according to the RMSE (left) and relative advantage (RA = 1 - RMSE/Standard deviation of the price data) of model-based predictions versus constant predictions (right). The distributions of RMSE and RA across forecasting scenarios are presented in box plots, and the results of statistical tests comparing the mean values of RMSE and RA are presented in black. Signif. codes: ns: *p* > 0.05, not significant; \*: *p* ≤ 0.05; \*\*: *p* ≤ 0.01; \*\*\*: *p* ≤ 0.001; \*\*\*\*: *p* ≤ 0.0001.</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>**Figure 4.** Assessment of the importance of regional production changes for maize price forecasting in January with the GBM model, using regional production changes as predictors. The left-side box-plot displays the distribution of Shapley values, indicating the impact of each predictor (regional production change) on the model output (price change). The gray points within each box represent the individual Shapley values attributed to specific predictor variables. The right-side feature importance plot illustrates the contribution of each predictor to the RMSE resulting from a random permutation, with dark purple indicating highly influential predictors and orange representing low-impact features.</figcaption></figure>
<figure><img src="image_8.png" /><figcaption>**Figure 5.** Shapley-based partial dependence plot (PDP) for maize. The black points scattered along the x-axis represent individual feature values, while their corresponding Shapley values are depicted on the y-axis. The smoothing curve derived from these points (in red) forms the PDP, which offers insights into the connection between relative production changes in Northern America (on the left) and Western Asia (on the right) and the projected relative maize price changes in January. The predictions are based on the GBM model, chosen for its high forecasting accuracy. The gray bands indicate the 95% confidence intervals.</figcaption></figure>

<figure><img src="image_9.png" /><figcaption>**Figure 6.** Assessment of the importance of national production changes for soybean price forecasting in April with the RF model using national production changes as predictors. The left-side box-plot displays the distribution of Shapley values, indicating the impact of each predictor (country's production change) on the model output (price change). The gray points within each box represent the individual Shapley values attributed to specific predictor variables. The right-side feature importance plot illustrates the contribution of each predictor to the RMSE resulting from a random permutation, with dark purple indicating highly influential features and orange representing low-impact predictors.</figcaption></figure>
<figure><img src="image_9.png" /><figcaption>**Figure 5.** Shapley-based partial dependence plot (PDP) for maize. The black points scattered along the x-axis represent individual feature values, while their corresponding Shapley values are depicted on the y-axis. The smoothing curve derived from these points (in red) forms the PDP, which offers insights into the connection between relative production changes in Northern America (on the left) and Western Asia (on the right) and the projected relative maize price changes in January. The predictions are based on the GBM model, chosen for its high forecasting accuracy. The gray bands indicate the 95% confidence intervals.</figcaption></figure>

<figure><img src="image_10.png" /><figcaption>**Figure 6.** Assessment of the importance of national production changes for soybean price forecasting in April with the RF model using national production changes as predictors. The left-side box-plot displays the distribution of Shapley values, indicating the impact of each predictor (country's production change) on the model output (price change). The gray points within each box represent the individual Shapley values attributed to specific predictor variables. The right-side feature importance plot illustrates the contribution of each predictor to the RMSE resulting from a random permutation, with dark purple indicating highly influential features and orange representing low-impact predictors.</figcaption></figure>
<figure><img src="image_10.png" /><figcaption>**Figure 7.** Shapley-based partial dependence plot (PDP) for soybean. The black points scattered along the x-axis represent individual feature values, while their corresponding Shapley values are depicted on the y-axis. The smoothing curve derived from these points (in red) forms the PDP, which offers insights into the connection between relative production changes in Mexico (on the left) and the USA (on the right) and the projected relative soybean price changes in April. The predictions are based on the RF model, chosen for its high forecasting accuracy. The gray bands indicate the 95% confidence intervals.</figcaption></figure>

<figure><img src="image_11.png" /><figcaption>**Figure 8.** Assessment of the importance of national yield changes for cocoa price forecasting in September with the RF model using national yield changes as predictors. The left-side box-plot displays the distribution of Shapley values, indicating the impact of each predictor (national yield change) on the model output (price change). The gray points within each box represent the individual Shapley values attributed to specific predictor variables. The right-side feature importance plot illustrates the contribution of each feature to the RMSE resulting from a random permutation, with dark purple indicating highly influential features and orange representing low-impact predictors.</figcaption></figure>
<figure><img src="image_11.png" /><figcaption>**Figure 7.** Shapley-based partial dependence plot (PDP) for soybean. The black points scattered along the x-axis represent individual feature values, while their corresponding Shapley values are depicted on the y-axis. The smoothing curve derived from these points (in red) forms the PDP, which offers insights into the connection between relative production changes in Mexico (on the left) and the USA (on the right) and the projected relative soybean price changes in April. The predictions are based on the RF model, chosen for its high forecasting accuracy. The gray bands indicate the 95% confidence intervals.</figcaption></figure>

<figure><img src="image_12.png" /><figcaption>**Figure 8.** Assessment of the importance of national yield changes for cocoa price forecasting in September with the RF model using national yield changes as predictors. The left-side box-plot displays the distribution of Shapley values, indicating the impact of each predictor (national yield change) on the model output (price change). The gray points within each box represent the individual Shapley values attributed to specific predictor variables. The right-side feature importance plot illustrates the contribution of each feature to the RMSE resulting from a random permutation, with dark purple indicating highly influential features and orange representing low-impact predictors.</figcaption></figure>
<figure><img src="image_12.png" /><figcaption>**Figure 9.** Shapley-based partial dependence plot (PDP) for cocoa. The black points scattered along the x-axis represent individual feature values, while their corresponding Shapley values are depicted on the y-axis. The smoothing curve derived from these points (in red) forms the PDP, which offers insights into the connection between relative yield changes in Cote d'Ivoire (top left), Equatorial Guinea (top right), Nigeria (bottom left), and Papua New Guinea (bottom right) and the projected relative cocoa price changes in September. The predictions are based on the RF model, chosen for its high forecasting accuracy. The gray bands indicate the 95% confidence intervals.</figcaption></figure>

### 3.3.1. Maize

The model with the highest level of accuracy for predicting changes in January's maize price is GBM, using regional production data as predictors. Figure 4 indicates the most and least influential variables, and reveals that the production changes in Northern America have the strongest influence on price change predictions (mean absolute Shapley value = 0.062, relative importance = 0.53). The next most influential region, with a significant influence gap, is Western Asia (mean absolute Shapley value = 0.03, relative importance = 0.25). The influence of the other variables is considerably lower, and often close to zero. Similar results were obtained for most of the year. The variables are colored according to their level of relative importance.<fnref n="7" /> Overall, these findings underscore the significant impact of Northern America on world maize prices and highlight the

importance of considering regional factors when analyzing commodity price dynamics.

Figure 5 focuses on the two predictors with the highest relative importance: Northern America (left) and Western Asia (right). The partial dependence plots (PDPs) displayed on this figure reveal that production changes in Northern America have a stronger impact on world maize prices compared to Western Asia. The PDPs further indicated that an increase (decrease) of production in North America and Western Asia tends to decrease (increase) the maize price. The Shapley values computed for Western Asia are relatively evenly distributed along the regression line, with respect to the Y-axis, indicating a more consistent marginal effect. In contrast, the values obtained for Northern America are more extreme, with a higher density toward the top and bottom of the chart. The effects of an increase and decrease in production are asymmetrical. Small decreases in US production lead to substantial price increases, while small increases in production tend do not always decrease maize prices. An increase of US production needs to reach a certain level before inducing a decline of price. Inherent uncertainty arises when examining the Shapley value trends for the most extreme production changes in Northern America.

<footnote n="7">⁷ The results obtained when using LIME tend to be more extreme. It seems that LIME, due to its simplicity and being based on a linear model, yields unstable results in the presence of extreme values. However, we find LIME very useful for understanding the model, and therefore we choose to use it, but place the results of the analysis in the appendices (See figure 11).</footnote>
<figure><img src="image_13.png" /><figcaption>**Figure 9.** Shapley-based partial dependence plot (PDP) for cocoa. The black points scattered along the x-axis represent individual feature values, while their corresponding Shapley values are depicted on the y-axis. The smoothing curve derived from these points (in red) forms the PDP, which offers insights into the connection between relative yield changes in Cote d'Ivoire (top left), Equatorial Guinea (top right), Nigeria (bottom left), and Papua New Guinea (bottom right) and the projected relative cocoa price changes in September. The predictions are based on the RF model, chosen for its high forecasting accuracy. The gray bands indicate the 95% confidence intervals.</figcaption></figure>

### 3.3.1. Maize

The model with the highest level of accuracy for predicting changes in January's maize price is GBM, using regional production data as predictors. Figure 4 indicates the most and least influential variables, and reveals that the production changes in Northern America have the strongest influence on price change predictions (mean absolute Shapley value = 0.062, relative importance = 0.53). The next most influential region, with a significant influence gap, is Western Asia (mean absolute Shapley value = 0.03, relative importance = 0.25). The influence of the other variables is considerably lower, and often close to zero. Similar results were obtained for most of the year. The variables are colored according to their level of relative importance.<fnref n="7" /> Overall, these findings underscore the significant impact of Northern America on world maize prices and highlight the

importance of considering regional factors when analyzing commodity price dynamics.

Figure 5 focuses on the two predictors with the highest relative importance: Northern America (left) and Western Asia (right). The partial dependence plots (PDPs) displayed on this figure reveal that production changes in Northern America have a stronger impact on world maize prices compared to Western Asia. The PDPs further indicated that an increase (decrease) of production in North America and Western Asia tends to decrease (increase) the maize price. The Shapley values computed for Western Asia are relatively evenly distributed along the regression line, with respect to the Y-axis, indicating a more consistent marginal effect. In contrast, the values obtained for Northern America are more extreme, with a higher density toward the top and bottom of the chart. The effects of an increase and decrease in production are asymmetrical. Small decreases in US production lead to substantial price increases, while small increases in production tend do not always decrease maize prices. An increase of US production needs to reach a certain level before inducing a decline of price. Inherent uncertainty arises when examining the Shapley value trends for the most extreme production changes in Northern America.

<footnote n="7">⁷ The results obtained when using LIME tend to be more extreme. It seems that LIME, due to its simplicity and being based on a linear model, yields unstable results in the presence of extreme values. However, we find LIME very useful for understanding the model, and therefore we choose to use it, but place the results of the analysis in the appendices (See figure 11).</footnote>
The limited number of observations below –45% of production change induces wider confidence intervals, while greater confidence is attributed to the predicted outcomes for production changes within the –30% to +30% range due to a larger number of data.

These findings highlight the importance of considering both the magnitude and distribution of marginal effects when interpreting the results of the models. Furthermore, the results suggest that regional factors, such as production changes in Northern America and Western Asia, play a critical role in shaping global commodity prices.

### 3.3.2. Soybean

For soybean price variation in April, the most reliable predictions were made through RF, with countries' production as input. Figure 6 shows that the USA is the most influential producing country for soybean price changes, similar to maize price changes, with a negative correlation between production and soybean price changes. The relative influence of the other explanatory variables was lower and often closer to zero, as also reflected in figure 12. Nevertheless, some of the results obtained for soybean are different from those obtained for maize, such as the lower Shapley values obtained for soybean production in the USA compared to those for maize. The role of the USA in driving positive changes in the global soybean prices was found to be weaker compared to its effect in the maize market, as revealed by the lower Shapley values obtained for Soybean.

Figure 7 shows the partial dependence between price change and the two most influential predictors, namely soybean production in Mexico, on the left, and the USA, on the right. Both PDPs reveal a negative correlation with soybean price variations in April, with the primary effect occurring during the narrow transition phase from slightly negative to positive production changes. Production variations in the USA have a stronger effect on price change in April than production variation in Mexico. Interestingly, small increases in soybean production in the USA do not systematically lead to lower prices. Thus, a price decrease is achieved only for annual production increases close to +5% in the USA.

### 3.3.3. Cocoa

Compared with the results obtained for maize and soybean, the results of the cocoa model appear to be less conclusive. The most precise predictions were usually obtained with the RF model using national yield changes as predictors. For cocoa, prices seem to be influenced by several countries. Surprisingly, Cote d'Ivoire, the main cocoa producer (accounting for approximately 31% of the total cocoa production since 1960), is not ranked first according to its relative

importance<fnref n="8" />. Figure 8 indicates that several countries have similar importance, such as Nigeria (0.18, [0.14, 0.22]), Papua New Guinea (0.14, [0.11,0.17]) and Cote d'Ivoire (0.14, [0.10,0.16]). To further elucidate the relationship between yield and cocoa price changes, we examine PDPs for the four countries with the highest relative importance. As depicted in figure 9, these countries display a weak-negative relationship between yield variation and price variation. Overall, our results demonstrate the inherent price variability within the cocoa market and the significant impact of domestic yield changes on international prices.

## 4. Discussion

This study introduces an innovative methodology for medium-term AC price analysis and forecasting, employing ML tools and data in open-access. We show the practical interest of this methodological framework through three case studies on maize, soybean and cocoa. Our findings highlight the importance of a rigorous model selection procedure, considering specific commodities, trading periods, and market characteristics. In particular, our results highlight the advantage of considering multiple forecasting methods in order to find the most accurate one for a given crop and forecast period (Kourentzes et al 2019, Wang et al 2022). The study underscores the superiority of ML over linear regression models, emphasizing the need for modeling complex nonlinear relationships. Nevertheless, distinct results emerge across the three commodities considered: TBATS and GBM excel for maize, RF performs better for cocoa, especially with national production data, while different ML methods provide good results for soybean depending on the month of forecast. Clearly, our results show that the best model should be selected on a case-by-case basis and that it is unlikely that a single model will be the best in all situations.

Our results also reveal that the model accuracy depends on the commodity, as model performance was found to be lower for cocoa due to its higher price instability compared to maize and soybean. More precise results were obtained for maize and soybeans, whose price variations were found to be closely linked to the annual variation in agricultural production among one or two major producers.

While acknowledging the impact of AC storage on price dynamics (Wright 2009, von Braun and Torero 2009, Bobenrieth et al 2013), we focused on production and yield data due to practical challenges

<footnote n="8">⁸ Nigeria is ranked significantly high to predict September prices, which corresponds to the beginning of the cocoa trade year. Brazil is the only country who's cocoa trade year starts in May.</footnote>
The limited number of observations below –45% of production change induces wider confidence intervals, while greater confidence is attributed to the predicted outcomes for production changes within the –30% to +30% range due to a larger number of data.

These findings highlight the importance of considering both the magnitude and distribution of marginal effects when interpreting the results of the models. Furthermore, the results suggest that regional factors, such as production changes in Northern America and Western Asia, play a critical role in shaping global commodity prices.

### 3.3.2. Soybean

For soybean price variation in April, the most reliable predictions were made through RF, with countries' production as input. Figure 6 shows that the USA is the most influential producing country for soybean price changes, similar to maize price changes, with a negative correlation between production and soybean price changes. The relative influence of the other explanatory variables was lower and often closer to zero, as also reflected in figure 12. Nevertheless, some of the results obtained for soybean are different from those obtained for maize, such as the lower Shapley values obtained for soybean production in the USA compared to those for maize. The role of the USA in driving positive changes in the global soybean prices was found to be weaker compared to its effect in the maize market, as revealed by the lower Shapley values obtained for Soybean.

Figure 7 shows the partial dependence between price change and the two most influential predictors, namely soybean production in Mexico, on the left, and the USA, on the right. Both PDPs reveal a negative correlation with soybean price variations in April, with the primary effect occurring during the narrow transition phase from slightly negative to positive production changes. Production variations in the USA have a stronger effect on price change in April than production variation in Mexico. Interestingly, small increases in soybean production in the USA do not systematically lead to lower prices. Thus, a price decrease is achieved only for annual production increases close to +5% in the USA.

### 3.3.3. Cocoa

Compared with the results obtained for maize and soybean, the results of the cocoa model appear to be less conclusive. The most precise predictions were usually obtained with the RF model using national yield changes as predictors. For cocoa, prices seem to be influenced by several countries. Surprisingly, Cote d'Ivoire, the main cocoa producer (accounting for approximately 31% of the total cocoa production since 1960), is not ranked first according to its relative

importance<fnref n="8" />. Figure 8 indicates that several countries have similar importance, such as Nigeria (0.18, [0.14, 0.22]), Papua New Guinea (0.14, [0.11,0.17]) and Cote d'Ivoire (0.14, [0.10,0.16]). To further elucidate the relationship between yield and cocoa price changes, we examine PDPs for the four countries with the highest relative importance. As depicted in figure 9, these countries display a weak-negative relationship between yield variation and price variation. Overall, our results demonstrate the inherent price variability within the cocoa market and the significant impact of domestic yield changes on international prices.

## 4. Discussion

This study introduces an innovative methodology for medium-term AC price analysis and forecasting, employing ML tools and data in open-access. We show the practical interest of this methodological framework through three case studies on maize, soybean and cocoa. Our findings highlight the importance of a rigorous model selection procedure, considering specific commodities, trading periods, and market characteristics. In particular, our results highlight the advantage of considering multiple forecasting methods in order to find the most accurate one for a given crop and forecast period (Kourentzes et al 2019, Wang et al 2022). The study underscores the superiority of ML over linear regression models, emphasizing the need for modeling complex nonlinear relationships. Nevertheless, distinct results emerge across the three commodities considered: TBATS and GBM excel for maize, RF performs better for cocoa, especially with national production data, while different ML methods provide good results for soybean depending on the month of forecast. Clearly, our results show that the best model should be selected on a case-by-case basis and that it is unlikely that a single model will be the best in all situations.

Our results also reveal that the model accuracy depends on the commodity, as model performance was found to be lower for cocoa due to its higher price instability compared to maize and soybean. More precise results were obtained for maize and soybeans, whose price variations were found to be closely linked to the annual variation in agricultural production among one or two major producers.

While acknowledging the impact of AC storage on price dynamics (Wright 2009, von Braun and Torero 2009, Bobenrieth et al 2013), we focused on production and yield data due to practical challenges

<footnote n="8">⁸ Nigeria is ranked significantly high to predict September prices, which corresponds to the beginning of the cocoa trade year. Brazil is the only country who's cocoa trade year starts in May.</footnote>
in obtaining comprehensive stocks data for a large number of countries. In this paper, we compared a wide range of methods, both parametric and non-parametric, based on statistical models and MLs. In the future, it will be interesting to use additional methods, for example more flexible regression models such as generalized additive models that are able to cope with changing trends over time, or such as multi-layer neural networks that offer great flexibility. However, these methods are data-intensive, and it is not certain that they will give good results with relatively short time series. It is worth noting that our methodological framework could be easily adapted to implement and compare other forecasting techniques.

Acknowledging data constraints and local market dynamics, our methodology could benefit from alternative data sources like satellite-derived vegetation indices (Anderson et al. 2023). Further research should address data limitations and regional market dynamics to enhance reliability. Overall, our study provides an accessible toolbox for analyzing and forecasting agricultural commodity prices in the medium term, aimed at non-specialist users. Despite its limitations, this methodology could contribute to informed decision-making in global food markets.

## 5. Conclusion

Food security is a complex issue that refers to the state of having reliable access to a sufficient quantity of nutritious and affordable food to meet one's dietary needs. It encompasses the four dimensions of food availability, access, utilization, and stability. Access to food is a crucial aspect of food security, often determined by the relationship between the consumers' incomes and the price they pay for food. While food is considered a fundamental right, disparities in access to food still exist, particularly in low-income countries (FAO 2018). However, governments can mitigate the instability of food prices in their country by monitoring global markets, and farmers can plan their harvest and maximize profits by using existing models. According to Gilbert and Morgan (2010), many governments try to stabilize food prices in their countries. Yet, understanding and analyzing global food markets require financial knowledge and economic means that may not be available to all stakeholders (Olofsson 2020).

To contribute in the development of accurate and accessible price forecasting tools, we designed a methodological framework combining simple ML models and open-access databases. We showed that, when rigorously trained, these models could lead to accurate commodity price forecasting and allow

decision-makers to understand the origins of price fluctuations.

By implementing the proposed framework, stakeholders can gain insights into global food markets, enabling them to make informed decisions and take actions to promote food security, based on public data and software.

## Data availability statement

All data that support the findings of this study are included within the article (and any supplementary files).

## Acknowledgments

The authors thank Nikolay Khabarov, Anna Shchiptsova, Sebastian Poledna and the Advancing Systems Analysis Program at IIASA for fruitful and valuable input. The authors thank Ansa Heyl for her assistance in proofing the manuscript.

## Ethical statement

The project participants respect and follow good research practices<fnref n="9" />. The project does not give rise to any potential ethical, safety-related, or regulatory issues<fnref n="10" />.

## Funding

The authors gratefully acknowledge funding from IIASA along with the Israeli Ministry of Science, Technology and Space, and the other National Member Organizations that support IIASA. This work was partly funded by the CLAND Institute of convergence in France (16-CONV-0003).

## Appendix A. Further information on models

### A.1. Commodities in focus

We focus our study on three globally traded ACs, namely maize, soybean, and cocoa. Maize is a crucial AC, used as bio-energy, feed, and food, both in developed and developing countries (FAO 2023). The USA is the largest maize producer, responsible for over 30% of the global supply.

Soybean is the most traded tropical grain worldwide and is produced in over 100 countries (De Maria et al 2020). While the USA was responsible for 70% of

<footnote n="9">⁹ For example, see *The European Code of Conduct for Research Integrity*.</footnote>

<footnote n="10">¹⁰ According to ETHICS ISSUES table—CHECKLIST of H2020 programme and EU's Ethics for Researchers.</footnote>
in obtaining comprehensive stocks data for a large number of countries. In this paper, we compared a wide range of methods, both parametric and non-parametric, based on statistical models and MLs. In the future, it will be interesting to use additional methods, for example more flexible regression models such as generalized additive models that are able to cope with changing trends over time, or such as multi-layer neural networks that offer great flexibility. However, these methods are data-intensive, and it is not certain that they will give good results with relatively short time series. It is worth noting that our methodological framework could be easily adapted to implement and compare other forecasting techniques.

Acknowledging data constraints and local market dynamics, our methodology could benefit from alternative data sources like satellite-derived vegetation indices (Anderson et al. 2023). Further research should address data limitations and regional market dynamics to enhance reliability. Overall, our study provides an accessible toolbox for analyzing and forecasting agricultural commodity prices in the medium term, aimed at non-specialist users. Despite its limitations, this methodology could contribute to informed decision-making in global food markets.

## 5. Conclusion

Food security is a complex issue that refers to the state of having reliable access to a sufficient quantity of nutritious and affordable food to meet one's dietary needs. It encompasses the four dimensions of food availability, access, utilization, and stability. Access to food is a crucial aspect of food security, often determined by the relationship between the consumers' incomes and the price they pay for food. While food is considered a fundamental right, disparities in access to food still exist, particularly in low-income countries (FAO 2018). However, governments can mitigate the instability of food prices in their country by monitoring global markets, and farmers can plan their harvest and maximize profits by using existing models. According to Gilbert and Morgan (2010), many governments try to stabilize food prices in their countries. Yet, understanding and analyzing global food markets require financial knowledge and economic means that may not be available to all stakeholders (Olofsson 2020).

To contribute in the development of accurate and accessible price forecasting tools, we designed a methodological framework combining simple ML models and open-access databases. We showed that, when rigorously trained, these models could lead to accurate commodity price forecasting and allow

decision-makers to understand the origins of price fluctuations.

By implementing the proposed framework, stakeholders can gain insights into global food markets, enabling them to make informed decisions and take actions to promote food security, based on public data and software.

## Data availability statement

All data that support the findings of this study are included within the article (and any supplementary files).

## Acknowledgments

The authors thank Nikolay Khabarov, Anna Shchiptsova, Sebastian Poledna and the Advancing Systems Analysis Program at IIASA for fruitful and valuable input. The authors thank Ansa Heyl for her assistance in proofing the manuscript.

## Ethical statement

The project participants respect and follow good research practices<fnref n="9" />. The project does not give rise to any potential ethical, safety-related, or regulatory issues<fnref n="10" />.

## Funding

The authors gratefully acknowledge funding from IIASA along with the Israeli Ministry of Science, Technology and Space, and the other National Member Organizations that support IIASA. This work was partly funded by the CLAND Institute of convergence in France (16-CONV-0003).

## Appendix A. Further information on models

### A.1. Commodities in focus

We focus our study on three globally traded ACs, namely maize, soybean, and cocoa. Maize is a crucial AC, used as bio-energy, feed, and food, both in developed and developing countries (FAO 2023). The USA is the largest maize producer, responsible for over 30% of the global supply.

Soybean is the most traded tropical grain worldwide and is produced in over 100 countries (De Maria et al 2020). While the USA was responsible for 70% of

<footnote n="9">⁹ For example, see *The European Code of Conduct for Research Integrity*.</footnote>

<footnote n="10">¹⁰ According to ETHICS ISSUES table—CHECKLIST of H2020 programme and EU's Ethics for Researchers.</footnote>
the global soybean market share in 1961, its share has since decreased to less than 30%.

Cocoa is mainly traded by major importers in New York and London, far from its countries of origin (ITC and UNCTAD/WTO 2001). Western Africa and South America are the primary regions for cocoa production, with smallholder farmers in family farms typically producing it (ITC and UNCTAD/WTO 2001). The prices received by these cocoa producers are closely tied to the international market price, a factor that significantly influences their decisions regarding land allocation and crop choices. The fluctuations in international cocoa prices can directly impact the livelihoods and economic prospects of these farmers, influencing their choices between cultivating cocoa and other crops such as coffee trees (Gilbert 2016). By including cocoa in this study, along maize and soybean, we aim to shed light on the multifaceted impact of production shocks on diverse ACs, ranging from those with direct nutritional implications to those with intricate socioeconomic ramifications.

## A.2. Model comparison and the rational behind it

The model comparison process is grounded in the RA metric and RMSE. RA, calculated as 1 minus RMSE divided by the data's standard deviation, serves as a normalized RMSE and equivalent to a standard model skill score. RMSE, a widely adopted measure of forecasting accuracy for quantitative predictions, combines bias and variance errors into a unified metric. While RMSE remains the prevalent evaluation criterion, alternative approaches could be valuable in specific scenarios.

This criterion measures the RA of the model compared to hypothetical RMSE of a constant forecast equal to the mean price change. The mean value can be seen as a naïve forecast as it assumes that the future value are equal to the mean of the past observations. In addition to this naïve forecast, we considered standard linear models owing to their prominence in statistical analysis, along with TBATS, as univariate time series models commonly applied in commodity and agricultural price prediction.

Through application to three major ACs-maize, soybean, and cocoa-this methodology's practical significance is demonstrated.

## A.3. Predictive performance according to MAE criteria

We present three tables showing the MAE of the selected models for predicting the price changes of

<table><caption>**Table 2.** Maize.</caption><thead><tr><td>Month</td><td>ML model (input)</td><td>MAE<sub>ml</sub></td></tr></thead><tbody><tr><td>1</td><td>GBM (regional production)</td><td>0.05</td></tr><tr><td>2</td><td>GBM (regional production)</td><td>0.06</td></tr><tr><td>3</td><td>GBM (regional production)</td><td>0.06</td></tr><tr><td>4</td><td>GBM (countries' production)</td><td>0.05</td></tr><tr><td>5</td><td>GBM (countries' production)</td><td>0.04</td></tr><tr><td>6</td><td>GBM (countries' production)</td><td>0.08</td></tr><tr><td>7</td><td>RF (regional production)</td><td>0.08</td></tr><tr><td>8</td><td>GBM (regional production)</td><td>0.06</td></tr><tr><td>9</td><td>GBM (regional yield)</td><td>0.07</td></tr><tr><td>10</td><td>GBM (regional production)</td><td>0.06</td></tr><tr><td>11</td><td>RF (regional production)</td><td>0.07</td></tr><tr><td>12</td><td>GBM (regional production)</td><td>0.06</td></tr></tbody></table>

<table><caption>**Table 3.** Soybean.</caption><thead><tr><td>Month</td><td>ML model (input)</td><td>MAE<sub>ml</sub></td></tr></thead><tbody><tr><td>1</td><td>GBM (countries' yield)</td><td>0.02</td></tr><tr><td>2</td><td>GBM (regional yield)</td><td>0.01</td></tr><tr><td>3</td><td>GBM (regional yield)</td><td>0.00</td></tr><tr><td>4</td><td>RF (countries' production)</td><td>0.01</td></tr><tr><td>5</td><td>RF (countries' yield)</td><td>0.01</td></tr><tr><td>6</td><td>GBM (countries' yield)</td><td>0.02</td></tr><tr><td>7</td><td>RF (regional yield)</td><td>0.05</td></tr><tr><td>8</td><td>RF (countries' yield)</td><td>0.05</td></tr><tr><td>9</td><td>RF (countries' production)</td><td>0.06</td></tr><tr><td>10</td><td>GBM (regional yield)</td><td>0.03</td></tr><tr><td>11</td><td>GBM (countries' yield)</td><td>0.04</td></tr><tr><td>12</td><td>GBM (countries' yield)</td><td>0.04</td></tr></tbody></table>

<table><caption>**Table 4.** Cocoa.</caption><thead><tr><td>Month</td><td>ML model (input)</td><td>MAE<sub>ml</sub></td></tr></thead><tbody><tr><td>1</td><td>RF (countries' production)</td><td>0.06</td></tr><tr><td>2</td><td>RF (countries' yield)</td><td>0.05</td></tr><tr><td>3</td><td>RF (countries' production)</td><td>0.07</td></tr><tr><td>4</td><td>RF (countries' production)</td><td>0.11</td></tr><tr><td>5</td><td>RF (countries' production)</td><td>0.09</td></tr><tr><td>6</td><td>GBM (countries' yield)</td><td>0.07</td></tr><tr><td>7</td><td>RF (regional yield)</td><td>0.07</td></tr><tr><td>8</td><td>RF (regional yield)</td><td>0.04</td></tr><tr><td>9</td><td>RF (countries' yield)</td><td>0.08</td></tr><tr><td>10</td><td>GBM (countries' production)</td><td>0.04</td></tr><tr><td>11</td><td>GBM (countries' production)</td><td>0.07</td></tr><tr><td>12</td><td>RF (countries' production)</td><td>0.08</td></tr></tbody></table>

maize, soybean, and cocoa relative for each month. MAE is a robust metric for assessing the accuracy of predictions. The MAE is calculated as follows:

$$MAE_m = \frac{1}{T} \sum_{y=45}^{T} |\hat{p}_{m,y} - p_{m,y}|. \quad (7)$$
the global soybean market share in 1961, its share has since decreased to less than 30%.

Cocoa is mainly traded by major importers in New York and London, far from its countries of origin (ITC and UNCTAD/WTO 2001). Western Africa and South America are the primary regions for cocoa production, with smallholder farmers in family farms typically producing it (ITC and UNCTAD/WTO 2001). The prices received by these cocoa producers are closely tied to the international market price, a factor that significantly influences their decisions regarding land allocation and crop choices. The fluctuations in international cocoa prices can directly impact the livelihoods and economic prospects of these farmers, influencing their choices between cultivating cocoa and other crops such as coffee trees (Gilbert 2016). By including cocoa in this study, along maize and soybean, we aim to shed light on the multifaceted impact of production shocks on diverse ACs, ranging from those with direct nutritional implications to those with intricate socioeconomic ramifications.

## A.2. Model comparison and the rational behind it

The model comparison process is grounded in the RA metric and RMSE. RA, calculated as 1 minus RMSE divided by the data's standard deviation, serves as a normalized RMSE and equivalent to a standard model skill score. RMSE, a widely adopted measure of forecasting accuracy for quantitative predictions, combines bias and variance errors into a unified metric. While RMSE remains the prevalent evaluation criterion, alternative approaches could be valuable in specific scenarios.

This criterion measures the RA of the model compared to hypothetical RMSE of a constant forecast equal to the mean price change. The mean value can be seen as a naïve forecast as it assumes that the future value are equal to the mean of the past observations. In addition to this naïve forecast, we considered standard linear models owing to their prominence in statistical analysis, along with TBATS, as univariate time series models commonly applied in commodity and agricultural price prediction.

Through application to three major ACs-maize, soybean, and cocoa-this methodology's practical significance is demonstrated.

## A.3. Predictive performance according to MAE criteria

We present three tables showing the MAE of the selected models for predicting the price changes of

<table><caption>**Table 2.** Maize.</caption><thead><tr><td>Month</td><td>ML model (input)</td><td>MAE<sub>ml</sub></td></tr></thead><tbody><tr><td>1</td><td>GBM (regional production)</td><td>0.05</td></tr><tr><td>2</td><td>GBM (regional production)</td><td>0.06</td></tr><tr><td>3</td><td>GBM (regional production)</td><td>0.06</td></tr><tr><td>4</td><td>GBM (countries' production)</td><td>0.05</td></tr><tr><td>5</td><td>GBM (countries' production)</td><td>0.04</td></tr><tr><td>6</td><td>GBM (countries' production)</td><td>0.08</td></tr><tr><td>7</td><td>RF (regional production)</td><td>0.08</td></tr><tr><td>8</td><td>GBM (regional production)</td><td>0.06</td></tr><tr><td>9</td><td>GBM (regional yield)</td><td>0.07</td></tr><tr><td>10</td><td>GBM (regional production)</td><td>0.06</td></tr><tr><td>11</td><td>RF (regional production)</td><td>0.07</td></tr><tr><td>12</td><td>GBM (regional production)</td><td>0.06</td></tr></tbody></table>

<table><caption>**Table 3.** Soybean.</caption><thead><tr><td>Month</td><td>ML model (input)</td><td>MAE<sub>ml</sub></td></tr></thead><tbody><tr><td>1</td><td>GBM (countries' yield)</td><td>0.02</td></tr><tr><td>2</td><td>GBM (regional yield)</td><td>0.01</td></tr><tr><td>3</td><td>GBM (regional yield)</td><td>0.00</td></tr><tr><td>4</td><td>RF (countries' production)</td><td>0.01</td></tr><tr><td>5</td><td>RF (countries' yield)</td><td>0.01</td></tr><tr><td>6</td><td>GBM (countries' yield)</td><td>0.02</td></tr><tr><td>7</td><td>RF (regional yield)</td><td>0.05</td></tr><tr><td>8</td><td>RF (countries' yield)</td><td>0.05</td></tr><tr><td>9</td><td>RF (countries' production)</td><td>0.06</td></tr><tr><td>10</td><td>GBM (regional yield)</td><td>0.03</td></tr><tr><td>11</td><td>GBM (countries' yield)</td><td>0.04</td></tr><tr><td>12</td><td>GBM (countries' yield)</td><td>0.04</td></tr></tbody></table>

<table><caption>**Table 4.** Cocoa.</caption><thead><tr><td>Month</td><td>ML model (input)</td><td>MAE<sub>ml</sub></td></tr></thead><tbody><tr><td>1</td><td>RF (countries' production)</td><td>0.06</td></tr><tr><td>2</td><td>RF (countries' yield)</td><td>0.05</td></tr><tr><td>3</td><td>RF (countries' production)</td><td>0.07</td></tr><tr><td>4</td><td>RF (countries' production)</td><td>0.11</td></tr><tr><td>5</td><td>RF (countries' production)</td><td>0.09</td></tr><tr><td>6</td><td>GBM (countries' yield)</td><td>0.07</td></tr><tr><td>7</td><td>RF (regional yield)</td><td>0.07</td></tr><tr><td>8</td><td>RF (regional yield)</td><td>0.04</td></tr><tr><td>9</td><td>RF (countries' yield)</td><td>0.08</td></tr><tr><td>10</td><td>GBM (countries' production)</td><td>0.04</td></tr><tr><td>11</td><td>GBM (countries' production)</td><td>0.07</td></tr><tr><td>12</td><td>RF (countries' production)</td><td>0.08</td></tr></tbody></table>

maize, soybean, and cocoa relative for each month. MAE is a robust metric for assessing the accuracy of predictions. The MAE is calculated as follows:

$$MAE_m = \frac{1}{T} \sum_{y=45}^{T} |\hat{p}_{m,y} - p_{m,y}|. \quad (7)$$
Appendix B. Data and variables

<table><caption>Table 5. List of variables and indices used in the paper.</caption><thead><tr><th>Symbol</th><th>Values</th><th>Description</th></tr></thead><tbody><tr><td colspan="3" style="text-align: center;">Raw data</td></tr><tr><td>p<sub>m,j</sub><sup>d</sup></td><td></td><td>Time series of observed monthly prices, deflated</td></tr><tr><td>q<sub>k,j</sub></td><td></td><td>Time series of observed annual agricultural output</td></tr><tr><td colspan="3" style="text-align: center;">Variables, in relative annual change</td></tr><tr><td>p</td><td>P = (p<sub>1</sub>, p<sub>2</sub>, ..., p<sub>T</sub>)</td><td>Model input, observations in training set.</td></tr><tr><td>x</td><td>X<sub>k</sub> = (x<sub>t,1</sub>, x<sub>t,2</sub>, ..., x<sub>t,K</sub>)<br>X<sub>t</sub> = (x<sub>1,k</sub>, x<sub>2,k</sub>, ..., x<sub>T,k</sub>)</td><td>Model input, observations in training set (no TBATS)</td></tr><tr><td>p̂<sub>yf</sub></td><td>—</td><td>Model output, forecasted by the model</td></tr><tr><td>p̂<sub>dtb</sub></td><td>—</td><td>Model output, price forecasted by TBATS</td></tr><tr><td>p<sub>y</sub></td><td>—</td><td>Price to forecast</td></tr><tr><td colspan="3" style="text-align: center;">Indices</td></tr><tr><td>p<sub>d</sub></td><td>—</td><td>Price to forecast, using TBATS</td></tr><tr><td>j</td><td>j = 1960 1961,...,J</td><td>Years observed (j<sub>1</sub> = 1960)</td></tr><tr><td>y</td><td>y = 1, 2, ..., Y</td><td>Years observed, transformed to relative change (y ≥ j<sub>1</sub> - j<sub>0</sub> / j<sub>0</sub>)</td></tr><tr><td>k</td><td>k = 1, 2, ..., K</td><td>Number of features in model</td></tr><tr><td>m</td><td>m = 1, 2, ..., 12</td><td>Month, fixed, except for TBATS</td></tr><tr><td>d</td><td>d = [y<sub>1</sub>, 1], [y<sub>1</sub>, 2], ..., D</td><td>TBATS Date, composed of [y, m], D = [Y, m]</td></tr><tr><td>h</td><td>h = 1, 2, ..., H</td><td>Lag/Forecasting horizon (1 ≥ H ≥ 12), in monthly units</td></tr><tr><td>t</td><td>t = 1, 2, ..., T</td><td>Observations in training set</td></tr><tr><td>t<sup>tb</sup></td><td>t<sup>tb</sup> = 1, 2, ..., T<sup>tb</sup></td><td>TBATS training set</td></tr><tr><td>y<sup>f</sup></td><td>y<sub>45</sub> ≥ y<sup>f</sup> ≥ Y + 1</td><td>An instance (year) in testing set, one-step ahead forecast (f)</td></tr><tr><td>d<sup>tb</sup></td><td>d<sub>30</sub> ≥ d<sup>tb</sup> ≥ D + H</td><td>An instance (date) of price to forecast with TBATS (tb)</td></tr></tbody></table>

<table><caption>Table 6. Variable description and data sources.</caption><thead><tr><th>Data</th><th>Unites</th><th>Time-range</th><th>Source</th></tr></thead><tbody><tr><td colspan="4" style="text-align: center;">Final data</td></tr><tr><td>Production</td><td>% change/year</td><td>1962 – 2019</td><td></td></tr><tr><td>Yield</td><td>% change/year</td><td>1962 – 2019</td><td></td></tr><tr><td>Price</td><td>% change/year</td><td>01/1961 – 11/2020</td><td></td></tr><tr><td colspan="4" style="text-align: center;">Initial information</td></tr><tr><td>Price</td><td>Nominal USD/mt<sup>a</sup></td><td>01/1960 – 11/2020</td><td>World Bank,</td></tr><tr><td>Price index, Agriculture</td><td>USD (2010 = 100)</td><td>01/1960 – 11/2020</td><td>Pink Sheet (2023)</td></tr><tr><td>Production</td><td>tonnes/year</td><td>1961 – 2019</td><td>FAO STAT</td></tr><tr><td>Yield</td><td>hg/ha</td><td>1961 – 2019</td><td>(2023)</td></tr></tbody></table>

<footnote><sup>a</sup> Cocoa prices are given by kg. They were manually converted to units of metric tonnes</footnote>
Appendix B. Data and variables

<table><caption>Table 5. List of variables and indices used in the paper.</caption><thead><tr><th>Symbol</th><th>Values</th><th>Description</th></tr></thead><tbody><tr><td colspan="3" style="text-align: center; font-weight: bold;">Raw data</td></tr><tr><td>p<sub>m,j</sub><sup>d</sup></td><td></td><td>Time series of observed monthly prices, deflated</td></tr><tr><td>q<sub>k,j</sub></td><td></td><td>Time series of observed annual agricultural output</td></tr><tr><td colspan="3" style="text-align: center; font-weight: bold;">Variables, in relative annual change</td></tr><tr><td>p</td><td>P = (p<sub>1</sub>, p<sub>2</sub>, ..., p<sub>T</sub>)</td><td>Model input, observations in training set.</td></tr><tr><td>x</td><td>X<sub>k</sub> = (x<sub>t,1</sub>, x<sub>t,2</sub>, ..., x<sub>t,K</sub>)<br>X<sub>t</sub> = (x<sub>1,k</sub>, x<sub>2,k</sub>, ..., x<sub>T,k</sub>)</td><td>Model input, observations in training set (no TBATS)</td></tr><tr><td>p̂<sub>yf</sub></td><td>—</td><td>Model output, forecasted by the model</td></tr><tr><td>p̂<sub>dtb</sub></td><td>—</td><td>Model output, price forecasted by TBATS</td></tr><tr><td>p<sub>y</sub></td><td>—</td><td>Price to forecast</td></tr><tr><td colspan="3" style="text-align: center; font-weight: bold;">Indices</td></tr><tr><td>p<sub>d</sub></td><td>—</td><td>Price to forecast, using TBATS</td></tr><tr><td>j</td><td>j = 1960 1961,...,J</td><td>Years observed (j<sub>1</sub> = 1960)</td></tr><tr><td>y</td><td>y = 1, 2, ..., Y</td><td>Years observed, transformed to relative change (y ≥ j<sub>1</sub> - j<sub>0</sub> / j<sub>0</sub>)</td></tr><tr><td>k</td><td>k = 1, 2, ..., K</td><td>Number of features in model</td></tr><tr><td>m</td><td>m = 1, 2, ..., 12</td><td>Month, fixed, except for TBATS</td></tr><tr><td>d</td><td>d = [y<sub>1</sub>, 1], [y<sub>1</sub>, 2], ..., D</td><td>TBATS Date, composed of [y, m], D = [Y, m]</td></tr><tr><td>h</td><td>h = 1, 2, ..., H</td><td>Lag/Forecasting horizon (1 ≥ H ≥ 12), in monthly units</td></tr><tr><td>t</td><td>t = 1, 2, ..., T</td><td>Observations in training set</td></tr><tr><td>t<sup>tb</sup></td><td>t<sup>tb</sup> = 1, 2, ..., T<sup>tb</sup></td><td>TBATS training set</td></tr><tr><td>y<sup>f</sup></td><td>y<sub>45</sub> ≥ y<sup>f</sup> ≥ Y + 1</td><td>An instance (year) in testing set, one-step ahead forecast (f)</td></tr><tr><td>d<sup>tb</sup></td><td>d<sub>30</sub> ≥ d<sup>tb</sup> ≥ D + H</td><td>An instance (date) of price to forecast with TBATS (tb)</td></tr></tbody></table>

<table><caption>Table 6. Variable description and data sources.</caption><thead><tr><th>Data</th><th>Unites</th><th>Time-range</th><th>Source</th></tr></thead><tbody><tr><td colspan="4" style="text-align: center; font-weight: bold;">Final data</td></tr><tr><td>Production</td><td>% change/year</td><td>1962 – 2019</td><td></td></tr><tr><td>Yield</td><td>% change/year</td><td>1962 – 2019</td><td></td></tr><tr><td>Price</td><td>% change/year</td><td>01/1961 – 11/2020</td><td></td></tr><tr><td colspan="4" style="text-align: center; font-weight: bold;">Initial information</td></tr><tr><td>Price</td><td>Nominal USD/mt<sup>a</sup></td><td>01/1960 – 11/2020</td><td>World Bank,</td></tr><tr><td>Price index, Agriculture</td><td>USD (2010 = 100)</td><td>01/1960 – 11/2020</td><td>Pink Sheet (2023)</td></tr><tr><td>Production</td><td>tonnes/year</td><td>1961 – 2019</td><td>FAO STAT</td></tr><tr><td>Yield</td><td>hg/ha</td><td>1961 – 2019</td><td>(2023)</td></tr></tbody></table>

<footnote><sup>a</sup> Cocoa prices are given by kg. They were manually converted to units of metric tonnes</footnote>
Rolling standard deviation

<figure><img src="image_13.png" /><figcaption>**Figure 10.** Rolling Standard Deviation for cocoa, maize, and soybean's price variations. The rolling standard deviation measures the variability of price fluctuations over time. A higher value on the y-axis indicates greater instability in commodity prices during that period. The price of cocoa exhibits higher and more variable standard deviations than those of maize and soybean. This implies that the price of cocoa is more challenging to predict than the other two commodities.</figcaption></figure>

Maize

<table><caption>**Table 7.** Annual production and yield of maize, relative to region.</caption><thead><tr><th rowspan="2">Area</th><th colspan="3">Production (1000 tonne)</th><th colspan="3">Yield (hg/ha)</th></tr><tr><th>Average</th><th>Min.</th><th>Max</th><th>Average</th><th>Min.</th><th>Max.</th></tr></thead><tbody><tr><td>Caribbean</td><td>460</td><td>280</td><td>816</td><td>11 153</td><td>8536</td><td>16 556</td></tr><tr><td>Central America</td><td>18 051</td><td>7469</td><td>32 300</td><td>20 404</td><td>9738</td><td>36 458</td></tr><tr><td>Central Asia</td><td>1287</td><td>454</td><td>2275</td><td>48 623</td><td>25 634</td><td>69 552</td></tr><tr><td>Eastern Africa</td><td>14 897</td><td>5690</td><td>34 121</td><td>13 682</td><td>9523</td><td>20 753</td></tr><tr><td>Eastern Asia</td><td>106 304</td><td>17 712</td><td>267 523</td><td>39 413</td><td>12 276</td><td>62 944</td></tr><tr><td>Eastern Europe</td><td>34 855</td><td>18 752</td><td>88 839</td><td>37 404</td><td>18 402</td><td>69 972</td></tr><tr><td>Middle Africa</td><td>2674</td><td>1144</td><td>7645</td><td>8542</td><td>6741</td><td>10 903</td></tr><tr><td>Northern Africa</td><td>4982</td><td>1762</td><td>8688</td><td>41 231</td><td>15 914</td><td>69 852</td></tr><tr><td>Northern America</td><td>222 359</td><td>89 846</td><td>426 151</td><td>73 601</td><td>39 229</td><td>116 691</td></tr><tr><td>Northern Europe</td><td>41</td><td>1</td><td>203</td><td>35 396</td><td>10 000</td><td>75 841</td></tr><tr><td>Oceania</td><td>426</td><td>146</td><td>742</td><td>50 793</td><td>17 335</td><td>87 976</td></tr><tr><td>South-eastern Asia</td><td>19 551</td><td>4712</td><td>52 321</td><td>22 239</td><td>9017</td><td>46 328</td></tr><tr><td>South America</td><td>55 077</td><td>16 314</td><td>171 819</td><td>28 285</td><td>12 947</td><td>61 406</td></tr><tr><td>Southern Africa</td><td>9260</td><td>3445</td><td>17 891</td><td>24 027</td><td>7878</td><td>54 049</td></tr><tr><td>Southern Asia</td><td>16 435</td><td>6421</td><td>43 697</td><td>17 540</td><td>10 024</td><td>35 815</td></tr><tr><td>Southern Europe</td><td>20 903</td><td>10 388</td><td>29 670</td><td>54 903</td><td>21 126</td><td>90 657</td></tr><tr><td>Western Africa</td><td>8297</td><td>1803</td><td>26 043</td><td>12 141</td><td>6964</td><td>19 225</td></tr><tr><td>Western Asia</td><td>3140</td><td>847</td><td>7760</td><td>35 621</td><td>11 398</td><td>81 268</td></tr><tr><td>Western Europe</td><td>15 334</td><td>2121</td><td>26 826</td><td>69 800</td><td>22 556</td><td>103 049</td></tr></tbody></table>
Rolling standard deviation

<figure><img src="image_14.png" /><figcaption>**Figure 10.** Rolling Standard Deviation for cocoa, maize, and soybean's price variations. The rolling standard deviation measures the variability of price fluctuations over time. A higher value on the y-axis indicates greater instability in commodity prices during that period. The price of cocoa exhibits higher and more variable standard deviations than those of maize and soybean. This implies that the price of cocoa is more challenging to predict than the other two commodities.</figcaption></figure>

Maize

<table><caption>**Table 7.** Annual production and yield of maize, relative to region.</caption><thead><tr><th rowspan="2">Area</th><th colspan="3">Production (1000 tonne)</th><th colspan="3">Yield (hg/ha)</th></tr><tr><th>Average</th><th>Min.</th><th>Max</th><th>Average</th><th>Min.</th><th>Max.</th></tr></thead><tbody><tr><td>Caribbean</td><td>460</td><td>280</td><td>816</td><td>11 153</td><td>8536</td><td>16 556</td></tr><tr><td>Central America</td><td>18 051</td><td>7469</td><td>32 300</td><td>20 404</td><td>9738</td><td>36 458</td></tr><tr><td>Central Asia</td><td>1287</td><td>454</td><td>2275</td><td>48 623</td><td>25 634</td><td>69 552</td></tr><tr><td>Eastern Africa</td><td>14 897</td><td>5690</td><td>34 121</td><td>13 682</td><td>9523</td><td>20 753</td></tr><tr><td>Eastern Asia</td><td>106 304</td><td>17 712</td><td>267 523</td><td>39 413</td><td>12 276</td><td>62 944</td></tr><tr><td>Eastern Europe</td><td>34 855</td><td>18 752</td><td>88 839</td><td>37 404</td><td>18 402</td><td>69 972</td></tr><tr><td>Middle Africa</td><td>2674</td><td>1144</td><td>7645</td><td>8542</td><td>6741</td><td>10 903</td></tr><tr><td>Northern Africa</td><td>4982</td><td>1762</td><td>8688</td><td>41 231</td><td>15 914</td><td>69 852</td></tr><tr><td>Northern America</td><td>222 359</td><td>89 846</td><td>426 151</td><td>73 601</td><td>39 229</td><td>116 691</td></tr><tr><td>Northern Europe</td><td>41</td><td>1</td><td>203</td><td>35 396</td><td>10 000</td><td>75 841</td></tr><tr><td>Oceania</td><td>426</td><td>146</td><td>742</td><td>50 793</td><td>17 335</td><td>87 976</td></tr><tr><td>South-eastern Asia</td><td>19 551</td><td>4712</td><td>52 321</td><td>22 239</td><td>9017</td><td>46 328</td></tr><tr><td>South America</td><td>55 077</td><td>16 314</td><td>171 819</td><td>28 285</td><td>12 947</td><td>61 406</td></tr><tr><td>Southern Africa</td><td>9260</td><td>3445</td><td>17 891</td><td>24 027</td><td>7878</td><td>54 049</td></tr><tr><td>Southern Asia</td><td>16 435</td><td>6421</td><td>43 697</td><td>17 540</td><td>10 024</td><td>35 815</td></tr><tr><td>Southern Europe</td><td>20 903</td><td>10 388</td><td>29 670</td><td>54 903</td><td>21 126</td><td>90 657</td></tr><tr><td>Western Africa</td><td>8297</td><td>1803</td><td>26 043</td><td>12 141</td><td>6964</td><td>19 225</td></tr><tr><td>Western Asia</td><td>3140</td><td>847</td><td>7760</td><td>35 621</td><td>11 398</td><td>81 268</td></tr><tr><td>Western Europe</td><td>15 334</td><td>2121</td><td>26 826</td><td>69 800</td><td>22 556</td><td>103 049</td></tr></tbody></table>
<table><caption>**Table 8.** Annual production of maize, relative to countries.</caption><thead><tr><th rowspan="2">Area</th><th colspan="3">Production (1000 tonne)</th><th colspan="3">Yield (hg/ha)</th></tr><tr><th>Average</th><th>Min.</th><th>Max</th><th>Average</th><th>Min.</th><th>Max.</th></tr></thead><tbody><tr><td>Argentina</td><td>16 277</td><td>4360</td><td>60 526</td><td>44 173</td><td>16 481</td><td>78 615</td></tr><tr><td>Brazil</td><td>35 824</td><td>9036</td><td>103 964</td><td>26 840</td><td>11 606</td><td>57 734</td></tr><tr><td>Canada</td><td>7147</td><td>742</td><td>14 191</td><td>68 974</td><td>41 108</td><td>102 055</td></tr><tr><td>China</td><td>109 216</td><td>16 250</td><td>272 552</td><td>40 158</td><td>11 842</td><td>63 177</td></tr><tr><td>Egypt</td><td>4787</td><td>1617</td><td>8543</td><td>56 287</td><td>24 014</td><td>83 705</td></tr><tr><td>Ethiopia</td><td>3110</td><td>695</td><td>10 722</td><td>18 082</td><td>9000</td><td>42 404</td></tr><tr><td>European Union (27)</td><td>48 096</td><td>16 876</td><td>77 575</td><td>53 224</td><td>20 522</td><td>83 617</td></tr><tr><td>India</td><td>12 060</td><td>4312</td><td>31 650</td><td>16 654</td><td>8999</td><td>32 099</td></tr><tr><td>Indonesia</td><td>9316</td><td>2254</td><td>30 254</td><td>25 774</td><td>9214</td><td>57 237</td></tr><tr><td>Kenya</td><td>2417</td><td>940</td><td>4014</td><td>15 485</td><td>10 713</td><td>20 712</td></tr><tr><td>Mexico</td><td>15 804</td><td>6246</td><td>28 250</td><td>22 087</td><td>9867</td><td>40 697</td></tr><tr><td>Nigeria</td><td>4676</td><td>488</td><td>12 745</td><td>13 432</td><td>5731</td><td>22 545</td></tr><tr><td>Pakistan</td><td>2255</td><td>483</td><td>10 635</td><td>21 978</td><td>9956</td><td>64 356</td></tr><tr><td>Philippines</td><td>4376</td><td>1266</td><td>8300</td><td>16 099</td><td>6280</td><td>32 368</td></tr><tr><td>South Africa</td><td>9272</td><td>3277</td><td>17 551</td><td>26 274</td><td>7853</td><td>58 596</td></tr><tr><td>Thailand</td><td>3470</td><td>598</td><td>5300</td><td>30 389</td><td>14 140</td><td>45 981</td></tr><tr><td>Türkiye</td><td>2633</td><td>800</td><td>6750</td><td>44 074</td><td>11 994</td><td>96 358</td></tr><tr><td>Tanzania</td><td>2750</td><td>488</td><td>7039</td><td>13 023</td><td>4808</td><td>31 359</td></tr><tr><td>USA</td><td>220 543</td><td>88 504</td><td>412 262</td><td>74 988</td><td>39 184</td><td>117 433</td></tr></tbody></table>

## Soybean

<table><caption>**Table 9.** Annual production and yield of soybean, relative to region.</caption><thead><tr><th rowspan="2">Area</th><th colspan="3">Production (1000 tonne)</th><th colspan="3">Yield (hg/ha)</th></tr><tr><th>Average</th><th>Min.</th><th>Max</th><th>Average</th><th>Min.</th><th>Max.</th></tr></thead><tbody><tr><td>Central America</td><td>372</td><td>20</td><td>1041</td><td>18 198</td><td>12 851</td><td>21 343</td></tr><tr><td>Central Asia</td><td>96</td><td>3</td><td>296</td><td>15 181</td><td>6471</td><td>21 680</td></tr><tr><td>Eastern Africa</td><td>236</td><td>10</td><td>909</td><td>13 232</td><td>5535</td><td>22 381</td></tr><tr><td>Eastern Asia</td><td>12 127</td><td>6810</td><td>18 692</td><td>13 833</td><td>6421</td><td>19 349</td></tr><tr><td>Eastern Europe</td><td>1852</td><td>289</td><td>9367</td><td>10 194</td><td>3220</td><td>19 528</td></tr><tr><td>Middle Africa</td><td>21</td><td>1</td><td>89</td><td>7069</td><td>4611</td><td>8868</td></tr><tr><td>Northern Africa</td><td>60</td><td>1</td><td>178</td><td>25 726</td><td>9494</td><td>32 987</td></tr><tr><td>Northern America</td><td>62 764</td><td>18 393</td><td>127 931</td><td>23 266</td><td>15 346</td><td>34 600</td></tr><tr><td>Northern Europe</td><td>1</td><td>0</td><td>3</td><td>15 330</td><td>12 692</td><td>17 969</td></tr><tr><td>Oceania</td><td>51</td><td>0</td><td>130</td><td>15 412</td><td>3858</td><td>23 289</td></tr><tr><td>South America</td><td>54 264</td><td>297</td><td>186 189</td><td>20 080</td><td>9388</td><td>32 614</td></tr><tr><td>South-eastern Asia</td><td>1270</td><td>423</td><td>2508</td><td>10 668</td><td>6369</td><td>14 847</td></tr><tr><td>Southern Africa</td><td>235</td><td>2</td><td>1540</td><td>12 457</td><td>2500</td><td>22 929</td></tr><tr><td>Southern Asia</td><td>4504</td><td>8</td><td>14 928</td><td>8836</td><td>4656</td><td>13 589</td></tr><tr><td>Southern Europe</td><td>783</td><td>3</td><td>2114</td><td>24 190</td><td>6757</td><td>36 850</td></tr><tr><td>Western Africa</td><td>348</td><td>48</td><td>1359</td><td>5632</td><td>2293</td><td>12 655</td></tr><tr><td>Western Asia</td><td>69</td><td>4</td><td>252</td><td>22 692</td><td>7833</td><td>43 578</td></tr><tr><td>Western Europe</td><td>220</td><td>1</td><td>736</td><td>23 577</td><td>12 512</td><td>29 969</td></tr></tbody></table>
<table><caption>**Table 8.** Annual production of maize, relative to countries.</caption><thead><tr><th rowspan="2">Area</th><th colspan="3">Production (1000 tonne)</th><th colspan="3">Yield (hg/ha)</th></tr><tr><th>Average</th><th>Min.</th><th>Max.</th><th>Average</th><th>Min.</th><th>Max.</th></tr></thead><tbody><tr><td>Argentina</td><td>16 277</td><td>4360</td><td>60 526</td><td>44 173</td><td>16 481</td><td>78 615</td></tr><tr><td>Brazil</td><td>35 824</td><td>9036</td><td>103 964</td><td>26 840</td><td>11 606</td><td>57 734</td></tr><tr><td>Canada</td><td>7147</td><td>742</td><td>14 191</td><td>68 974</td><td>41 108</td><td>102 055</td></tr><tr><td>China</td><td>109 216</td><td>16 250</td><td>272 552</td><td>40 158</td><td>11 842</td><td>63 177</td></tr><tr><td>Egypt</td><td>4787</td><td>1617</td><td>8543</td><td>56 287</td><td>24 014</td><td>83 705</td></tr><tr><td>Ethiopia</td><td>3110</td><td>695</td><td>10 722</td><td>18 082</td><td>9000</td><td>42 404</td></tr><tr><td>European Union (27)</td><td>48 096</td><td>16 876</td><td>77 575</td><td>53 224</td><td>20 522</td><td>83 617</td></tr><tr><td>India</td><td>12 060</td><td>4312</td><td>31 650</td><td>16 654</td><td>8999</td><td>32 099</td></tr><tr><td>Indonesia</td><td>9316</td><td>2254</td><td>30 254</td><td>25 774</td><td>9214</td><td>57 237</td></tr><tr><td>Kenya</td><td>2417</td><td>940</td><td>4014</td><td>15 485</td><td>10 713</td><td>20 712</td></tr><tr><td>Mexico</td><td>15 804</td><td>6246</td><td>28 250</td><td>22 087</td><td>9867</td><td>40 697</td></tr><tr><td>Nigeria</td><td>4676</td><td>488</td><td>12 745</td><td>13 432</td><td>5731</td><td>22 545</td></tr><tr><td>Pakistan</td><td>2255</td><td>483</td><td>10 635</td><td>21 978</td><td>9956</td><td>64 356</td></tr><tr><td>Philippines</td><td>4376</td><td>1266</td><td>8300</td><td>16 099</td><td>6280</td><td>32 368</td></tr><tr><td>South Africa</td><td>9272</td><td>3277</td><td>17 551</td><td>26 274</td><td>7853</td><td>58 596</td></tr><tr><td>Thailand</td><td>3470</td><td>598</td><td>5300</td><td>30 389</td><td>14 140</td><td>45 981</td></tr><tr><td>Türkiye</td><td>2633</td><td>800</td><td>6750</td><td>44 074</td><td>11 994</td><td>96 358</td></tr><tr><td>Tanzania</td><td>2750</td><td>488</td><td>7039</td><td>13 023</td><td>4808</td><td>31 359</td></tr><tr><td>USA</td><td>220 543</td><td>88 504</td><td>412 262</td><td>74 988</td><td>39 184</td><td>117 433</td></tr></tbody></table>

## Soybean

<table><caption>**Table 9.** Annual production and yield of soybean, relative to region.</caption><thead><tr><th rowspan="2">Area</th><th colspan="3">Production (1000 tonne)</th><th colspan="3">Yield (hg/ha)</th></tr><tr><th>Average</th><th>Min.</th><th>Max.</th><th>Average</th><th>Min.</th><th>Max.</th></tr></thead><tbody><tr><td>Central America</td><td>372</td><td>20</td><td>1041</td><td>18 198</td><td>12 851</td><td>21 343</td></tr><tr><td>Central Asia</td><td>96</td><td>3</td><td>296</td><td>15 181</td><td>6471</td><td>21 680</td></tr><tr><td>Eastern Africa</td><td>236</td><td>10</td><td>909</td><td>13 232</td><td>5535</td><td>22 381</td></tr><tr><td>Eastern Asia</td><td>12 127</td><td>6810</td><td>18 692</td><td>13 833</td><td>6421</td><td>19 349</td></tr><tr><td>Eastern Europe</td><td>1852</td><td>289</td><td>9367</td><td>10 194</td><td>3220</td><td>19 528</td></tr><tr><td>Middle Africa</td><td>21</td><td>1</td><td>89</td><td>7069</td><td>4611</td><td>8868</td></tr><tr><td>Northern Africa</td><td>60</td><td>1</td><td>178</td><td>25 726</td><td>9494</td><td>32 987</td></tr><tr><td>Northern America</td><td>62 764</td><td>18 393</td><td>127 931</td><td>23 266</td><td>15 346</td><td>34 600</td></tr><tr><td>Northern Europe</td><td>1</td><td>0</td><td>3</td><td>15 330</td><td>12 692</td><td>17 969</td></tr><tr><td>Oceania</td><td>51</td><td>0</td><td>130</td><td>15 412</td><td>3858</td><td>23 289</td></tr><tr><td>South America</td><td>54 264</td><td>297</td><td>186 189</td><td>20 080</td><td>9388</td><td>32 614</td></tr><tr><td>South-eastern Asia</td><td>1270</td><td>423</td><td>2508</td><td>10 668</td><td>6369</td><td>14 847</td></tr><tr><td>Southern Africa</td><td>235</td><td>2</td><td>1540</td><td>12 457</td><td>2500</td><td>22 929</td></tr><tr><td>Southern Asia</td><td>4504</td><td>8</td><td>14 928</td><td>8836</td><td>4656</td><td>13 589</td></tr><tr><td>Southern Europe</td><td>783</td><td>3</td><td>2114</td><td>24 190</td><td>6757</td><td>36 850</td></tr><tr><td>Western Africa</td><td>348</td><td>48</td><td>1359</td><td>5632</td><td>2293</td><td>12 655</td></tr><tr><td>Western Asia</td><td>69</td><td>4</td><td>252</td><td>22 692</td><td>7833</td><td>43 578</td></tr><tr><td>Western Europe</td><td>220</td><td>1</td><td>736</td><td>23 577</td><td>12 512</td><td>29 969</td></tr></tbody></table>
<table><caption>**Table 10.** Annual production of soybean, relative to countries.</caption><thead><tr><th rowspan="2">Area</th><th colspan="3">Production (1000 tonne)</th><th colspan="3">Yield (hg/ha)</th></tr><tr><th>Average</th><th>Min.</th><th>Max.</th><th>Average</th><th>Min.</th><th>Max.</th></tr></thead><tbody><tr><td>Argentina</td><td>18 911</td><td>1</td><td>61 447</td><td>20 943</td><td>9765</td><td>33 340</td></tr><tr><td>Bolivia</td><td>999</td><td>0</td><td>3318</td><td>17 877</td><td>9302</td><td>23 981</td></tr><tr><td>Brazil</td><td>35 233</td><td>271</td><td>134 935</td><td>20 536</td><td>8478</td><td>34 450</td></tr><tr><td>Canada</td><td>2244</td><td>136</td><td>7717</td><td>24 034</td><td>14 754</td><td>31 151</td></tr><tr><td>China</td><td>11 609</td><td>6140</td><td>19 600</td><td>14 095</td><td>6243</td><td>19 833</td></tr><tr><td>Korea, North</td><td>321</td><td>135</td><td>455</td><td>11 174</td><td>5625</td><td>17 041</td></tr><tr><td>European Union (27)</td><td>1102</td><td>4</td><td>2912</td><td>20 273</td><td>4682</td><td>32 297</td></tr><tr><td>India</td><td>4621</td><td>5</td><td>14 666</td><td>8556</td><td>4348</td><td>13 530</td></tr><tr><td>Indonesia</td><td>823</td><td>273</td><td>1870</td><td>10 702</td><td>6203</td><td>15 690</td></tr><tr><td>Japan</td><td>207</td><td>99</td><td>392</td><td>15 363</td><td>11 059</td><td>20 195</td></tr><tr><td>Mexico</td><td>338</td><td>20</td><td>992</td><td>17 468</td><td>10 925</td><td>21 218</td></tr><tr><td>Nigeria</td><td>303</td><td>42</td><td>994</td><td>5589</td><td>2100</td><td>12 951</td></tr><tr><td>Paraguay</td><td>3012</td><td>2</td><td>11 046</td><td>21 422</td><td>11 304</td><td>33 938</td></tr><tr><td>Philippines</td><td>3</td><td>0</td><td>11</td><td>10 938</td><td>7225</td><td>14 286</td></tr><tr><td>Korea, South</td><td>180</td><td>75</td><td>319</td><td>13 336</td><td>5421</td><td>20 348</td></tr><tr><td>South Africa</td><td>279</td><td>2</td><td>1897</td><td>12 714</td><td>2500</td><td>22 936</td></tr><tr><td>Thailand</td><td>188</td><td>19</td><td>672</td><td>12 940</td><td>7365</td><td>17 712</td></tr><tr><td>USA</td><td>62 529</td><td>18 213</td><td>120 707</td><td>23 660</td><td>15 309</td><td>34 936</td></tr><tr><td>Uruguay</td><td>540</td><td>1</td><td>3212</td><td>16 129</td><td>7000</td><td>29 495</td></tr></tbody></table>

## Cocoa

<table><caption>**Table 11.** Annual production and yield of cocoa, relative to region.</caption><thead><tr><th rowspan="2">Area</th><th colspan="3">Production (1000 tonne)</th><th colspan="3">Yield (hg/Ha)</th></tr><tr><th>Average</th><th>Min.</th><th>Max.</th><th>Average</th><th>Min.</th><th>Max.</th></tr></thead><tbody><tr><td>Caribbean</td><td>59</td><td>36</td><td>102</td><td>3591</td><td>2214</td><td>5203</td></tr><tr><td>Central America</td><td>49</td><td>31</td><td>75</td><td>4893</td><td>2834</td><td>6649</td></tr><tr><td>Eastern Africa</td><td>14</td><td>1</td><td>62</td><td>3956</td><td>1716</td><td>5839</td></tr><tr><td>Middle Africa</td><td>172</td><td>107</td><td>323</td><td>2974</td><td>1915</td><td>3912</td></tr><tr><td>Oceania</td><td>39</td><td>14</td><td>66</td><td>4122</td><td>3235</td><td>5112</td></tr><tr><td>South-eastern Asia</td><td>354</td><td>5</td><td>866</td><td>6128</td><td>2649</td><td>10 323</td></tr><tr><td>South America</td><td>437</td><td>223</td><td>822</td><td>3995</td><td>2655</td><td>5680</td></tr><tr><td>Southern Asia</td><td>9</td><td>1</td><td>25</td><td>3154</td><td>1013</td><td>5741</td></tr><tr><td>Western Africa</td><td>1616</td><td>693</td><td>3377</td><td>4001</td><td>2553</td><td>5065</td></tr></tbody></table>

<table><caption>**Table 12.** Annual production and yield of cocoa, relative to countries.</caption><thead><tr><th rowspan="2">Area</th><th colspan="3">Production (1000 tonne)</th><th colspan="3">Yield (hg/Ha)</th></tr><tr><th>Average</th><th>Min.</th><th>Max.</th><th>Average</th><th>Min.</th><th>Max.</th></tr></thead><tbody><tr><td>Brazil</td><td>254</td><td>140</td><td>459</td><td>4411</td><td>2788</td><td>7415</td></tr><tr><td>Cameroon</td><td>146</td><td>75</td><td>310</td><td>3184</td><td>1976</td><td>4104</td></tr><tr><td>Colombia</td><td>40</td><td>14</td><td>102</td><td>4788</td><td>2757</td><td>9266</td></tr><tr><td>Côte d'Ivoire</td><td>840</td><td>85</td><td>2235</td><td>5194</td><td>3269</td><td>7006</td></tr><tr><td>Dominican Republic</td><td>46</td><td>25</td><td>87</td><td>3777</td><td>2047</td><td>5737</td></tr><tr><td>Ecuador</td><td>94</td><td>35</td><td>284</td><td>2934</td><td>1166</td><td>5612</td></tr><tr><td>Equatorial Guinea</td><td>10</td><td>1</td><td>38</td><td>1500</td><td>643</td><td>4244</td></tr><tr><td>Ghana</td><td>460</td><td>167</td><td>969</td><td>3369</td><td>2054</td><td>5495</td></tr><tr><td>Guinea</td><td>6</td><td>2</td><td>40</td><td>3688</td><td>1000</td><td>9429</td></tr><tr><td>India</td><td>9</td><td>0</td><td>24</td><td>3612</td><td>1970</td><td>8000</td></tr><tr><td>Indonesia</td><td>291</td><td>1</td><td>845</td><td>5363</td><td>1216</td><td>11 323</td></tr><tr><td>Malaysia</td><td>57</td><td>0</td><td>247</td><td>7214</td><td>528</td><td>13 056</td></tr><tr><td>Mexico</td><td>37</td><td>20</td><td>60</td><td>5133</td><td>2934</td><td>7617</td></tr><tr><td>Nigeria</td><td>269</td><td>140</td><td>485</td><td>3159</td><td>2000</td><td>4980</td></tr><tr><td>Papua New Guinea</td><td>34</td><td>9</td><td>59</td><td>4156</td><td>3137</td><td>5266</td></tr><tr><td>Peru</td><td>26</td><td>2</td><td>142</td><td>5656</td><td>3849</td><td>8594</td></tr><tr><td>Sierra Leone</td><td>13</td><td>3</td><td>50</td><td>4039</td><td>2750</td><td>5996</td></tr><tr><td>Togo</td><td>23</td><td>4</td><td>142</td><td>5605</td><td>1464</td><td>10 274</td></tr><tr><td>Uganda</td><td>6</td><td>0</td><td>35</td><td>1873</td><td>222</td><td>4834</td></tr><tr><td>Venezuela</td><td>18</td><td>11</td><td>32</td><td>2894</td><td>1746</td><td>5115</td></tr></tbody></table>
<table><caption>**Table 10.** Annual production of soybean, relative to countries.</caption><thead><tr><th rowspan="2">Area</th><th colspan="3">Production (1000 tonne)</th><th colspan="3">Yield (hg/ha)</th></tr><tr><th>Average</th><th>Min.</th><th>Max.</th><th>Average</th><th>Min.</th><th>Max.</th></tr></thead><tbody><tr><td>Argentina</td><td>18 911</td><td>1</td><td>61 447</td><td>20 943</td><td>9765</td><td>33 340</td></tr><tr><td>Bolivia</td><td>999</td><td>0</td><td>3318</td><td>17 877</td><td>9302</td><td>23 981</td></tr><tr><td>Brazil</td><td>35 233</td><td>271</td><td>134 935</td><td>20 536</td><td>8478</td><td>34 450</td></tr><tr><td>Canada</td><td>2244</td><td>136</td><td>7717</td><td>24 034</td><td>14 754</td><td>31 151</td></tr><tr><td>China</td><td>11 609</td><td>6140</td><td>19 600</td><td>14 095</td><td>6243</td><td>19 833</td></tr><tr><td>Korea, North</td><td>321</td><td>135</td><td>455</td><td>11 174</td><td>5625</td><td>17 041</td></tr><tr><td>European Union (27)</td><td>1102</td><td>4</td><td>2912</td><td>20 273</td><td>4682</td><td>32 297</td></tr><tr><td>India</td><td>4621</td><td>5</td><td>14 666</td><td>8556</td><td>4348</td><td>13 530</td></tr><tr><td>Indonesia</td><td>823</td><td>273</td><td>1870</td><td>10 702</td><td>6203</td><td>15 690</td></tr><tr><td>Japan</td><td>207</td><td>99</td><td>392</td><td>15 363</td><td>11 059</td><td>20 195</td></tr><tr><td>Mexico</td><td>338</td><td>20</td><td>992</td><td>17 468</td><td>10 925</td><td>21 218</td></tr><tr><td>Nigeria</td><td>303</td><td>42</td><td>994</td><td>5589</td><td>2100</td><td>12 951</td></tr><tr><td>Paraguay</td><td>3012</td><td>2</td><td>11 046</td><td>21 422</td><td>11 304</td><td>33 938</td></tr><tr><td>Philippines</td><td>3</td><td>0</td><td>11</td><td>10 938</td><td>7225</td><td>14 286</td></tr><tr><td>Korea, South</td><td>180</td><td>75</td><td>319</td><td>13 336</td><td>5421</td><td>20 348</td></tr><tr><td>South Africa</td><td>279</td><td>2</td><td>1897</td><td>12 714</td><td>2500</td><td>22 936</td></tr><tr><td>Thailand</td><td>188</td><td>19</td><td>672</td><td>12 940</td><td>7365</td><td>17 712</td></tr><tr><td>USA</td><td>62 529</td><td>18 213</td><td>120 707</td><td>23 660</td><td>15 309</td><td>34 936</td></tr><tr><td>Uruguay</td><td>540</td><td>1</td><td>3212</td><td>16 129</td><td>7000</td><td>29 495</td></tr></tbody></table>

## Cocoa

<table><caption>**Table 11.** Annual production and yield of cocoa, relative to region.</caption><thead><tr><th rowspan="2">Area</th><th colspan="3">Production (1000 tonne)</th><th colspan="3">Yield (hg/Ha)</th></tr><tr><th>Average</th><th>Min.</th><th>Max.</th><th>Average</th><th>Min.</th><th>Max.</th></tr></thead><tbody><tr><td>Caribbean</td><td>59</td><td>36</td><td>102</td><td>3591</td><td>2214</td><td>5203</td></tr><tr><td>Central America</td><td>49</td><td>31</td><td>75</td><td>4893</td><td>2834</td><td>6649</td></tr><tr><td>Eastern Africa</td><td>14</td><td>1</td><td>62</td><td>3956</td><td>1716</td><td>5839</td></tr><tr><td>Middle Africa</td><td>172</td><td>107</td><td>323</td><td>2974</td><td>1915</td><td>3912</td></tr><tr><td>Oceania</td><td>39</td><td>14</td><td>66</td><td>4122</td><td>3235</td><td>5112</td></tr><tr><td>South-eastern Asia</td><td>354</td><td>5</td><td>866</td><td>6128</td><td>2649</td><td>10 323</td></tr><tr><td>South America</td><td>437</td><td>223</td><td>822</td><td>3995</td><td>2655</td><td>5680</td></tr><tr><td>Southern Asia</td><td>9</td><td>1</td><td>25</td><td>3154</td><td>1013</td><td>5741</td></tr><tr><td>Western Africa</td><td>1616</td><td>693</td><td>3377</td><td>4001</td><td>2553</td><td>5065</td></tr></tbody></table>

<table><caption>**Table 12.** Annual production and yield of cocoa, relative to countries.</caption><thead><tr><th rowspan="2">Area</th><th colspan="3">Production (1000 tonne)</th><th colspan="3">Yield (hg/Ha)</th></tr><tr><th>Average</th><th>Min.</th><th>Max.</th><th>Average</th><th>Min.</th><th>Max.</th></tr></thead><tbody><tr><td>Brazil</td><td>254</td><td>140</td><td>459</td><td>4411</td><td>2788</td><td>7415</td></tr><tr><td>Cameroon</td><td>146</td><td>75</td><td>310</td><td>3184</td><td>1976</td><td>4104</td></tr><tr><td>Colombia</td><td>40</td><td>14</td><td>102</td><td>4788</td><td>2757</td><td>9266</td></tr><tr><td>Côte d'Ivoire</td><td>840</td><td>85</td><td>2235</td><td>5194</td><td>3269</td><td>7006</td></tr><tr><td>Dominican Republic</td><td>46</td><td>25</td><td>87</td><td>3777</td><td>2047</td><td>5737</td></tr><tr><td>Ecuador</td><td>94</td><td>35</td><td>284</td><td>2934</td><td>1166</td><td>5612</td></tr><tr><td>Equatorial Guinea</td><td>10</td><td>1</td><td>38</td><td>1500</td><td>643</td><td>4244</td></tr><tr><td>Ghana</td><td>460</td><td>167</td><td>969</td><td>3369</td><td>2054</td><td>5495</td></tr><tr><td>Guinea</td><td>6</td><td>2</td><td>40</td><td>3688</td><td>1000</td><td>9429</td></tr><tr><td>India</td><td>9</td><td>0</td><td>24</td><td>3612</td><td>1970</td><td>8000</td></tr><tr><td>Indonesia</td><td>291</td><td>1</td><td>845</td><td>5363</td><td>1216</td><td>11 323</td></tr><tr><td>Malaysia</td><td>57</td><td>0</td><td>247</td><td>7214</td><td>528</td><td>13 056</td></tr><tr><td>Mexico</td><td>37</td><td>20</td><td>60</td><td>5133</td><td>2934</td><td>7617</td></tr><tr><td>Nigeria</td><td>269</td><td>140</td><td>485</td><td>3159</td><td>2000</td><td>4980</td></tr><tr><td>Papua New Guinea</td><td>34</td><td>9</td><td>59</td><td>4156</td><td>3137</td><td>5266</td></tr><tr><td>Peru</td><td>26</td><td>2</td><td>142</td><td>5656</td><td>3849</td><td>8594</td></tr><tr><td>Sierra Leone</td><td>13</td><td>3</td><td>50</td><td>4039</td><td>2750</td><td>5996</td></tr><tr><td>Togo</td><td>23</td><td>4</td><td>142</td><td>5605</td><td>1464</td><td>10 274</td></tr><tr><td>Uganda</td><td>6</td><td>0</td><td>35</td><td>1873</td><td>222</td><td>4834</td></tr><tr><td>Venezuela</td><td>18</td><td>11</td><td>32</td><td>2894</td><td>1746</td><td>5115</td></tr></tbody></table>
## Appendix C. Detailed model agnostic

Three graphs illustrate the distribution of Shapley values obtained for the most accurate model for each commodity. The interpretation of the results appear in the left-hand plot of figures 4, 6, and 8 for maize, soybean, and cocoa, respectively. In each plot, the individual Shapley values are combined into one graph displayed as a box plot, which shows the overall distribution of the values. The features' names are written right to the Y-axis with the corresponding mean Shapley (absolute) value in brackets. The X-axis represents the impact of each feature on the price change, with features having a negative impact on the left and with a positive impact on the right. The bars are colored in accordance with the right-hand plot (global agnostic analysis), where dark purple represents highly influential features, and orange indicates features with a low impact on the model's accuracy. Each bar displays the distribution of individual Shapley values for each feature, as calculated from the second and third quartiles. The bars are positioned on the X-axis based on the magnitude of each feature's Shapley value. The median of the Shapley values is represented by the black vertical line within each box, and the black horizontal lines represent the lowest and highest inter-quartile ranges (IQR) multiplied by 1.5. Data points located outside the box are considered outliers.

The figures below utilize the model-agnostic method LIME to interpret the results obtained from the most accurate models developed for maize, soybean, and cocoa. Specifically, figures 11, 12, and 16 display the distribution of all the local effects obtained for each crop. These figures utilize a box plot format to combine individual effects into a single graph, presenting the overall distribution of the values. The names of the features are written next to the Y-axis, with the corresponding mean effect (absolute values) displayed in brackets. The X-axis shows the impact of each feature on price change, with features that negatively impact the price positioned on the left and those that positively impact the price on the right. The bars are colored in accordance with the global agnostic analysis, (i.e. the relative importance of the feature). Dark purple bars represent highly influential features, while orange bars indicate features with a low impact on the model's accuracy. Each bar in the plot displays the distribution of individual effect values for each feature, calculated from the second and third quartiles. The bars' position on the X-axis corresponds to the magnitude of each feature's effect on the price, with the median effect values represented by a black vertical line within each box. The black horizontal lines represent the lowest and highest IQR multiplied by 1.5. Any data points located outside the box are considered outliers.

### Maize

<figure><img src="image_14.png" /><figcaption>Figure 11. LIME, local explanation maize.</figcaption></figure>
## Appendix C. Detailed model agnostic

Three graphs illustrate the distribution of Shapley values obtained for the most accurate model for each commodity. The interpretation of the results appear in the left-hand plot of figures 4, 6, and 8 for maize, soybean, and cocoa, respectively. In each plot, the individual Shapley values are combined into one graph displayed as a box plot, which shows the overall distribution of the values. The features' names are written right to the Y-axis with the corresponding mean Shapley (absolute) value in brackets. The X-axis represents the impact of each feature on the price change, with features having a negative impact on the left and with a positive impact on the right. The bars are colored in accordance with the right-hand plot (global agnostic analysis), where dark purple represents highly influential features, and orange indicates features with a low impact on the model's accuracy. Each bar displays the distribution of individual Shapley values for each feature, as calculated from the second and third quartiles. The bars are positioned on the X-axis based on the magnitude of each feature's Shapley value. The median of the Shapley values is represented by the black vertical line within each box, and the black horizontal lines represent the lowest and highest inter-quartile ranges (IQR) multiplied by 1.5. Data points located outside the box are considered outliers.

The figures below utilize the model-agnostic method LIME to interpret the results obtained from the most accurate models developed for maize, soybean, and cocoa. Specifically, figures 11, 12, and 16 display the distribution of all the local effects obtained for each crop. These figures utilize a box plot format to combine individual effects into a single graph, presenting the overall distribution of the values. The names of the features are written next to the Y-axis, with the corresponding mean effect (absolute values) displayed in brackets. The X-axis shows the impact of each feature on price change, with features that negatively impact the price positioned on the left and those that positively impact the price on the right. The bars are colored in accordance with the global agnostic analysis, (i.e. the relative importance of the feature). Dark purple bars represent highly influential features, while orange bars indicate features with a low impact on the model's accuracy. Each bar in the plot displays the distribution of individual effect values for each feature, calculated from the second and third quartiles. The bars' position on the X-axis corresponds to the magnitude of each feature's effect on the price, with the median effect values represented by a black vertical line within each box. The black horizontal lines represent the lowest and highest IQR multiplied by 1.5. Any data points located outside the box are considered outliers.

### Maize

<figure><img src="image_15.png" /><figcaption>Figure 11. LIME, local explanation maize.</figcaption></figure>
## Soybean

<figure><img src="image_15.png" /><figcaption>Figure 12. LIME, local explanation soybean</figcaption></figure>

## Cocoa

<figure><img src="image_16.png" /><figcaption>Figure 13. LIME, local explanation cocoa</figcaption></figure>
## Soybean

<figure><img src="image_16.png" /><figcaption>Figure 12. LIME, local explanation soybean</figcaption></figure>

## Cocoa

<figure><img src="image_17.png" /><figcaption>Figure 13. LIME, local explanation cocoa</figcaption></figure>
# Appendix D. Price change forecasts of the models

## Maize

<figure><img src="image_17.png" /><figcaption>**Figure 14.** Forecasted maize monthly price changes obtained with all models (colored lines). Observed price dynamics are shown as a black line.</figcaption></figure>

## Soybean

<figure><img src="image_18.png" /><figcaption>**Figure 15.** Forecasted soybean monthly price changes obtained with all models (colored lines). Observed price dynamics are shown as a black line.</figcaption></figure>
# Appendix D. Price change forecasts of the models

## Maize

<figure><img src="image_18.png" /><figcaption>**Figure 14.** Forecasted maize monthly price changes obtained with all models (colored lines). Observed price dynamics are shown as a black line.</figcaption></figure>

## Soybean

<figure><img src="image_19.png" /><figcaption>**Figure 15.** Forecasted soybean monthly price changes obtained with all models (colored lines). Observed price dynamics are shown as a black line.</figcaption></figure>
Cocoa

<figure><img src="image_19.png" /><figcaption>**Figure 16.** Forecasted cocoa monthly price changes obtained with all models (colored lines). Observed price dynamics are shown as a black line.</figcaption></figure>

ORCID iDs

Rotem Zelingher https://orcid.org/0000-0002-6383-2838

David Makowski https://orcid.org/0000-0001-6385-3703

References

Akaike H 1974 Stochastic theory of minimal realization *IEEE Trans. Autom. Control* **19** 667–74

Anderson P, Davenport F, Baylis K and Shukla S 2023 Using earth observation products to predict maize prices in Southern Africa SSRN Electron. J. (https://doi.org/10.2139/ssrn.4369127)

Bobenrieth E, Wright B and Zeng D 2013 Stocks-to-use ratios and prices as indicators of vulnerability to spikes in global cereal markets Agric. Econ. **44** 43–52

Breiman L, Friedman J, Stone C J and Olshen R A 1984 Classification and Regression Trees (CRC Press)

Chrulski T 2021 Using the R language computing environment in forecasting natural gas consumption Polityka Energetyczna - Energy Policy J. **24** 33–56

Crespo Cuaresma J, Hlouskova J and Obersteiner M 2021 Agricultural commodity price dynamics and their determinants: a comprehensive econometric approach J. Forecast. **40** 1245–73

De Livera A M, Hyndman R J and Snyder R D 2011 Forecasting time series with complex seasonal patterns using exponential smoothing J. Am. Stat. Assoc. **106** 1513–27

De Maria M, Robinson E, Kangile J, Kadigi R, Dreoni I, Couto M, Howai N, Peci J and Fiennes S 2020 Global soybean

trade - the geopolitics of a bean Technical Report UK Research and Innovation Global Challenges Research Fund (UKRI GCRF) Trade, Development and the Environment Hub

FAO 2018 The future of food and agriculture. Alternative pathways to 2050 Technical Report, Markets and Trade Division, FAO, Rome

FAO 2023 Faostat statistical database

FAS-USDA 2023 The foreign agricultural service (FAS) data & analysis

Fisher A, Rudin C and Dominici F 2018 All models are wrong, but many are useful: learning a variable's importance by studying an entire class of prediction models simultaneously

Gilbert C L 2016 The dynamics of the world cocoa price The Economics of Chocolate (Oxford University Press)

Gilbert C L and Morgan C W 2010 Food price volatility Phil. Trans. R. Soc. B **365** 3023–34

Glauber J W and Laborde Debucquet D (ed) 2023 The Russia-Ukraine Conflict and Global Food Security (International Food Policy Research Institute (IFPRI))

Greenwell B, Boehmke B and Cunningham J 2020 Package 'gbm' Greg Ridgeway

Hastie T, Tibshirani R and Friedman J 2009 Random Forests (Springer) pp 587–604

Headey D 2011 Rethinking the global food crisis: The role of trade shocks Food Policy **36** 136–46

Henrique B M, Amorim Sobreiro V and Kimura H 2019 Literature review: machine learning techniques applied to financial market prediction Expert Syst. Appl. **124** 226–51

Hyndman R et al 2020 Forecasting functions for time series and linear models NA

Hyndman R and Athanasopoulos G 2018 Forecasting: Principles and Practice 2nd edn (OTexts)

ITC and UNCTAD/WTO 2001 Cocoa: a guide to trade practices International Trade Centre UNCTAD/WTO
## Cocoa

<figure><img src="image_20.png" /><figcaption>**Figure 16.** Forecasted cocoa monthly price changes obtained with all models (colored lines). Observed price dynamics are shown as a black line.</figcaption></figure>

## ORCID iDs

Rotem Zelingher https://orcid.org/0000-0002-6383-2838

David Makowski https://orcid.org/0000-0001-6385-3703

## References

Akaike H 1974 Stochastic theory of minimal realization *IEEE Trans. Autom. Control* 19 667–74

Anderson P, Davenport F, Baylis K and Shukla S 2023 Using earth observation products to predict maize prices in Southern Africa SSRN Electron. J. (https://doi.org/10.2139/ssrn.4369127)

Bobenrieth E, Wright B and Zeng D 2013 Stocks-to-use ratios and prices as indicators of vulnerability to spikes in global cereal markets Agric. Econ. 44 43–52

Breiman L, Friedman J, Stone C J and Olshen R A 1984 Classification and Regression Trees (CRC Press)

Chrulski T 2021 Using the R language computing environment in forecasting natural gas consumption Polityka Energetyczna - Energy Policy J. 24 33–56

Crespo Cuaresma J, Hlouskova J and Obersteiner M 2021 Agricultural commodity price dynamics and their determinants: a comprehensive econometric approach J. Forecast. 40 1245–73

De Livera A M, Hyndman R J and Snyder R D 2011 Forecasting time series with complex seasonal patterns using exponential smoothing J. Am. Stat. Assoc. 106 1513–27

De Maria M, Robinson E, Kangile J, Kadigi R, Dreoni I, Couto M, Howai N, Peci J and Fiennes S 2020 Global soybean

trade - the geopolitics of a bean Technical Report UK Research and Innovation Global Challenges Research Fund (UKRI GCRF) Trade, Development and the Environment Hub

FAO 2018 The future of food and agriculture. Alternative pathways to 2050 Technical Report, Markets and Trade Division, FAO, Rome

FAO 2023 Faostat statistical database

FAS-USDA 2023 The foreign agricultural service (FAS) data & analysis

Fisher A, Rudin C and Dominici F 2018 All models are wrong, but many are useful: learning a variable's importance by studying an entire class of prediction models simultaneously

Gilbert C L 2016 The dynamics of the world cocoa price The Economics of Chocolate (Oxford University Press)

Gilbert C L and Morgan C W 2010 Food price volatility Phil. Trans. R. Soc. B 365 3023–34

Glauber J W and Laborde Debucquet D (ed) 2023 The Russia-Ukraine Conflict and Global Food Security (International Food Policy Research Institute (IFPRI))

Greenwell B, Boehmke B and Cunningham J 2020 Package 'gbm' Greg Ridgeway

Hastie T, Tibshirani R and Friedman J 2009 Random Forests (Springer) pp 587–604

Headey D 2011 Rethinking the global food crisis: The role of trade shocks Food Policy 36 136–46

Henrique B M, Amorim Sobreiro V and Kimura H 2019 Literature review: machine learning techniques applied to financial market prediction Expert Syst. Appl. 124 226–51

Hyndman R et al 2020 Forecasting functions for time series and linear models NA

Hyndman R and Athanasopoulos G 2018 Forecasting: Principles and Practice 2nd edn (OTexts)

ITC and UNCTAD/WTO 2001 Cocoa: a guide to trade practices International Trade Centre UNCTAD/WTO
Kalkuhl M 2016 *How Strong Do Global Commodity Prices Influence Domestic Food Prices in Developing Countries? A Global Price Transmission and Vulnerability Mapping Analysis* (Springer) pp 269–301

Kalkuhl M, von Braun J and Torero M 2016 *Food Price Volatility and Its Implications for Food Security and Policy* (Springer)

Kourentzes N, Barrow D and Petropoulos F 2019 Another look at forecast selection and combination: evidence from forecast pooling *Int. J. Prod. Econ.* **209** 226–35

Kyriazi F, Thomakos D D and Guerard J B 2019 Adaptive learning forecasting, with applications in forecasting agricultural prices *Int. J. Forecast.* **35** 1356–69

Liaw A and Wiener M 2002 Classification and regression by randomforest *R News* **2** 18–22

Molnar C 2022 *Interpretable Machine Learning* 2nd edn (available at: https://christophm.github.io/interpretable-ml-book/)

Molnar C, Casalicchio G and Bischl B 2018 iml: an R package for interpretable machine learning *J. Open Source Softw.* **3** 786

Olofsson M 2020 Socio-economic differentiation from a class-analytic perspective: The case of smallholder tree-crop farmers in limpopo, South Africa *J. Agrar. Change* **20** 37–59

Organization I. C 2021 Quarterly bulletin of cocoa statistics = bulletin trimestriel de statistiques du cacao *Technical Report*

Perone G 2022 Comparison of arima, ets, nnar, tbats and hybrid models to forecast the second wave of covid-19 hospitalizations in Italy *Eur. J. Health Econ.* **23** 917–40

Schmidhuber J, Pound J and Qiao B 2020 Covid-19: channels of transmission to food and agriculture *Technical Report* FAO

Shapley L S 1952 *A Value for N-Person Games* (RAND Corporation)

Spavound S and Kourentzes N 2022 Making forecasts more trustworthy *Foresight: The International Journal of Applied Forecasting* **66** 21–25

Therneau T, Atkinson B, Ripley B and Ripley M B 2019 Package 'rpart' CRAN

von Braun J and Torero M 2009 Exploring the price spike *Choices* **24** 16–21

Wang X, Hyndman R J, Li F and Kang Y 2022 Forecast combinations: an over 50-year review *Int. J. Forecast.* **39** 1518–47

Wollni M and Zeller M 2007 Do farmers benefit from participating in specialty markets and cooperatives? the case of coffee marketing in Costa Rica¹ *Agric. Econ.* **37** 243–8

World-Bank 2023 Commodity market, “pink sheet” data

Wright B 2009 *International Grain Reserves and Other Instruments to Address Volatility in Grain Markets* (The World Bank)

Zelingher R and Makowski D 2022 Forecasting global maize prices from regional productions *Front. Sustain. Food Syst.* **6** 28
Kalkuhl M 2016 *How Strong Do Global Commodity Prices Influence Domestic Food Prices in Developing Countries? A Global Price Transmission and Vulnerability Mapping Analysis* (Springer) pp 269–301

Kalkuhl M, von Braun J and Torero M 2016 *Food Price Volatility and Its Implications for Food Security and Policy* (Springer)

Kourentzes N, Barrow D and Petropoulos F 2019 Another look at forecast selection and combination: evidence from forecast pooling *Int. J. Prod. Econ.* **209** 226–35

Kyriazi F, Thomakos D D and Guerard J B 2019 Adaptive learning forecasting, with applications in forecasting agricultural prices *Int. J. Forecast.* **35** 1356–69

Liaw A and Wiener M 2002 Classification and regression by randomforest *R News* **2** 18–22

Molnar C 2022 *Interpretable Machine Learning* 2nd edn (available at: https://christophm.github.io/interpretable-ml-book/)

Molnar C, Casalicchio G and Bischl B 2018 iml: an R package for interpretable machine learning *J. Open Source Softw.* **3** 786

Olofsson M 2020 Socio-economic differentiation from a class-analytic perspective: The case of smallholder tree-crop farmers in limpopo, South Africa *J. Agrar. Change* **20** 37–59

Organization I. C 2021 Quarterly bulletin of cocoa statistics = bulletin trimestriel de statistiques du cacao *Technical Report*

Perone G 2022 Comparison of arima, ets, nnar, tbats and hybrid models to forecast the second wave of covid-19 hospitalizations in Italy *Eur. J. Health Econ.* **23** 917–40

Schmidhuber J, Pound J and Qiao B 2020 Covid-19: channels of transmission to food and agriculture *Technical Report* FAO

Shapley L S 1952 *A Value for N-Person Games* (RAND Corporation)

Spavound S and Kourentzes N 2022 Making forecasts more trustworthy *Foresight: The International Journal of Applied Forecasting* **66** 21–25

Therneau T, Atkinson B, Ripley B and Ripley M B 2019 Package 'rpart' CRAN

von Braun J and Torero M 2009 Exploring the price spike *Choices* **24** 16–21

Wang X, Hyndman R J, Li F and Kang Y 2022 Forecast combinations: an over 50-year review *Int. J. Forecast.* **39** 1518–47

Wollni M and Zeller M 2007 Do farmers benefit from participating in specialty markets and cooperatives? the case of coffee marketing in Costa Rica¹ *Agric. Econ.* **37** 243–8

World-Bank 2023 Commodity market, “pink sheet” data

Wright B 2009 *International Grain Reserves and Other Instruments to Address Volatility in Grain Markets* (The World Bank)

Zelingher R and Makowski D 2022 Forecasting global maize prices from regional productions *Front. Sustain. Food Syst.* **6** 28