A Novel Computational Model of the Wheat Global Market with an Application to the 2010 Russian Federation Case

In this paper, we build a computational model for the analysis of international wheat spot price formation, its dynamics and the dynamics of quantities traded internationally. The model has been calibrated using FAOSTAT data to evaluate its in-sample predictive power. The model is able to generate wheat prices in twelve international markets and traded wheat quantities in twenty-four world regions. The time span considered is from 1992 to 2013. In our study, particular attention was paid to the impact of the Russian Federation’s 2010 grain export ban onwheat price and quantities traded internationally. Among other results, we found that the average weighted world wheat price in 2013 would have been 3.55% lower than the observed one if the Russian Federation had not imposed the export ban in 2010.


Introduction
. The worldwide supply of food in addition to the conditions of access to it by individuals, is strictly connected to the concept of food security. The Food and Agriculture Organization of the United Nations (FAO) identifies the four pillars of food security as availability, access, utilization, and stability. .
In this framework, the volatility of commodity prices on the agricultural market observed in recent years is an issue, so much so that the European and international agricultural policy has shown a clear interest in e ectively reducing it. Between and there were changes in price of as much as % from one year to another. Maize (corn) was worth euro per ton ( /t) in July , euro /t in March (+ %), euro /t in September (-%) and fluctuated around this level in . In it rose to euro /t (+ %). The price of other cereals has had a similar trend and dramatic swings. .
These oscillations are due to several reasons, o en complex and sometimes linked to real speculation based on emotion and ignorance of Securities Dealers.
. The first and perhaps most important structural element of agricultural market volatility lies in the inherent fluctuation that is the basis of farm production. A good or a bad year from a climate point of view can have decisive impacts on production levels of a company and/or region, with the markets being quite sensitive to weather information that a ects the yield potential of the growing crop. It is important for market operators to be able to predict the market price in order to maximize financial returns, but if high and volatile prices attract the most attention, low prices and volatility are problematic with extensive negative impacts on the agriculture sector, food security and the wider economy in both developed and developing countries (Toscano et al. ).

Market organization .
Considering current information and communication technologies, markets are thought of as (virtual) places where producers and buyers send information. More trivially, goods are not physically moved to the market by the producer and, once sold, moved again from the market to the buyer. As commonly happens, buyers and sellers send their o ers to the market which uses this information to reach agreements. Once an agreement is reached, the goods are moved directly from the seller's to the buyer's location. .
Markets are organized in sessions. Each market session is associated to a producer. The latter can have only one session in a market, and he must participate in at least one market. This organization allows buyers who bid in a given session to know who the producer is. The producer's geographic location has an important role here because it informs buyers on where the goods are stored. Because in the CMS model buyers bear the transport costs, this organization allows buyers to compute such costs and account for them when submitting their bids.

