Reserves and trade jointly determine exposure to food supply shocks

While a growing proportion of global food consumption is obtained through international trade, there is an ongoing debate on whether this increased reliance on trade benefits or hinders food security, and specifically, the ability of global food systems to absorb shocks due to local or regional losses of production. This paper introduces a model that simulates the short-term response to a food supply shock originating in a single country, which is partly absorbed through decreases in domestic reserves and consumption, and partly transmitted through the adjustment of trade flows. By applying the model to publicly-available data for the cereals commodity group over a 17 year period, we find that differential outcomes of supply shocks simulated through this time period are driven not only by the intensification of trade, but as importantly by changes in the distribution of reserves. Our analysis also identifies countries where trade dependency may accentuate the risk of food shortages from foreign production shocks; such risk could be reduced by increasing domestic reserves or importing food from a diversity of suppliers that possess their own reserves. This simulation-based model provides a framework to study the short-term, nonlinear and out-of-equilibrium response of trade networks to supply shocks, and could be applied to specific scenarios of environmental or economic perturbations.


Introduction
Country-scale food availability depends on domestic production, reserves, and trade. About 24% of the food that is consumed worldwide is available through international trade (e.g., D'Odorico et al 2014); likewise, 24% of the global agricultural land (Weinzettel et al 2013) and 23% of the freshwater resources used for food production (D'Odorico and Rulli 2013) are accessed through trade. Trade dependency has substantially increased in the last few decades and more than doubled since the mid-1980s (Porkka et al 2013 likely as a result of liberalization and the associated removal of subsidies and trade protections in developing countries (e.g., Shafaeddin 2005). While international food trade increases the variety of food products available to customers and helps buffer the impact of local supply shocks (e.g., crop failures), the effect of the liberalization of trade on economic development and food security in the developing world is the subject of a vigorous debate (Schanbacher 2010, Oliveira andSchneider 2016). It has been argued that it may allow for an influx of cheap subsidized food commodities from more developed countries, thereby displacing smallholder farmers, undermining rural livelihoods, and enhancing trade dependency in the global south (Shafaeddin 2005, De Schutter 2014, Godar et al 2015, as some countries increasingly rely on resources they do not control (e.g., Carr et al 2013, Suweis et al 2013.
Recent studies have stressed the environmental implications of food trade in terms of loss of environmental stewardship resulting from the tele-coupling between agricultural production and consumer behavior or market volatility (DeFries et al 2010, Schmitz et al 2012, Meyfroidt et al 2013. Other studies hint at the emergence of patterns of ecological unequal exchange, whereby an unbalanced distribution and flow of resources and environmental impacts perpetuates conditions of uneven economic development around the world (e.g., Rice 2007, Martinez-Alier 2014. In particular, the globalization of food through trade has been associated with the exportation and externalization of environmental impacts (Galloway et al 2007, O'Bannon et al 2014, virtual water and land trade (Hoekstra andChapagain 2008, Fader et al 2011), and the overall geographic disconnection between consumers and the environment that supports them (Carr et al 2013, MacDonald et al 2015.
In contrast with the number of studies on the economic and environmental impacts of food trade, the joint effects of economic and environmental changes on the resilience of the global food system, i.e., its capacity to meet food demand in spite of supply shocks, remain poorly understood (D'Odorico et al 2010, Prakash et al 2011, Fader et al 2013, Suweis et al 2015. In conditions of food crisis, prices dramatically increase, leaving the poor with no or limited access to food (e.g., De Schutter 2014). Moreover, during the recent food crises (e.g., in 2008 and 2011) the governments of exporting countries have responded to food price spikes by banning food exports, thereby leaving trade dependent countries in a state of insecurity (e.g., Fader et al 2013, Puma et al 2015. Export bans increase the uncertainty and unreliability of the global food markets, thereby eroding food security in tradedependent countries. The impact of the intensification of trade on food security is difficult to evaluate, particularly the short term response of food systems to shocks in production and the way such a response propagates through the global trade network. These effects are hardly captured by state-of the art economic models accounting for changes in supply and price fluctuations. In fact, such models typically assume (general or partial) equilibrium and market-clearing conditions (e.g., Hatfield et al 2013, Gouel 2013, Gouel and Jean 2015 that are unlikely attained in the course of a food crisis when hoarding and speculations occur while consumers scramble and suppliers make short-term arrangements (Piesse and Thirtle 2009, Headey 2011, Jones and Hiller 2015. A shock to production induces a short-term out-of-equilibrium condition in which shortfalls in food supply are addressed through either local adjustments or trade relationships. From a mass balance point of view, this shock may be partly absorbed at the country level by tapping on reserves or reducing domestic consumption, and partly transmitted to other countries as affected regions decrease their exports or increase their imports. The outcome of these processes cannot be predicted through a linear stability/reactivity analysis (e.g., Suweis et al 2015), as large perturbations cause nonlinear responses (such as threshold effects) and the system may not recover to its original state.
In this study, we develop a model that simulates the propagation of a food supply shock through the processes described above (changes in reserves, trade and consumption) while preserving mass balance at the country level. We share this approach with other 'cascading shock' models applied to specific food commodities (Puma et al 2015, Gephart et al 2016, virtual water (Tamea et al 2016), industrial sectors linked by input-output relationships (Contreras and Fagiolo 2014) and aggregate economic production (Lee et al 2011). Our model differs from previous work by its inclusion of food reserves, which empirical research has shown may play a major role in the resilience of food systems (Fraser et al 2015).
We apply our model to a major food commodity group (cereals) using publicly-available data on production, trade and reserves over the last two decades. We make parsimonious assumptions about countrylevel response to shocks that are consistent with the historical record, and simulate the propagation of shocks under different versions of the trade network to assess: (1) how food reserves and trade patterns interact to increase or decrease exposure to supply shocks; (2) how systemic changes in the cereals trade network over the last 20 years affect the risk (frequency and severity) of national food shortages following supply shocks; and (3) which countries may bear a relatively greater risk due to their position in the trade network.

Simulation model
The model simulates the impact of a shock to the supply of some food commodity on the global trade network for that commodity. The shock is initiated as a drop in production in one country and propagates through the network over multiple iterations of the simulation loop (figure 1).
At each iteration, countries affected by a shock first tap into their reserves. When reserves are depleted, countries absorb a fraction of the residual shock by reducing domestic consumption, then reduce their trade balance by decreasing exports and increasing imports, with the impact spread to each trade link proportionally to the volume on that link 10 . This 10 The exception to this rule, as illustrated in figure 1, is that countries cannot import more from a partner country that already reduced its trade balance following a shock, i.e.such trade links are 'blocked' from further increases.
propagates the shock from affected countries to their trade partners. Finally, any shock that could not be propagated is absorbed by reducing domestic consumption. These steps are repeated until all shocks have been absorbed (see the supplementary materials for a detailed description of the model and table 1 for a list of symbols and variables used in this paper).
As a portion of the shock is absorbed by domestic reserves and consumption at each iteration, the residual shock monotonically decreases towards zero. To avoid arbitrarily small shocks being propagated, countries will absorb (through consumption) any shock smaller than a fraction α of their current supply; we set α = 0.001% for all our simulations. With this adjustment, the model converges within 10 iterations for all parameter sets considered in this paper. At convergence, we verify that the mass balance equation: D + D -D = D + D P I E R C is satisfied for each country, and that the sum of DR and DC over all countries matches the magnitude of the initial shock (both within a tolerance level of α).
The assumption that production shocks are absorbed first by reserves is supported by the FAO commodity balance data, showing that interannual changes in cereals production (DP) are most closely associated with changes in R. In contrast, all components of C, except animal feed, show little interannual variation and little to no association with DP (see supplementary table 3). Both E and I are more variable than C over time, but these changes are mostly uncorrelated with DP, as trade dynamics are affected by other factors than immediate changes in production. We further discuss these assumptions and alternatives at the end of the paper.

Data
We initialize our model with historical data on the international trade in cereals. As a major component of global food trade and food stocks, cereals provide a natural starting point to study how food security is impacted by the distribution of trade flows and reserves. By focusing our analysis on a commodity group rather than a single commodity, we avoid the need to consider substitution effects between functionally-similar crops in that group. We use cereals production and trade data (detailed trade matrix exports) from the Food and Agricultural Organization of the United Nations' online database (FAOSTAT, faostat3.fao.org, data acquired in January 2016). Production and trade quantities of individual primary and secondary commodities in the cereals group are converted into kcal equivalents (FAO 2001) and aggregated by country and year (see supplementary table 2 for the list of included crops and conversion factors). We use population data from FAOSTAT to subset the network so that only countries with a population exceeding half a million people during the period 1986-2011 are considered. We rectify the data as described in Carr et al (2013) to account for the merging and splitting of countries between years.
We obtain data on countries' cereals reserves from the Production, Supply and Distribution database of the United States Department of Agriculture's Foreign Agricultural Service (USDA-PSD, apps.fas.usda.gov/ psdonline/, data acquired in October 2015). End-ofyear reserves for nine commodities (barley, corn, millet, mixed grain, oats, rice, rye, sorghum and wheat) were converted in kcal equivalents and aggregated by country and year, and political entities were rectified to match the FAO data above. While the USDA-PSD data does not include some minor crops covered by FAOSTAT (including buckwheat, fonio and quinoa), those nine commodities account for over 90% of the total grain production reported by FAO-STAT over the 25 year period. Note that since USDA-PSD reports aggregated reserves for the European Union (pre-1998) and EU-25 (1998 and after), we divide these reserves between EU countries for each year in proportion to their share of the EU cereals production.
For model input, we average the cereals production, reserves and trade over three five-year periods (1994-1998, 2001-2005 and 2007-2011), which we refer to by their median years (1996, 2003 and 2009). The set of countries was constant over each period (no merge/split event). The averaging process smooths out annual perturbations in the data and ensures that simulated shocks are applied to a typical state of the network rather than, e.g., one where some countries were already experiencing a shock.
The evolution of the cereals trade across these three time periods shows a decrease of global reserves and an increase in global trade, both expressed as a fraction of total production (table 2).
To separate the effects of changes in reserves and trade flows on model outcomes, we perform two different scalings of the 1996 and 2003 reserves: (1) in the R-scaled version, all countries' reserves are scaled by a common factor so that the ratio of global R to global P matches that of 2009 (e.g., from table 2, the global R/P ratio is 0.262 in 1996 and 0.192 in 2009, so the 1996 Rscaling would multiply each country's reserves by 0.192/0.262); (2) in the R/S-scaled version, each country's reserves are adjusted so that the ratio of R to the net supply S matches that of 2009 for that country (e.g., the R/S ratio for Australia in 2009 is 0.435, so its actual 1996 reserves would be replaced with 0.435 times its 1996 supply). Comparison between simulations based on the original data and results from these scaled versions allow us to identify the impact of (1) changes in global reserves or (2) changes in the distribution of these reserves among countries, respectively.

Simulation parameters and response variables
In this study, we refer to a model run as a set of N c simulations, to observe the effect of a production shock initiated (separately) at each country in the dataset. For each run, we select one of the three time periods, a specific scaling of the reserves (see above) and three global parameters: the initial shock magnitude as a fraction of the target country's production ( f p ), the fraction of reserves that are available to absorb a shock ( f r ), as well as the fraction of a shock absorbed by consumption after reserves are depleted ( f c , as defined in our model above). In general, we expect < f 1 r as the reported reserves include not only strategic stocks, but also temporary storage of goods along the supply chain.
For each model run, we report the number of simulations where the initial shock was transmitted (N s ), i.e.excluding those where the target country has no production or has available reserves that exceed the loss of production. We calculate the following summary metrics for each country: the number of hits, or simulations where the country receives a shock (N h ); the number of hits where domestic consumption is affected (N hc ); the relative change in net supply (Ds rel ) and consumption (Dc rel ) over all simulations; and the evenness ( J) of impact across simulations (see below).
To compare the average impact of a shock across countries and model runs, the total changes in supply (DS j ) and consumption (DC j ) for a given country j are scaled by its initial supply (S j 0, ) and the simulation parameter f p , i.e.if D ( ) S j k is the impact on S j of a shock initiated at country k, then: where the sum is taken over all simulations (initiated at each country) in a given model run. These metrics are always negative, so we usually refer to their magnitude, e.g.which countries receive a greater shock or impact. The average of Ds rel for all affected countries may be less or greater than −1, depending on the covariance between Ds rel and the initial supply S 0 . Starting from equation (1), we obtain (E denotes the expected value): Since the mean supply equals the mean production, both the numerator and the denominator of the first term on the right-hand side are equal in magnitude to the mean initial shock over simulations, and thus: Based on Pielou's measure of community evenness in ecology (Pielou 1966), J measures the degree to which the total impact on a country is spread out across multiple simulations. It is calculated as: where p kj is the proportion of the total DS j that is due to a shock initiated at country k: j if it is due equally to shocks originating from all countries, J j = 1. Since a single shock is spread out across many countries through trade, we expect this metric to increase with the number of links and trade volume in the network.

Model implementation
We performed the simulations and all data processing steps in R (R Core Team 2015), using the FAOSTAT package (Kao et al 2015) to facilitate data acquisition from the FAOSTAT database. The necessary code to reproduce all results in this paper is available on GitHub (http://github.com/pmarchand1/cerealsnetwork-shocks).

Effects of global changes in the trade network
To compare simulation results across different versions of the trade network, we fix the global simulation parameters to f p = 0.2 (20% production decrease in the country initiating the shock), f r = 0.5 (50% of reserves available to buffer shocks) and f c = 0.01 (1% of residual shock absorbed by consumption before it is passed through trade). Our sensitivity analysis (in the supplementary materials) shows that the number of countries to which a shock spreads depends primarily on the ratio of f p to f r , whereas the impact on domestic consumption is most affected by f p (supplementary table 1).
Our simulation results indicate that the most recent trade network (2009) has a greater capacity to absorb shocks compared with those of 1996 and 2003, as evidenced by a decrease in hits by country (N h , N hc ) and a lesser impact on consumption (Dc rel ) (table 3). However, this pattern is largely driven by the distribution of reserves rather than increased trade. Despite the total reserves being greater in 1996 and 2003which explains why the impact metrics are even higher when scaling these total reserves to 2009 levels-they are less evenly distributed, with a few countries (such as China) holding a very large proportion of their net supply in reserve and more countries having no reported reserves. By scaling relative reserves by country to their 2009 values (R/S-scaling), we see that the number of hits by country monotonically increases over time, with a small increase in the mean evenness of the impact across simulations, all factors consistent with an increase of the number and volume of trade connections.
While a more even distribution of reserves lessens the average impact on domestic consumption, it increases the average relative shock felt by countries (Ds rel ). To understand this pattern, we note that the mean of Ds rel is greater than −1 for all our model runs, which, based on equation (3), means that countries with a larger S 0 receive a proportionally greater impact from the shocks. This can be in turn related to the structure of the cereals trade network. A few large producers account for most of the net exports and receive more shocks due to their central position in the network (i.e. as each of their many trade partners will increase their imports when affected by a shock). These main producers/exporters also tend to have proportionately higher reserves, allowing them to Table 2. Summary statistics of the cereals trade data for each time period considered in our analysis (N c = number of countries in network, P = production, R = reserves, F = trade volume).
Med. year N c åP ( figure  2). The fact that the mean Ds rel approaches −1 in 2009 shows that these discrepancies are becoming less important. Once again, a large portion of the change between 1996 and 2009 can be explained by the distribution of reserves, with the residual differences (shown in the R/S-scaled version) reflecting the intensification of trade. Although the previous tables do not indicate the standard deviations for the consumption impact metrics (N hc and Dc rel ), their distributions are highly skewed with most countries receiving little to no impact. As such, we focus on the most impacted countries in the next section. Figures 2 and 3 present the total impact on the supply and consumption (respectively) of each country for three different model runs: original 1996 data, 1996 data scaled with R/S ratios from 2009, and original 2009 data. Once again, results are aggregated over simulated shocks initiated at each country. As stated in the previous section, major exporters tend to absorb a disproportionate share of shocks relative to their base supply (figure 2), due to their large reserves and high number of trade links. However, these large reserves also ensure that the impact on domestic consumption is negligible ( figure 3). The larger impact on DS for Argentina, Australia and Paraguay in 2009 (figure 2) reflects the growing relative importance of their exports. Some countries with low production and high trade can also exhibit a high aggregate DS, such as Oman, which increased both its reserves and trade volume between 1996 and 2009.

Country-level impacts
Countries where the simulated shocks produce substantial decreases in domestic consumption are concentrated in a few regions: Central America, the Sahel and East Africa, South and South-East Asia and (in 1996 only) the former Soviet Union ( figure 3). The set of most affected countries is not sensitive to variation of the global simulation parameters f p , f r and f c (supplementary table 2). Compared with the original 1996 data, simulations using the R/S-scaled reserves led to smaller impacts to consumption overall. Changes in the trade network itself greatly reduced the DC impact on many countries, including most of the former Soviet Union, Afghanistan, Sudan and Tanzania, but led to larger impacts in others, notably in Central America.
We can gain additional insights on these results by separating the share of DC in a country due to the shock initiated at that same country (internal shock) and that which is due to shocks initiated at other countries (external shocks). Figure 4(a) compares the impact on the 40 countries that experience a >1% decrease in consumption due to an internal shock in at least one model run. Using either the original or R/Sscaled reserve levels, most countries lie above the 1:1 dividing line and are thus less impacted in the 2009 trade network. This is consistent with the additional trade links and volume, which result in a greater capacity to transfer an internal shock to trade partners.
Conversely, a majority of the 24 countries receiving a substantial (>1% of S 0 ) external shock are more impacted under the 2009 trade network ( figure 4(b)), reflecting an increased reliance on food imports from one or a few trade partners. A look at the specific external shocks causing these DC show that they originate from nine source countries (figure 5), with 14 of these shocks-including the four greatest in magnitudecaused by an initial production drop in the United States. While the other target countries in the graph experience this risk from one or two simulations, the DC in Singapore is spread over five sources; it also has the lowest aggregate DC, only slightly above the 1% threshold.
Contrasting with the overall trend towards a more globalized food trade network, our results show that the vulnerabilities to external shocks occur mostly at a regional scale, with American, South Asian / Indian Ocean and East Asian clusters clearly visible in figure 5 (the link from the United States to Japan being a notable exception). . Each row aggregates results from a set of simulations, each with a shock originating in a different country. N s is the number of simulations where a shock is passed; N h (resp., N hc ) is the number of times a countryʼs supply (resp., consumption) are affected across simulations; Ds rel (resp., Dc rel ) is a relative measure of the total change in a countryʼs supply (resp., consumption) across simulations; J is the evenness of impact between simulations. Means and standard deviations are calculated across affected countries.

Discussion and conclusion
In this study, we presented a dynamic simulation model that complements previous approaches aimed at understanding the effect of increasingly globalized trade networks on the resilience of national food supply systems. Initialized with historical food production and trade data, the model describes how a local production shock is propagated as countries use their reserves and trade links to buffer the loss in food supply. Based on data for a specific commodity groupcereals and cereal products-spanning a 17 year period from 1994 to 2011, we identified two global trends affecting the model's dynamics: an increase in both the number and volume of trade links (relative to production), but also a decrease and a more even distribution of global reserves (still relative to production). This latter point is particularly relevant to the ongoing discussion on the importance of food stocks (Fraser et al 2015, Laio et al 2016, as our results suggest that the distribution of reserves matters more than their aggregate quantity in terms of conferring resilience to shocks. Trade and reserves also interact: as more countries have the reserves to absorb production losses or the capacity to import more from countries with such reserves, both trends contribute to reducing the number and severity of cases where a local drop in Figure 2. Total change in net supply (åDS, summed over independent simulations of shocks initiated at each country) as a fraction of the affected country's initial supply (S 0 ), for three versions of the input data. The middle panel (R/S-scaled) uses the 1996 production and trade data, but scales the reserves to match the 2009 reserves/supply ratio. Global simulation parameters (see table 1) are set at f p = 0.2, f r = 0.5 and f c = 0.01. production forces a decrease in domestic consumption. However, a greater reliance on imports increases the risk of critical food supply losses following a foreign shock, notably in the case of several Central American and Caribbean countries that import grains from the United States.
Since we simulated independent production shocks of the same relative size originating in each country, our aggregated results do not account for variation in the probability of production shocks across countries, or for the possibility of simultaneous shocks in multiple countries. The latter is of particular significance as, according to our analysis, the countries most at risk of food shortages from external shocks tend to be concentrated in regional blocks. Further research on this topic could thus focus on developing more realistic shock scenarios where the impact is distributed across a region.
By focusing on the impact of global reserve distribution and trade network structure, we necessarily ignore the particulars of each country's domestic policies and trade agreements that may affect the national response to food supply shocks. While our results indicate the relative vulnerabilities of countries along the dimensions considered in the model, this analysis alone cannot serve as an assessment of the actual level of food security in each country. To avoid introducing too many adjustable parameters, we chose a parsimonious model of the agents' (in this case, national economies) behavior: all countries are willing to spend the same proportion of their reserves, and any shock transmitted to trade partners is partitioned equally among all trade links. The latter assumption is shared with other models of 'contagion' in economic networks (e.g., Lee et al 2011). A few recent models of shock propagation in food commodity networks (Puma et al 2015, Gephart et al 2016 use a GDP-weighted partitioning, based on the assumption that countries with a higher purchasing power will have a greater ability to sustain their imports from production-stressed countries. A key challenge in the development and parametrization of more complex model versions is the coarse, aggregate nature of available production and trade data, which limits our ability to follow the propagation of individual shocks in the empirical record.
We can contrast our simulation-based approach with previous studies aimed at evaluating the global food trade network's resilience to supply shocks.
Using an aggregated virtual water trade network, Sartori and Schiavo (2015) analyzed the distribution of historical supply shocks as well as changes in the network structure over time, to support the thesis that the global food supply became more stable as the reliance of trade increased. However, the data alone does not suffice to isolate the effect of increased trade from that of other trends present in the historical record, such as a change in the distribution of food reserves. Our model not only differentiates the effect of these two trends, it also highlights the uneven impact of these changes among the most vulnerable countries, showing how relative risks may shift from one region to another.
By shedding light on the complex interactions that determine the link between trade and food security, our model also suggests different paths through which national economies can reduce the risk of food shortages, such as diversifying the sources of staple food supplies and ensuring that trading partners have the reserves to withstand a shock. We recognize however that these country-level metrics constitute only one dimension of food security, and that a more complete assessment requires consideration of within-country inequality in income, nutrition and access to food. Furthermore, while patterns of trade-dependency can be studied within the context of specific food commodity networks, their origin is intrinsically linked to larger socio-environmental issues, including differences in access to water or land, the intensity of their use (Fader et al 2016), and the geographical distribution of pollution and other environmental externalities. Figure 5. Graph of countries having to reduce consumption for a shock initiated at source countries (orange nodes). The width of each edge is proportional to DC S log 0 . Simulations initialized with 2009 input data and global parameters (see table 1) are set at f p = 0.2, f r = 0.5 and f c = 0.01.