Foreign yield shocks and domestic price variability: the case of maize in developing countries

International trade helps to smooth food price swings caused from seasonal imbalances between domestic supply and demand. Trade also increases the possibility of importing price volatility from abroad. This concern looms large in the face of increased crop yield variability associated with climate change. We assess the extent to which maize yield shocks in exporting countries exacerbate the intra-seasonal variability of maize prices in a cross section of 75 markets in Africa, Asia, and Latin American countries during 2000/01–2017/18. We find that extreme below-trend reductions in maize yields in exporting countries are associated with increased intra-annual maize price variability in the focus countries. In contrast, above-trend maize yields in exporting countries are associated with reduced variability.


Introduction
Faster growth in consumption relative to agricultural production is likely to increase the need for imports in developing countries with already high levels of import-dependency (Sadler and Magnan 2011, Luan et al 2013, Porkka et al 2013, Puma et al 2015. High levels of import dependency prompt the possibility that production shocks in exporting regions may destabilize food prices in importing countries (d 'Amour et al 2016, Challinor et al 2017, d'Amour and Anderson 2020. Such possibility is exacerbated by the prospects of increased crop yield variability caused by a warmer, more unstable climate (e.g. Bathiany et al 2018), under which the historical distributions of maize yields likely shift to the left in major producing regions (Jägermeyr et al 2021). This change might lead to elevated food price instability in countries relying on food imports, bringing up skepticism about the stabilization effects of international trade; while some have argued that food trade is an important climate adaptation tool (Baldos andHertel 2015, Dall'Erba et al 2021).
Here we quantify the effects of shocks on foreign maize yields on the variability of domestic maize prices in a group of developing countries where maize is widely produced and consumed (Ranum et al 2014), and where imports are an important source of the total maize supply. We focus on intra-annual price variability, which is often higher than interannual maize price variability (see Ott 2014aOtt , 2014b, and figure 1, which covers the focus countries of this letter). Excess intra-annual price variability may translate into seasonal variation in dietary intake and nutrition, jeopardizing food security especially among poor farm households (Khandker 2012, Gilbert et al 2017 3 . We keep track of the geographic sources of the supply shocks. This is important because it is possible that a country relying solely on maize imports from, say, South Africa, will be sensitive to shocks in that region; whereas its imports are not necessarily sensitive to shocks somewhere else such as India, a major maize exporter in Asia, unless the shocks 3 As a reviewer pointed out, both price level and price volatility matter to social welfare. We do not focus on price levels here because the impacts of production shocks on price levels have been extensively studied. Consequently, the impacts are wellunderstood in theory (it depends on the size of production shocks and demand elasticity) as well as in empirical models (e.g. Nelson et al 2014). In contrast, the studies on the impacts of production shocks on price variability are much less studied or understood. We thus focus on price volatility rather than on price levels. are large enough to disrupt the global maize prices. This makes our work different to the literature studying price transmission in the short and long run, where prices in reference markets already factor in price adjustments to transient global imbalances in supply and demand (e.g. Kalkuhl et al 2016). Our focus is also different to the price transmission literature; insofar this literature is often more concerned with the potential efficiency losses associated with trade obstruction (e.g. Anderson and Nelgen 2012) than with price instability in itself. We also expand upon the literature related to the factors influencing food price variability in developing countries-such as domestic yield or weather shocks (e.g. Kornher andKalkuhl 2017, Baffes et al 2019) and international price variability (e.g. Ceballos et al 2016)-by directly modeling the role of yield shocks in exporting regions.

Methods and data
Let PV ik,t be a measure of intra-annual maize price variability in the kth market of country i in marketing year t. Such measure can be either the coefficient of variation (CV) of real monthly maize prices (as in Bellemare 2015) or the standard deviation (SD) of returns, measured as the difference in the logarithm of real maize prices from one month to the next (as in Minot 2014). Both are commonly used unit-free measures of dispersion, allowing direct comparisons of local food prices across countries with different currencies and food price levels. Figure 2(A) shows that the CV of maize prices during 2000/01-2017/18 varies widely, and figure 2(C) suggests a negative relationship between price variability and import dependency. Monthly real maize prices in local currency per kilogram in each market from January 2000 to December 2018 come from the FAO GIEWS database (FAO 2019), though some markets do not have complete data (appendix tables A1 and A2). appendix figure A6 plots time series of the maize price data. The real prices are obtained from using countryspecific general consumer price index as the price deflator. We focus on the 23 countries in Africa, Asia and the Americas that have both positive average net maize imports during 2000-2018 and maize price data in the FAO GIEWS database (FAO 2019). Subnational market information for these ranges from one to ten markets (mostly cities) as available in the source database. There are 75 markets in total (see appendix table A3 for market lists by country). Cumulative maize imports of these countries (2005)(2006)(2007)(2008)(2009)(2010)(2011)(2012)(2013)(2014)(2015)(2016)(2017)(2018) accounted for about one-fifth of global maize imports (UN Comtrade 2020). PV ik,t is modeled as a nonlinear function of domestic yield shocks [f(DY i,t )] and foreign yield shocks [g(FY i,t )], both obtained from FAOSTAT (FAO 2019) 4 . Yield shocks are measured by deviations from trend. Our premise is that yield shocks are exogenous, as they are mostly driven by random weather shocks (Keeney andHertel 2009, Roberts andSchlenker 2013). The yield trends are fitted the commonly used quadratic regressions with 57 years of data since 1961 (appendix figure A5). For 13 out of 23 countries, quadratic trends are the most parsimonious specification with the best fit as they have the smallest out-of-sample prediction error when compared with linear and quadratic trends (see appendix table A4). Cubic trends has the lowest Akaike information criteria score for 14 out of 23 countries, but the results are qualitative identical (appendix figure A2). The foreign yield shocks facing each focus country are the import-share weighted sum of the exporters yield shocks using four-year lags of bilateral import shares from UN Comtrade (2020). The lag structure alleviates concerns about reverse causality (Calì and Mulabdic 2017); results are robust to alternative lag structures (appendix figure A3(D)). appendix section 'Variable construction' provides econometric specifications of PV ik,t , DY i,t , FY i,t variables for clarity; appendix figure A1 visualizes the data with boxplots.
Beginning stock-to-use ratio (S i,t ), calculated as ratio of beginning maize stocks to domestic maize consumption (USDA 2018), is included in the model, and we expect its parameter (β) to be negative because stocks act as a buffer against price variability (Williams and Wright 1991). We also control for exchange rate variability, measured by the CV of real exchange rates source from Darvas (2012), that would directly affect maize import prices (Cho et al 2002). Table 1 displays summary statistics for all the variables.
Using Z ik,t to denote the non-yield control variables (including beginning stock-to-use ratios and CV of monthly real exchange rates) with associated parameter vector Φ, µ i , θ k , and ϕ t to denote country, market, and year fixed effects, and ϵ ik,t to denote model residuals. The model residuals are assumed to be independently distributed from the included regressors. The regression model is given by: (1) To estimate equation (1), we follow Wood (2006, chapter 3) to represent each smooth function-i.e. f(·) and g(·)-with a linear combination of cubic spline basis and a penalty term: where b 1 r and b 2 r represent cubic spline basis, and γ 1 r and γ 2 r are parameters associated with each spline term. q 1 and q 2 are basis dimensions, where ω ji,t to is the four year lag share of country i's imports originated in country j and Y j,t are maize yield shocks. λ 1 and λ 2 are smoothing parameters that control the model smoothness. After plugging equations (2a) and (2b) into equation (1), the generalized additive model can be fitted by standard linear regression (Wood 2006, chapter 3). We choose to use the generalized additive model, because it is flexible enough to capture complex nonlinear effects of yield shocks and is easy to interpret.
The basis dimensions set an upper bound on the model smoothness, which researchers must choose. We tried alternative choices of basis dimensions and the results are qualitatively identical. We choose a small value q 1 = q 2 = 5 with the least risk of overfitting. appendix section 'Robustness checks' examines robustness of our results to the choice of basis dimension. Once basis dimensions have been chosen, we follow Wood (2006, chapter 3) to select the smoothing parameters (λ 1 and λ 2 ), using the generalized cross validation method (Craven andWahba 1978, Golub et al 1979). The selected parameters have the lowest out-of-sample prediction errors.

Results and discussion
We estimate equation (1) using linear and nonlinear functions of yield effects. Non-yield regressors are assumed to be linear across all the models. Table 2 shows, that, as expected, maize price variability within a marketing year decreases with the size of maize stocks available at the beginning of the season. More variable real exchange rates are associated with higher intra-annual maize price variability, although the effect is not statistically significant. The parameter estimates are stable across different variability measures (CV or SD) and choices of linear or nonlinear models. Further robustness analysis results are available in the appendix section 'Robustness checks' , including an assessment of statistical uncertainty through the bootstrapping method.
The linear fixed effects estimates in table 2 indicate that below-trend foreign yields lead to statistically significant, more unstable, domestic prices. To illustrate, using the results for the equation where the CV is the dependent variable, if the import-share weighted maize yield facing an importing country drops 10% below trend, the CV of real maize prices in the importing country would increase by 1.7%. The average CV of maize prices in the focus markets

Notes:
The dependent variable is either the coefficient of variation (CV) of real maize monthly prices or the standard deviation (SD) of the differences of the logarithm of real maize prices from one month to the next (or returns). County, market, and year fixed effects are included in the regressions. Standard errors clustered by countries are shown within parenthesis. * * * p < 0.01, * p < 0.1. is 11% (table 1); therefore, 1.7 additional percentage points imply, on average, a 15% increase in the intra-annual CV of real maize prices. Due to the symmetry embedded in the linearity of the estimates, an increase in the import-share weighted foreign yield of 10% above-trend, would reduce, on average, the CV of intra-annual maize prices by 15%. Table 2 also shows that the coefficient of domestic yield shocks is statistically significant albeit small in magnitude. This implies, somehow implausibly, that domestic yield shocks have a minor effect on domestic price variability. As discussed, the simple linear model may obscure important nonlinear effects. Such nonlinearities are evident through the marginal effects of foreign and domestic yield deviations from trends estimated using the semi-parametric generalized additive model discussed above. Specifically, figure 3(A) suggests that domestic intra-annual maize price variability increases with either large positive or large negative domestic yield shocks. For instance, when a country experiences a sharp negative production shock such that its maize yield drops to 20% below trend (an event with a 8.5% chance across focus countries), domestic intra-annual maize price variability measured by the CV could increase by 0.02, or by 18%. On the other hand, a sharp positive yield shock, say, 30% above trend or greater, is associated with higher domestic intra-annual maize price variability. Yet, the likelihood of positive yield shocks at such a large scale is low (5% chance across focus countries). Given a moderate positive yield shock of 10% above trend, the domestic intra-annual price variability would decline, on average, by 9% (absolute decline of 0.01).
Regarding foreign yield shocks, the semiparametric generalized additive model suggests that foreign yield shocks have linear effects on domestic intra-annual price variability ( figure 3(B)). Focusing on the CV of log prices, the marginal effect of foreign yield shocks on intra-annual price variability is −0.19, slightly larger than the marginal effect of −0.17 estimated by the linear model that is reported in table 2.
Two facts are interesting in figure 3. First, on average, for most of the distribution of negative yield deviations from trends, a fall in the import-share weighted yield of exporters of 10% would increase the CV of domestic maize prices by close to 2%; however, such a drop in import-share weighted yields seems to be a rare event, judging by the reduced mass of negative yield shocks that are less than −10%. A similar shock in the average focus countries (which tend to occur more often), would add only around 1 percentage point to the CV of domestic prices.
Second, positive deviations from yield trends overseas are associated with reduced price CV in the average focus country. This contrasts with positive deviations in domestic yields which tend to exacerbate price variability in the focus countries. The reducing variability effect of positive yield shocks may be just evidencing that countries import more when they suffer negative supply shocks. In this sense, our results lend support to the notion that international trade works as a risk sharing mechanism (Bigman and Reutlinger 1979) whereby, as long as yield shocks across trading partners are less than perfectly positively correlated, imports can help to mitigate the price swings caused by fluctuations in domestic supply. appendix section 'Robustness checks' reports that the results are robust to many alternative model specifications.
Further insights into our results are achieved by grouping the focus countries by the exporter that provides 75% or more of their maize imports. This procedure yields three groups. One group of countries, mainly in the Americas, imports from the U.S. A second group, all countries in sub-Saharan Africa, imports from South Africa. Finally, we have a single-country group formed by Rwanda that imports from Uganda. As seen in figure 4, the predicted CV in the focus countries supplied by the US when the US experiences a 10% decrease relative to its yield trends is just above 8%. For the same domestic drop in yields, the CV is around 8% too. Interestingly, the frequency of these drops in the US is relatively low (7.1%) and even lower in the importing countries (10.3%). This clearly suggests that extreme deviations in the US have the potential to destabilize prices in the importing countries.
At 20%, which is at the very end of the tail of the distribution of the import-share weighted shocks in the US, and therefore highly improbable, the effect of yield shocks is similar to a comparable drop in domestic yields, which historically has had a frequency of 3.6%. Consistent with the discussion above, above trend yield shocks are associated with lower domestic price variation. The cases of the markets supplied by South Africa and Uganda are similar, although the likelihood of significant negative yield deviations from both abroad and domestically are significantly higher.

Conclusion
Concerns about importing price instability from abroad are understandably amplified by the prospect of weather-driven increased crop yield variability in major exporting countries. Our analysis shows that negative supply shocks in exporting regions are indeed associated with greater price variability within the season, particularly when those shocks are in the tails of historical distributions. Likewise, positive deviations from trend abroad are associated with less variable prices, which is not the case for positive domestic yield shocks. Given the lack of correlation of yield shocks among exporters and between exporters and importers (appendix figure A7), our results are supportive of the fact that most of the time countries use foreign supplies as a way of stabilizing their markets (Badiane andOdjo 2016, Villoria andChen 2018).
In the context of a warmer climate there is a distinct chance that historical distributions of maize yields shift to the left in major producing regions (Jägermeyr et al 2021), thus increasing the probability of extreme declines in yields. While it is true that depending on imports could increase the risk of importing price variability, this risk is probably less than the risk of relaying only on domestic supplies that can destabilize markets in both bad and good years. One potential mechanism to increase the price stabilizing effects of international trade is to diversify the sources of exports (Marchand et al 2016). In the immediate future, high intra-regional, and prohibitively high extra-regional, trade costs, particularly in sub-Saharan Africa, isolate the region from the bread baskets of the world (Porteous 2019). Efforts to improve infrastructure and logistics (trade facilitation) can increase intra-and extra-regional trade, thus contributing to a more diversified set of exporters (Shepherd 2016).

Data availability statement
The data that support the findings of this study are available upon reasonable request from the authors.

Robustness checks
The robustness analysis results are discussed here. We have used maize price data expressed in local currency and deflated by the country-specific consumer price index (CPI). In order to rule out exchange rate effects driving the variance of domestic prices (Díaz-Bonilla 2016), we conducted the same analyses using maize prices expressed in U.S. dollars deflated by U.S. CPI. As shown in figures A3(A1) and (A2), the estimates are consistent with results using local currency, suggesting that our findings are robust to the potential impacts of exchange rates.
Another concern is that empirical results might be sensitive to the choice of price variability measures (Díaz-Bonilla 2016). Here we perform regression analyses by using two other statistical measures of variability: range (difference between maximum and minimum) and interquartile range (difference between the first and third quartiles). Since maize prices in different countries are expressed in different currencies and are not directly comparable, we divide them by their annual averages. The results, shown in figures A3(B1) and (B2), are consistent with the main results shown in figure 3.
When estimating the generalized additive model, we have chosen a small value of 5 as the basis dimensions for approximating the smooth functions of domestic and foreign maize yield shocks. The basis dimension sets an upper bound on the model smoothness. One might be concerned that the chosen basis dimension might be too low and thus underfit the data. To address this concern, we re-do the analyses and use higher basis dimensions up to 15. We found that, as shown in figures A3(C1) and (C2), there are more frequent ups and downs in the fitted curves when using higher dimension, which is a sign of over-fitting. Nevertheless, the fitted response of domestic intra-annual maize price variability keeps the same pattern despite using a higher basis dimension, such as that the fitted curve for foreign yield shocks is always negatively sloped. As such, using 5 as the basis dimension should be sufficient for our estimations. Another robustness analysis is done by choosing different lagged years of imports for constructing foreign yield shocks. The results are similar (see figure A3(D)).
As a reviewer pointed out, the statistical uncertainty of our regression model could be influenced by the within-country across-market spatial correlation in maize prices. To address this concern, we use a commonly used empirical method (e.g. Ortiz-Bobea et al 2019), which is to use a block bootstrap procedure whereby years of the data are sampled with 1000 replacement. The bootstrapped results are visualized in appendix figure A4. As expected, the estimates  table A3 for market names). The summary statistics is calculated for each market and then averaged across markets with each country. The 'Year' column denotes the range of calendar years been covered by the source database; the range differs across countries as determined by the data availability in the source database.  table A3 for market names). The summary statistics is calculated for each market and then averaged across markets with each country. The 'Year' column denotes the range of calendar years been covered by the source database; the range differs across countries as determined by the data availability in the source database. Notes: Dependent variable is an intra-annual maize price variability, and it is measured by coefficient of variations (CVs), standard deviations of returns (SDs), range relative to the annual average (Range), and interquartile relative to the annual average (IQR). Return is measured as the difference in the logarithm of real maize prices from one month to the next. Both domestic and foreign yield shock are measured by maize yield deviations from cubic trends. Foreign yield shocks are import weighted averages of maize yield shocks in exporting countries. The shock size dummy equals to 1 when domestic maize yield shock is greater than 0.2 and 0 otherwise. Numbers in parenthesis are robust standard errors. * * * p < 0.01, * * p < 0.05, * p < 0.1.
show larger uncertainties but remain statistically significant. For example, large negative maize yield deviations in domestic and foreign markets are consistently associated with positive changes in domestic intra-annual maize price variability measured by coefficient of variation (CV). In contrast, positive domestic maize yield shocks are not always associated with positive change in intra-annual maize price variability throughout the iterations. This is because the frequency of large domestic maize yield shocks is low, resulting in relatively lower statistical confidence in the estimates. This is discussed in the main text (section 3). Lastly, we use a dynamic panel model that includes the lagged domestic intra-annual maize price variability as a control variable in equation (1). This analysis aims to address the concern of reverse causality-i.e. that maize price volatility might affect maize yields (Haile et al 2016) as a consequence of farmers' risk adjusting behavior. The estimation of dynamic panel model with nonlinear smooth functions is cumbersome, so we simplify the estimation by changing the two smooth terms, f(·) and g(·), to be linear. To capture the nonlinear effects, we create a domestic yield shock dummy, which equals 1 when there is a large positive shocks in domestic maize yields (greater than 0.2) and 0 otherwise, and interact the domestic yield shock dummy with the domestic yield shock variable. We estimate the dynamic panel model using two-step generalized method of moments based on the first-difference transformation (Arellano and Bond 1991). Table A5 reports the results for the dynamic panel model that uses four alternative price variability measures. Regardless of the variability measures, we find a negative coefficient of the domestic maize yield shock and a positive coefficient of the interaction term between the domestic yield shock dummy and domestic maize yield shock. These results suggest a similar relationship between intra-annual maize price variability and domestic maize yield shocks to that is observed in figure 3(A). The coefficient of foreign maize yield shock is always negative, which provides additional evidence that intra-annual maize price variability is higher when there are negative supply shocks to foreign maize yields and lower when there are positive supply shocks to foreign maize yields.

Variable construction
This section explains the construction of several key variables in our analysis. The first variable is PV ik,t , which denotes intra-annual maize price variability in the kth market of country i in marketing year t. For each market, we obtained real monthly maize prices from FAOSTAT (FAO 2019). For clarity, we label the country-and-market specific prices as PV ik,tm , where m denotes all months within the marketing year t. For example, as recorded in the USDA Production, Supply and Distribution database (USDA 2018), the marketing year for China starts from October and ends in September (the harvest month of summer corn in China). If, say, t equals to 2012/13, the notation tm thus denotes all the 12 months from October 2012 to September 2013. The 2012/13 marketing year price data are then matched with 2012 yield shocks, which is realized in September 2012, recorded in FAOSTAT (FAO 2019) . This is reasonable as any yield shock in September 2012 would be reflected in the supply and demand balance situation thereafter (i.e. the marketing season). Now, we return to explanation of how intraannual maize price variability PV ik,t is constructed from the monthly price data PV ik,tm . In the article, intra-annual price variability is measured by either CV or standard deviation (SD) of returns. For CV, we follow the standard mathematical definition to calculate the values, i.e. standard deviation (Σ) divided by mean (µ), using all monthly prices within a marketing year at a market. To be precise, the following formula is used: For SD of returns, we calculate the log values of the monthly prices and then calculate SDs of their   (B1) and (B2) show the results when using ranges relative to annual average and interquartile relative to annual average as the measure of maize price variability. Figures (C1) and (C2) show the results when using higher basis dimensions to approximate the smooth functions. Figure (D) shows the results when using lagged two and three years of maize imports as weight to construct foreign yield shocks. The shaded areas represent 95% confidence intervals.   Notes: This figure displays the original monthly maize price data (in real terms, deflated by country-specific general CPI) used to construct the intra-annual maize price variability. Each price is expressed in local currency per kilogram, and local currency is reported in table A1. In each subplot, each line represents a maize price series of a market at a certain marketing level. For example, there are two lines in the subplot of Peru: the upper line represents the prices of retail white maize at Lima, while the lower line represents the prices of wholesale yellow maize at Lima. Labels of markets/marketing levels in each subplot are omitted to save the limited space.
first-order differences. To be precise, the following formula is used: PV ik,t = Σ ∆PV ik,tm , where ∆PV ik,tm = log PV ik,tm − log PV ik,tm−1 .
Following the steps, we obtained intra-annual maize price variability (either measured by CV or SD of returns) for each country/market and each marketing year in the sample. The second variable to be explained is domestic maize yield shocks. For each country, we obtained the historical maize yield data during 1961/12-2017/18 from FAOSTAT (FAO 2019). For clarity, we label the country (i)-and-year (t) specific maize yield data as Y i,t . We consider that maize yield is a summation of two components: trend (YT i,t ) and yield deviation of trend (YE i,t ), as follows: In the analysis, linear, quadratic, cubic functions of marketing year t have been attempted to capture the trend component. Regardless of the trend calculation, domestic yield shock (DY i,t ) is calculated as ratio of yield deviation of trend to trend: Taking ratios allows us to compare yield shocks across countries having different yield levels.
The third variable to be explained is foreign yield shocks. This variable is an extension of domestic yield shock variable. Specifically, we start with using the same approach outlined above to calculate yield shocks for each maize exporting country. Then, we take import-share (w ji ) weighted average of yield shocks of all exporting countries (j) for each focus maize importing country: where the import share is calculated based on the average maize imports in the past four years.