Market participants
.
The CMS model provides that each producer has a special relationship with a buyer and that a buyer can have a special relationship with a producer or not. To understand the motivation for this provision, the following, more realistic implementation of the model is described. Consider a situation aimed at investigating an international setting with countries as main actors. Each country has a demand for the considered commodity, therefore it can be seen as a buyer. However, not all countries necessarily produce the commodity. Suppose only some of the considered countries have a domestic production. In this context, some countries can be seen as both producers and buyers while others can be seen as buyers only. To handle this situation in the CMS, the researcher can create: • a producer having the country's aggregate production and a buyer conveying the country's aggregate demand for each country having a domestic production; • only a buyer conveying the country's aggregate demand for each country that does not have a domestic production. .
In this more realistic setting, it is natural to think of a special relationship between the producer and the buyer representing the same country. More generally, this is important to understand market participants because a producer can decide to sell exclusively to the buyer who represents the same country. In the real world this happen when a country forbids exports. Similarly, buyers who have an associated producer can decide to buy exclusively from this producer (a producer country can forbid imports). The latter is not possible if the considered buyer does not have an associated producer (a non-producer country does not forbid imports).
. In the light of what is reported above, the participants in a market session are: • the producer that organizes the section; • the buyer who has a special relationship with the producer; • the other buyers if the two following condition are both satisfied: -the producer has not decided to sell exclusively to its associated buyer; -the buyer has not decided to buy exclusively from its associated producer.
. Figure gives a visual representation of agents in a possible implementation of the model. In this specific case there are three producers (P 1 , P 2 and P 3 ), five buyers (B i∈{1,...,5} ) and two markets (M 1 and M 2 ). P 1 and P 3 sell in M 1 and P 2 sells in M 2 . M 1 has two sections: m 1 s 1 where P 1 's goods are sold and m 1 s 2 where P 3 's goods are sold; M 2 has one section: m 2 s 1 where P 2 's goods are sold. The figure also assumes that equal lower scripts signal the producer-seller special relationship, i.e. P 1 is associated with B 1 , P 2 with B 2 and P 3 with B 3 . B 4 and B 5 do not have special relationships. .
Going back to the more realistic example given above, we can say there are countries in the model. All the countries use a commodity which is produced by three of them (countries , and ). Countries and do not have a domestic production of the commodity and must buy it from the other countries. P 1 , P 2 and P 3 are agents that represent countries , and aggregate production respectively. Similarly, B i s agents represent the countries' aggregate demand. The links between B 1 and P 1 , B 2 and P 2 and B 3 and P 3 represent domestic exchanges of the commodity. Because this type of exchange normally concerns most of the production, thicker lines were used to join the market session and buyer in Figure . The figure also shows that country does not allow exports or imports. i.e., production is for domestic use and all country commodities are produced internally. Sequence diagrams are used to give a fast, but e ective description of the dynamics. Figure shows the actions the simulator performs in an iteration. Below we will give an intuitive description of the figure's points and , i.e. updating of the buyer's strategy and the markets operation phases. This allows an overall understanding of the model. A fully detailed description of how the simulator performs all the main loop actions can be found in the CMS documentation.
Buyers update buying strategy .
Updating the buying strategy is an elaborate action. This is especially because buyers in the CMS continually attempt both to reduce total expenditure and gather the desired quantity. Complications are mainly due to the existence of multiple provision sources (market sessions) in which supplies and prices continuously change in time. Just to give an idea, consider a buyer having at time t the situation shown in Table . The table shows  Figure : Operation of markets sequence diagram the buyer's provision sources and their unit cost, i.e. the market price plus transport costs. Now, the buyer is called to evolve its buying strategy. The CMS evolves this strategy in an adaptive way, i.e. a share of the quantity bought is moved from the most expensive to cheaper markets. Suppose this buyer moves % of the gathered quantity i.e. units. This implies that demand to P 6 is decreased by and that of P 5 by . The demand to less expensive producers is increased by a percentage until is reached. Supposing this percentage is %, the P 1 demand is increased by , that of P 2 by , that of P 3 by , and that of P 4 by the residual amount . .
The last column of Table shows how demand slowly flows to cheaper market sessions. However, in next period the ranking of unit cost could change due to the interplay of supply and demand on the various markets forcing buyers to continuously chase a total expenditure reduction. The CMS accounts for several other factors a ecting the distribution of each buyer demand on each market. They include the changing needs of a buyer due to its population and an increase or decrease in economic activity. An additional complication is due to the possible change in the number of market sessions accessible by each buyer due to producers and buyers modification of import-export policies. The reader is pointed to the CMS documentation for full details on how all the particular cases are handled by the simulator.

Perform market sessions .
We will now describe the functioning of a market session (see Figure ). To do that, we have to discuss the construction of the market session supply and demand curves. .
Concerning supply, we recall that in a market session, the traded items come from a single producer. The market session supply curve therefore corresponds to the producer's supply curve. Now we need to specify how the producer sets the supply curve. In the present version of the model, the easiest option of a vertical supply curve Producer bought quantity unit cost target demand in next period . P 6 . total Table : Hypothetical situation of a buyer is adopted: the supplied quantity is independent of price. Despite this simplification, managing the supply policy is tricky when accounting for production that is not realized at every simulation time step and/or for producers who participate in more than one market session in each time step. Even in these cases, the simplest solution is adopted: at the beginning of each market session, the producer checks the level of inventories and divides it equally among the market sessions to come before the production is available. .
The demand curve is normally obtained aggregating individual demand curves. As explained above, several buyers attend a session (except when the seller forbids exports). Based on the target levels of demand (see the last column in Table ) each buyer builds a demand curve for each accessible market session (see the documentation for details on how these curves are built). When two or more buyers attend a market session, their demand curves are aggregated by summing them horizontally to obtain the session demand curve.
. Now, using the session demand and supply curves, the market price and traded quantity are computed. The quantity bought by each buyer is obtained using the market price and the individual demand. The diagram in Figure , which focuses on a market session (say market session A), can better clarify this. Figure : Computation of market price and traded quantities .
Bold lines are the market session supply (S A ) and demand (D A ) curves. For the sake of simplicity it is assumed that there are three buyers in this market. The thin black lines keep track of the horizontal sum of the individual demand curves. The intersection point between the session demand and supply curves (bold lines) determine the market price (p * A ) and the total traded quantity (q * A ). The quantities bought by each buyer (q * 1A , q * 2A , q * 3A ) are also reported. Obviously q * The CMS-Wheat Model . The model whose essentials are presented above needs some specializations to analyze wheat. We adopt a modeling strategy that provides for a gradual introduction of real world elements. A comparison of simulation outputs with the corresponding real world data is a guide to progressively improve the modeling choices and remove the shortcuts taken to keep the initial versions of the model essential and easily understandable. Figure gives a visual representation of the model used in this paper. Following the figure flow, we describe its components below: the real data used as inputs and as terms of comparison for outputs, the modeling choices, and comparison of the model outputs with empirical ones. We use real world data for i) wheat production and uses, ii) wheat prices and iii) crude oil price. Wheat quantities and prices are from the FAOSTAT dataset while oil price is from World Bank databases. .
Details of these data are as follows.
. National and regional time series of yearly wheat production and uses were downloaded from Food Balance section of FAO website (Commodity Balances -Crops Primary Equivalent). This dataset contains time series of "Wheat and products", that includes Wheat; Flour wheat; Bran wheat; Macaroni; Germ wheat; Bread; Bulgur; Pastry; Starch wheat; Gluten wheat; Breakfast cereals; Wafers; Mixes and doughs; Food preparations, flour, malt extract. For production, the definition of "wheat" given in FAOSTAT is: "Triticum spp.: common (T. aestivum) durum (T. durum) spelt (T. spelta). Common and durum wheat are the main types. Among common wheat, the main varieties are spring and winter, hard and so , and red and white. At the national level, di erent varieties should be reported separately, reflecting their di erent uses. Used mainly for human food". Given this definition, we jointly model so and hard wheat since we are unable to distinguish between them. The FAO wheat dataset contains a large set of variables: import, export, domestic supply quantity (production + imports -exports + changes in stocks), food supply quantity, stock variation, feed, other uses, seed, waste. These variables are the component of the wheat sources/uses balance equation on which this paper relies.
To understand the validation procedure implemented in this paper, some detail on the balance equation are given. Formally, the balance equation is the following: production + import − export + stock variation = = f ood + f eed + seed + other uses + processing + waste ( ) Some specifications on the variables involved might be useful.
• The production variable contained in this dataset is approximately the same as the one in "Crops section" of the FAO Production dataset (Crops).
• According to FAOSTAT definitions, a negative sign in stock variation corresponds to an increase in stock. Stock variation is thus defined as initial stock − f inal stock. • Statistical discrepancies make the aggregation of balances equation across world regions and countries inexact (see Appendix A for detail).
. Yearly time series of wheat prices for most of the producing countries are used to validate the model output. An aggregated time series of yearly wheat price has been calculated averaging prices of selected producers by means of weighted arithmetic mean, where production volume is used as weight. Because real world prices will be compared with our simulation results, the most important prices time series are reported in Figure . ♣ .
We will proceed to aggregations and decompositions of quantity data below. It is therefore useful to give information on this topic. Table reports data on the top wheat producers worldwide. Countries were ranked according to averaged production over the period -. The table reports the country percentage of worldwide production; the corresponding averaged yield, i.e. hectogram of production per hectare; the averaged land area utilized to grow wheat (Harvested Area). Wheat production of the Top and Top amount to 86.1% and 52% of worldwide production, respectively.

Modeling choices .
In this section we retrace the description of the general version of the model given above to discuss the customizations and modeling choices made in order to specialize the model for wheat.

Agents .
We set up the simulation to obtain a level of aggregation suitable to investigate international prices formation and traded quantities. In general, we use FAOSTAT regions that are sub-continental geographic areas gathering several countries. However, when a region includes a country (countries) playing a relevant role in the world wheat production/consumption system, we further partition the region to treat the important countries as individual entities (see Appendix A for more details). At the end of this process we end up with the geographic areas highlighted in Figure and listed in table .
. To retain only internationally relevant producers in our analysis and keeping the world supply-demand balance, we proceeded as follows. The net demand was computed for each region as the di erence between wheat Regions considered in the model (thick line contour) and Commercial hubs (circles). Green circles denotes outgoing hubs, light blue circles denotes incoming hubs. The size of the circles inform about produced and used quantities.
demand and supply. Regions having a positive net demand in all the years of the time span considered were assumed to consume their production internally. Their production was therefore set to zero and their demand was replaced by their net demand. As a result of this process, the artificial world wheat trade system considered in this study is populated by sellers (those having a "yes" in the "Has an international market session?" column in table ) and buyers. For each of these geographic areas, the most important commercial hubs were identified. Again, in table , the column "outgoing hub location" highlights the top producers in each region (see also table for a complete ranking of these) and the "Incoming hubs location" column reports the top importers of each region. The positions of outgoing and incoming hubs are shown in Figures , which also gives information on quantities o ered and used by each region. .
Buyers and sellers interact in a single global market having sessions (one for each producer).

Dynamics .
Considering the available FAOSTAT data, the time window for the simulation is set to -. The model runs . The possibility to change import/export policies mentioned in Figure (items and ) is used, as we will highlight below in the text, to investigate the e ect of the Russian Federation export ban on the international wheat price. Except for this, the model implements a completely open global market environment. In these settings, transport costs are the decisive factor that relates the demand function a buyer sends to a market session with the distance from the producer selling in the considered session. Transport costs per unit of product (c) borne by buyer (say A) to transfer the product bought from producer (say B) home are modeled as follows: where O p is the oil price, and kkm A,B is the distance in thousand kilometers. a is a fix cost per thousand kilometer and b is the oil needed to transfer one unit of product for a thousand kilometers.

Demand .
Because individual demand curves management undergoes some changes with respect to the original CMS, we briefly discuss this topic here. In initializing the demand curves position we account for buyer's and producer's sizes in order to avoid big countries making too large demands from small producers and vice versa. In this way we set the target level of demand (d) which is the quantity demanded at the average price level (see Figure ). We then set the slope of the demand function in such a way that the demanded quantity increases by a given percentage (the parameter δ D ) when the price equals zero. Therefore, the demand curve is a straight line going fromd − :=d(1 − δ D ) tod + :=d(1 + δ D ) as displayed in Figure . Furthermore, there is a level of pricep z above which the wheat is out of range because it is too expensive for the country. We set this threshold equal across buyers in order to keep the model simple. .
Demand curves continuously move in time to allow buyers to gather the desired quantities at the lowest price. These desired quantities (d) change in time and are not endogenously determined i.e. they are inputs for our model. Understandably, they are not included in any database. We therefore decided to infer them from the FAOSTAT data using a calibration procedure that is better described below and in Appendix A. In order to keep the wheat variant of the model simple and in line with the general version presented above, we used a vertical supply curve. In addition to the basic model, a reserve price below which the producer is not willing to sell was introduced. The reserve price (rp) is given by: This functional form is based on a linear unit production cost composed of a fix part (a rp ) and a second component proportional to oil price. A second amendment to the supply curve of the original model involves the rule used to update the quantity o ered monthly. We let producers distribute the stock quantity uniformly on the market sessions that will be held before the next harvest. Figure shows a producer region's (say region A) supply curve. As for demand curves, the supply curves change in each time step (i.e. monthly). In particular, the horizontal portion moves up or down according to the monthly oil price level, while the quantity o ered (y A ), i.e. the vertical portion, moves le or right in order to make warehouses empty at harvesting time.
Market equilibrium and disequilibrium .
The modifications to the demand and supply curves just described above give the possibility to observe market disequilibrium even in the centralized market structure used in this model. A market is in equilibrium when the intersection point belongs to the downward section of the demand curve and vertical section of the supply curve. This situation is basically the one already seen in Figure . One possibility of disequilibrium is characterized by intersection points belonging to the horizontal section of the supply curve. This happens when the demand is too low compared with the quantities o ered. Because this is a situation observed in our simulations, we report it in Figure . In this case, as displayed in the figure, producer countries do not succeed in selling the whole quantity o ered on the market. In another form of market disequilibrium, buyers leave the market without the quantity they wish. If heterogeneousp z are considered, the market demand curves have horizontal sections (especially at high prices). Buyers rationing happens if the intersection point falls in one of these portions. Furthermore, it can happen that the market price is higher than some buyers' upper price thresholdp z . Therefore, these countries do not buy any wheat. However, our simplification of homogeneous buyers upper price threshold excludes the realization of this case in our simulations. Other forms of market disequilibrium, such as those due to decentralized market structure, cannot be observed either in our simulation. These two cases represent opportunities for future developments of the model. Figure : Market in disequilibrium due to a demand fall or production boom.

Parameters calibration procedure
.
The model has several parameters. Setting some of them is straightforward or can be done using economic deductions. A calibration procedure has been implemented to set the other parameters. This calibration procedure combines two techniques: the di erential evolution algorithm and a variant of the gradient method. Details are provided in Appendix B.

Results
. The model outputs prices and all the traded quantities among the producers and the user regions at monthly frequency. This is a large amount of data which is much more than the available real world data. The main feature of the proposed model is that it endogenously generates the dynamics of prices and quantities. It also accounts for prices-quantities interaction in the generation process. To our knowledge, no other study has these characteristics: they either analyze prices or quantities. The majority of studies focus on understanding the price formation process keeping exogenous quantities. This is mainly because wheat is the main staple foodstu and avoiding sudden increases in its price is desirable. The issue of price level and volatility mainly a ects poor countries where it is used in a roughly processed way. .
On the quantities side, the trade network evolution of a single commodity is a new field of study which attracts attention. However, prices have very small role in these types of investigations. These studies highlight how the network is in continuous evolution. Arguably, globalization and new information and communication technologies cause a long-term tendency to a growing and more connected trade network bringing potential benefits .
The model presented in this paper allows the dynamics of both prices and trade quantities to be jointly monitored. In presenting our results, we will first show how the model is able to replicate the basic features of the trade network and prices. We then discuss one of the many possible applications of our model. In particular, we aim at evaluating the e ects of a negative event that destroys some links in the network. A natural experiment for this is the Russian Federation export ban.
. We highlight that the calibration process we implemented was aimed at replicating prices. Our results have therefore more qualitative nature with respect to the trade network, while we can give precise quantitative results concerning prices.

Trade network structure .
By using simulation output, we can compute for each region the quantity bought in the domestic market session, the quantities bought from each of the other producers, and those sold to each buyer. It is thus possible to compute the import and export time series on a monthly time scale and obtain the corresponding annual series by summing up every periods. This aggregation allows for stimulating exercises by qualitative comparison of simulated and real data. Three of these exercises were performed: i) long-term commercial relationships via graph visualization, ii) dynamics of trade via geographic maps and iii) time series comparison. All these exercises derive from the possibility of building the network of international exchanges and tracing the dynamics of such a network. As highlighted above, this is a recent topic of investigation (Barigozzi et al. ; Fair et al. ). The outcomes of these exercises are reported and discussed below.

Long-term commercial relationships via graph visualization .
We use a circular graph layout to assess whether the model grasps the most important commercial relationships in the long run. We proceed by summing the quantities traded in the whole time span ( years) by each pair of regions. These figures are arranged in a matrix. We then transform this matrix into an adjacency matrix by replacing the highest n figures with and setting the rest to . Proceeding in this way for both FAO and simulation data, we obtain graphs with an identical network average degree (i.e. the number of edges divided by the number of nodes) which are therefore fully comparable. Both real world and simulated adjacency matrices are then visualized using a circular layout whose node sizes are proportional to their out-degree (in the case of exports) and in-degree (in the case of imports). The four graphs at a network average degree of 1.5 are shown in Figure . . By looking at the graphs, it is possible to see at a glance how the model fits the most important real world commercial relationship. USA, North America, Western Europe, Oceania, Eastern Europe and Russian Federation are the main exporters in both real and simulation data (see graph a) and b) in Figure ). On the import side, Northern Africa, Southern Europe, China, Western Asia and Eastern Asia have a primary role in both real data and simulations. Instead, simulated data underestimate the role of South-Eastern Asia with respect to the real data counterpart.

Dynamics of trade via geographic maps .
A second exercise is that of drawing lines between sellers and buyers using a world map. With respect to the analysis described in the previous section, we avoid pooling the relationship of all years and opt for visualizing the commercial relationships that occurred in a single year. Consider Figure as an example. The figure provides a visual representation of the international exchanges generated by the model in . We recall that, in this type of representation, flows move clockwise. In other words, a node A provides resources to a node B if moving from A along the line to B implies a clockwise movement. Some examples can help in clarifying this. According to Figure , South-Eastern Asia imported a relevant amount of wheat from Oceania (note the counter clockwise outer direction of the edges starting from Indonesia), while United States and Canada exported to several other regions (clockwise outer direction of many lines exiting from these two countries).   evolved from to . Unfortunately, it is di icult to describe these dynamics in an article. To overcome this di iculty, we use digital technologies to provide companion web pages. The reader can point the browser to the following URL: http://erre.unich.it/wheat_map/ to have a dynamic presentation of the trade network generated by the model. The web page displays a set of short movies (gif format) continuously cycling among the maps of all the considered years. The first movie, displays the link among all considered regions. Scrolling down the page, one can observe the dynamics of the links of each single region. Furthermore, by clicking on one of the years reported at the top of the page, one obtains an interactive trade network for the chosen year. It is possible to show the commercial relationship of a given region by clicking on the corresponding node. .
According to this dynamic representation, the simulation generates a vivid network structure where links continuously appear and disappear. However, these observations deserve deeper studies in the future in order to better assess the dynamic features of the network and how it responds to shocks. Performing some aggregations in the FAO data (details of which are given in Appendix C), we compute several quantities that can be compared with simulation outcomes. We focus our attention on the quantity used by each region because it contributes to the well-being of the population, especially in poor countries. The FAO dataset supplies this quantity. As we highlighted above, our calibration process identifies a time series of target quantities for each region. These quantities are strictly tied to the quantity used because in simulations, each region acts adaptively to gather the target quantities in the accessible markets. However, quantities obtained in the simulation output o en di er from the target because buyers can fail to obtain the desired quantities in the markets. .
The comparison of these three variables (real, simulation output and simulation input) provides an opportunity to evaluate the performance of the model on the quantity side. Figure  foreign, hence the heading "bought quantities". .
The charts show how the dynamics of simulated quantities is generally compatible with those observed for all the considered regions. However, we expect possible improvements in the future by giving weight to quantities in the calibration objective function.

Price dynamics .
The comparison between simulation output and real world data is straightforward for yearly prices because they are fully available for each country. Figure compares simulation outputs with the weighted average price of the producer countries. The weight is given by the share sold by the country with respect to the sum of the total quantity sold. As already mentioned, both prices and sold quantities are available in real world data at yearly frequency. Simulations instead provide monthly values. Therefore, yearly aggregation is computed from simulation data by first calculating the monthly weighted prices and then averaging them every periods. Since simulation unit measure for prices di ers from the real data one, we normalize the values. The normalization was done dividing each time series by its own minimum value. Figure shows the yearly weighted world price fit. The prices observed in real data are accurately reproduced by our model. Although this is a consequence of the calibration procedure described above which has the objective of minimizing the distance between simulated and real prices, this result signals that the model grasps the essential elements of international wheat exchanges. .
The results of this investigation provide an interesting insight into the modeling of the global price of wheat. The two sharp peaks in / and / are faithfully reproduced also if they are specifically due to investor speculations that are not strictly accounted in our model implementation. Conversely price decline and stagnation at the end of last century and before were well reproduced. The model, which is generally satisfactory, does not account for the first year of simulation due to the complexity of the simulation initialization phase. We set up the simulation using data and let the system evolve with these input values. A er simulation output stabilizes, we make the simulation load new inputs at each time step. Therefore, when the simulator starts loading inputs, the system is in a state comparable to the equilibrium. As highlighted above, real systems are not normally in equilibrium. The gap between simulation outcome and FAO data in therefore reflects the di erent states of the two systems: equilibrium in simulations and out of equilibrium in FAO data. As the simulation progresses, the artificial system gradually enters the disequilibrium state comparable to the real world's and the two prices get closer and closer.
Assessing the e ects of the Russian Federation export ban .
One of the most challenging uses of the model presented in this paper is the evaluation of policy choice e ects both on wheat prices and traded quantities. The Russian Federation export ban mentioned in the introduction (Section . ) provides an occasion for this.
. In a severe climate anomaly in Eastern Europe caused many impacts related to heat-waves (Barriopedro et al. ), wildfires (Lioubimtseva et al.
) and air pollution (Konovalov et al. ). In particular, the Russian Federation, Kazakhstan, and Ukraine (all three amongst the world's top-wheat exporters) su ered the worst heatwave and drought in more than a century, while the Republic of Moldova was struck by floods and hail storms (Arpe et al.
; Winne & Peersman ). In addition, from early July to September a large crop production area was hit by wildfire with significant losses and grain yield in the Russian Federation was reduced by a third (Lioubimtseva et al. ). However, the story of the Russian Federation ban needs to be explained starting from the framework of operator expectations. Based on previous years' performance, optimism about the upcoming harvest was high early in : in May , the Russian Grain Union predicted that the harvest might reach million tons, revised down to million tons in mid-June . This lower forecast represented a % decline from the harvest, but would still be su icient to meet domestic demand and allow grain exports. On the basis of these forecasts, o icials in Russia's grain industry predicted that grain exports would exceed million tons for the -agricultural year, and lobbied the government to become more active on the world grain market and to increase exports even more (Wegren ). However, by the end of July , as soon as the climate e ects on production became more obvious, the original forecast for a million ton harvest was revised significantly downward (the last report was million tons). When it became clear that the harvest would be much smaller than in , the market reaction was an immediate spike in grain prices (Financial Times a). One of the first actions the government took when it became clear that drought and heat would significantly a ect the harvest was to attempt to calm the domestic market by enhancing domestic supply. At the end of July, the Russian government released three million tons of grain from its reserves. Then on August , the Russian Federation announced a ban on grain exports that would stay in e ect until the end of (Financial Times b). However, this was subsequently extended to the following summer harvest as continued hot weather in autumn looked as if it might have damaged planting and lowered returns for (OECD ). The export ban was initially enacted to impede speculation and price hikes on bread and grain products on the internal market, but instead the ban proved to be ine ective in stopping food inflation and wheat price increase at local and global level.

.
As explained above, import/export policies can be managed in our model. This gives us a chance to observe how the system would have evolved if the export ban had not been imposed. It is worth mentioning that because the ban happened in the real world, it was active in our model during the calibration process. Using the calibrated parameters, the model was run two additional times: with the Russian Federation export ban enabled and disabled. Furthermore, the model outputs the projection of prices for the following years. They are obtained under the simplification that produced and demanded quantity keep constant at the levels. . The normalized price in the simulation without ban (red line) is . , with a -. % deviation from the observed price. The price simulation without ban confirms the uselessness of the ban while the general price increase is due to net supply shock between what was declared early in and what happened later (Wegren ; Adjemian et al. ). In this way, predictions of a poor harvest in the Russian Federation lead to dramatic increases in purchases and prices, even though this drop in production would not have a dramatic impact on global supply. This then triggers export bans in exporting countries, which in turn makes importers even more nervous and so generates a self-fulfilling prophecy (Welton ). This may also help to explain the persistence of high prices as shown in Figure with and without the ban. Moreover, the ban on grain export had various short and long-term consequences. The ban had immediate implications on the Russian Federation's traditional wheat trading partners, forcing them to source alternative supplies (see Figures and ). According to the model, the export ban has modified the Russian Federation trading relationships. Figure , for example, makes clear the relevant increase in the Russian Federation-China trading relationship in . Looking at the supporting material at http://erre.unich.it/wheat_map it is possible to see how this link gradually normalizes in the following years. Finally, in terms of longer-term impacts, the grain export ban has arguably created a framework where price spikes and uncertainty are far more likely in the future (Welton ).

Conclusions and Further Developments
. ) on the causes of the food price crisis of -, the factors that emerge with greater importance are: climate, diet, exchange rates, energy costs, ethanol and speculation. Lagi et al. ( ) found that the last two parameters are the ones that most influence the market: ethanol conversion resulting in a smooth price increase, whereas speculation results in bubbles and crashes. In our model, exchange rates and energy costs are strictly connected to the oil price, while diet is included in the FAO dataset (feed, food and other uses). Ethanol is mostly extracted from other crops and residues, mainly sugar and maize (OECD-FAO ); the latter exhibits a positive correlation during the last years, suggesting that the majority of the time both maize and wheat prices move together (Musunuru ). .
As concerns speculation, this can be divided in two types: (i) passive speculation associated with commodity index traders (CITs) and (ii) more traditional speculation based on anticipation of future supply and demand shocks in a single market (Adjemian et al. ). The latter has not been accounted for in our model, whilst the former is strictly related to actual supply-and-demand discrepancies (Musunuru ; Lagi et al. ) that are modeled in changing inventories on the monthly bases as a proxy for storage market dynamics (Garcia et al. ; Adjemian et al. ). .
Within the factors that are responsible for volatility of wheat and food prices it emerges that speculation and related policy inaction can be contrasted by the inclusion of detailed information on the climatic conditions foreseen for the major players in the global market (exporters and importers). In fact, a er the food crises in / and / , two major tools for monitoring global agriculture were launched and have been operating to aid food agencies worldwide in responding more e iciently to such shocks, based on the Group of Twenty (G ) Cannes Summit Final Declaration (G ). One is food price monitoring based on government agricultural statistics, as represented by the Agricultural Market Information System (AMIS) (Delincé ). Another is crop condition monitoring using satellite remote sensing, as exemplified by the Global Crop Monitor (GEOGLAM ). The contributions from satellite data and food price statistics in monitoring food insecurity are tremendous (Brown ). However, as the main objective of these tools is monitoring, global yield forecasting based on seasonal climate forecasts represents an independent and complementary source of information to be linked with food market models (Iizumi et al. ). .
Traditional analytic techniques find it di icult to take into account such a variety of events. This work is a first step to take advantage of the computational techniques to handle all these factors. In particular, we aim at building a tool for analyzing the dynamics of cereals prices and traded quantities under alternative economic, environmental and climate conditions. .
In this paper, we have specialized the structure and the dynamics of an existing model for the generic analysis of commodities (the CMS model) to the wheat case. Changes are formulated in accordance with the economic determinants of agricultural productions. Our variant of the original so ware is called the CMS-Wheat simulator. .
The careful model calibration we implement, together with the inclusion of crude oil price allow replication of empirical yearly weighted world price. On the quantity side, we have obtained promising results though further model building is needed.
. The model can be developed and improved in several directions.
. These developments involve either the demand (di erentiating by the utilization of cereals) or the supply side (conversion to biofuels, seasonal to decadal climate e ects, technical levels, policy incentives, etc.). .
In particular, we think climate factors of primary importance in the further development of this work. We plan to develop the model to include climate variability forcing that is acting on wheat yields as a primary exogenous factor. The combination of global scale climatic forcing, e.g. the El Ninõ-Southern Oscillation (ENSO), and local scale climatic characteristics, such as a period of drought, could modulate price dynamics or even produce shocks in the global market with relevant impacts. Iizumi et al. ( ) and Gutierrez ( ) find that large-scale atmospheric dynamics a ect local crop yields. Following this insight, we are presently running linear regressions in order to identify the e ect of the ENSO on wheat yield of the top producers worldwide. Preliminary results are encouraging: on average, we find -significant e ects for each considered country (for a total of significant relationships). All this will improve the modeling of wheat supply.
. Another important factor that will be taken into account is the stock management of cereals that directly a ects international price. Traditionally stock-holding has been a private as well as a public activity. Private operations in this field are linked to the possibility of speculation based on future price expectations. Instead, Government agencies usually adopt a price band to balance supply and demand and to contain price volatility. Management of the stock is strictly connected to the availability, access, utilization, and stability of food. It could represent a policy tool to reduce malnutrition in the poorest countries.

Figure :
Additional determinants of demand and supply to be considered .
All these developments will improve the model performance. It could therefore be used as a tool for producing reliable forecasts of prices and quantities at both global and region/country level. Another important goal of the model is to give recommendations about prevention policies that most reduce the negative e ects of extreme events, emergency measures that imply less sacrifice for the population and measures to reduce the price volatility.
where z runs on all the considered regions is not zero. More precisely, if we compute the world supply in a given year t as Y t = z Y z,t and the world demand as D t = z D z,t we have Y t − D t = −GN I t The unbalance at world level is shown in Figure .  We can now mine the data in order to ensure that world supply equals world demand, i.e GN I = 0 in each period. Starting from Y t − D t + GN I t = 0 we can compute the modified level of supply, sayŶ , as the level which meets FAO demand whereη y t is a percentage deviation. Going back to Figure ,Ŷ now overlaps the demand line. Instead, we can compute the modified level of supply, sayD, as the level which meets FAO supply whereη d t is a percentage deviation. Going back to Figure ,D now overlaps the supply curve. The discussion in the previous section shows that we can modify data in order to achieve a given result. In this case the goal was to obtain GN I t = 0. This also provides a method to go back from FAO balance data to the unknown level of supply and demand. In this case, we choose the goal of replicating the yearly weighted world price. We therefore undertook to find supply and demand percentage deviations that would make the model to achieve the goal better. We will denote these deviations asη y Based on the comparison betweenD z,t and Y z,t we partition regions in two sets: the net international buyers set and its complement. A region belongs to the net international buyers set ifD z,t ≥ Y z,t ∀t. The idea behind this classification is that all the production of a net international buyer is for domestic use. A net international buyer therefore does not have a commodity to be sold to other countries, hence it does not have an international market.
Thus, regions are partitioned into the sets of net international buyers and international suppliers. International suppliers organize international markets where they o er their production Y z,t . Instead, international suppliers direct their demand (D z,t ) to their own or other international markets. Net international buyers direct their net demandD z,t − Y z,t to international markets.
This process allows us to reduce the number of international markets and to si the market maker. The r_reduce_number_of_producers_food.R script transforms the aggregated data reducing the number of producers. The script outputs several files in the data folder. These files are loaded by the code in order to set up the simulation.
It is worth noting that the values ofD z,t are given as input to the model and can be viewed as a country's desired quantities at an average price. The yearly data are then transformed in monthlyd z,t values by the so ware at initialization time. The observed exchanges are in general di erent from those because a buyer will buy a higher (lower) quantity if the price is low (high).