Enhanced Gravity Model of trade: reconciling macroeconomic and network models

Assaf Almog,1 Rhys Bird,2 and Diego Garlaschelli3, 2 1Tel Aviv University, Department of Industrial Engineering, 69978 Tel Aviv, Israel 2Instituut-Lorentz for Theoretical Physics, Leiden University, Niels Bohrweg 2, 2333 CA Leiden, Netherlands 3IMT School for Advanced Studies, Piazza S. Francesco 19, 55100 Lucca, Italy The structure of the International Trade Network (ITN), whose nodes and links represent world countries and their trade relations respectively, affects key economic processes worldwide, includ- ing globalization, economic integration, industrial production, and the propagation of shocks and instabilities. Characterizing the ITN via a simple yet accurate model is an open problem. The traditional Gravity Model (GM) successfully reproduces the volume of trade between connected countries, using macroeconomic properties such as GDP, geographic distance, and possibly other factors. However, it predicts a network with complete or homogeneous topology, thus failing to reproduce the highly heterogeneous structure of the ITN. On the other hand, recent maximum- entropy network models successfully reproduce the complex topology of the ITN, but provide no information about trade volumes. Here we integrate these two currently incompatible approaches via the introduction of an Enhanced Gravity Model (EGM) of trade. The EGM is the simplest model combining the GM with the network approach within a maximum-entropy framework. Via a unified and principled mechanism that is transparent enough to be generalized to any economic network, the EGM provides a new econometric framework wherein trade probabilities and trade volumes can be separately controlled by any combination of dyadic and country-specific macroe- conomic variables. The model successfully reproduces both the global topology and the local link weights of the ITN, parsimoniously reconciling the conflicting approaches. It also indicates that the probability that any two countries trade a certain volume should follow a geometric or with an additional point mass at zero volume.

I. INTRODUCTION of the empirical network structure. Reliable models of the ITN can better inform economic theory, foreign pol- icy, and the assessment of trade risks and instabilities The International Trade Network (ITN) is the complex worldwide. network of trade relationships existing between pairs of countries in the world. The nodes (or vertices) of the ITN represent nations and the edges (or links) represent their (weighted) trade connections. In a global economy extending across national borders, there is increasing in- In this paper, we emphasize that current models of the terest in understanding the mechanisms involved in trade ITN have strong limitations, and that none of them is sat- interactions and how the position of a country within the isfactory, from either a theoretical or a phenomenological ITN may affect its economic growth and integration [1– point of view. We point out equally strong (and largely 5]. Moreover, in the wake of recent financial crises the complementary) problems affecting on one hand tradi- interconnectedness of economies has become a matter of tional macroeconomic models, which focus on the local concern as a source of instability [6]. As the modern ar- weight of the links of the network, and on the other hand chitecture of industrial production extends over multiple more recent network models, which focus on the existence countries via geographically wider supply chains, sudden of links, i.e. on the global topology of the ITN. We then changes in the exports of a country (due e.g. to unpre- introduce a new model of the ITN that preserves all the dictable financial, environmental, technological or even good ingredients of the models proposed so far, while at political circumstances) can rapidly propagate to other the same time improving upon the limitations of each of countries via the ITN. The assessment of the associated them. The model can be easily generalized to any (eco- arXiv:1506.00348v3 [physics.soc-ph] 4 Feb 2019 trade risks requires detailed information about the un- nomic) network and provides an explicit specification of derlying network structure [7]. In general, among the the full that a given pair of coun- possible channels of interaction among countries, trade tries is connected by a certain volume of trade, fixing an plays a major role [2–4]. otherwise arbitrary choice in previous approaches. This The above considerations imply that the empirical distribution is found to be either geometric (for discrete structure of the ITN plays a crucial role in increasingly volumes) or exponential (for continuous volumes), with many economic phenomena of global relevance. It is an additional point mass at zero volume. This feature, therefore becoming more and more important to char- which is different from all previous specifications of in- acterize the ITN via simple but accurate models that ternational trade models, is shown to replicate both the identify both the basic ingredients and the mathematical local trade volumes and the global topology of the em- expressions required to accurately reproduce the details pirical ITN remarkably well. 2

II. PRELIMINARIES: BUILDING BLOCKS OF More complicated variants of Eq. (1) use additional THE MODEL factors (with associated free parameters) either favoring or resisting trade [9, 10]. Like the GDP and geographic Before we fully specify our model, we preliminarily distances, these factors can be either country-specific identify its building blocks by reviewing the strengths (e.g. population) or dyadic (e.g. common currency, trade and weaknesses of the two main modelling frameworks agreements, shared borders, common language, etc.). In adopted so far. general, if we collectively denote with ~ni the vector of all node-specific factors and with D~ ij the vector of all dyad- specific factors used (note that these vectors may have A. Gravity models of trade different dimensionality), Eq. (1) can be generalized to

w = F (~n , ~n , D~ ) F > 0, (2) We start by discussing traditional macroeconomic h iji φ~ i j ij models of international trade. These models have mainly ~ focused on the volume (i.e. the value e.g. in dollars) of where the functional form of Fφ~ (~ni, ~nj, Dij) need not be trade between countries, largely because the economic of the same type as in Eq. (1), and φ~ is a vector containing literature perceives trade volumes as being a priori more all the free parameters of the model (like c, α, β, γ for the informative than the topology of the ITN: the striking particular case above). Indeed, although in this paper we heterogeneity of trade volumes observed between differ- focus on the GM applied to the international trade net- ent pairs of countries is clearly not captured by a purely work, our discussion equally applies to many other mod- ‘binary’ description where all connections are effectively els of (socio-economic) networks as well. For instance, given the same weight. Based on this argument, empha- the recently proposed Radiation Model (RM) [11] is also sis has been put on explaining the (expected) volume of described by Eq. (2), where ~ni and D~ ij include certain trade between two countries, given certain dyadic and geographical and demographical variables. Our following country-specific macroeconomic properties. 1 discussion applies to both the GM and the RM, as well as Jan Tinbergen, the physics-educated Dutch any other model described by Eq. (2). Similarly, it does economist who was awarded the first Nobel memo- not only apply to trade networks, since both the GM and rial prize in economics, introduced the so-called Gravity the RM have been successfully applied to other systems Model (GM) of trade [8]. The GM aims at inferring the as well, including mobility and traffic flows [11–14], com- volume of trade from the knowledge of Gross Domestic munication networks [15], and migration patterns [16] Product, mutual geographic distance, and possibly addi- (the latter representing - to our knowledge - the earliest tional dyadic factors of macroeconomic relevance [9, 10]. application of the GM to a socio-economic system, dating In one of its simplest forms, the GM predicts that, if i back to 1889 [17]). and j label two different countries (i, j = 1,...,N where It is generally accepted that the expected trade vol- N is the total number of countries in the world), then umes postulated by the GM, already in its simplest form the expected volume of trade from i to j is given by Eq. (1), are in good agreement with the ob- α β γ served flows between trading countries. To illustrate this w = c GDP GDP R− c, α, β, γ > 0, (1) h iji i j ij result, in Fig.1 we show a typical log-log plot comparing where GDPk is the Gross Domestic Product of country k, the empirical volume of the realized (bilateral) interna- Rij is the geographic distance between countries i and j, tional trade flows with the corresponding expected val- and c, α, β, γ are free global parameters to be estimated. ues calculated under the GM as defined in Eq. (1) (with In the above directed specification of the GM, the flows parameters calculated as reported in TableI). The fig- wij and wji can be different. An analogous undirected ure shows the typical qualitative consistency between the specification exists, where the volumes of trade from i to GM and the empirical non-zero trade volumes. However, j and from j to i are added together into a single value it should be noted that, while Eqs. (1) and (2) define wij = wji of bilateral trade. In the latter case, Eq. (1) the expected value of wij, the full probability distribu- still holds but with the symmetric choice α = β. With tion from which this expected value is calculated is not this in mind, we will keep our discussion entirely general specified, and actually depends on how the model is im- throughout the paper and, unless otherwise specified, al- plemented in practice. In the GM case, the distribution is low all quantities to be interpreted either as directed or chosen to be either Gaussian (corresponding to additive as undirected. Only in our final empirical analysis we noise, in which case the expected weights can be fitted to will adopt an undirected description for simplicity. the observed ones via a simple linear regression [18, 19]), log-normal (corresponding to multiplicative noise and re- quiring a linear regression of log-transformed weights [20] as we did to produce Fig.1 and TableI), Poisson [20], or 1 Jan Tinbergen studied physics in Leiden, where he carried out a PhD under the supervision of the theoretical physicist Paul more sophisticated [21] (see [22] for a review). The ar- Ehrenfest. Tinbergen defended his thesis in 1929, and then be- bitrariness of the weight distribution already highlights came a leading economist. He was awarded the first Nobel memo- a fundamental weakness of the traditional formulation of rial prize in economics in 1969. the model. Moreover, for both additive and multiplica- 3

106 106 1970 1980 1970 1980 104 104 w w w w

102 102

100 100 10−5 100 105 1010 10−2 100 102 104 106 w〈 w 〉 w〈 w 〉

6 h i 6 h i 10 10 1990 2000 1990 2000

104 104 w w w w 102 102

100 100 10−2 100 102 104 106 10−5 100 105 1010 w〈 w 〉 w〈 w 〉 h i h i FIG. 1. Empirical non-zero trade flows vs. the corresponding expectation under the traditional Gravity Model. Log-log plot comparing the empirical volume (y-axis) of all non-zero bilateral trade flows in the ITN with the corresponding expected volume (x-axis) predicted by the Gravity Model defined in Eq. (1), with parameters estimated as reported in TableI. Top left: year 1970, top right: year 1980, bottom left: year 1990, bottom right: year 2000. The black line is the identity line corresponding to the ideal, perfect match that would be achieved if the empirical weights were exactly equal to their expected values, i.e. in complete absence of randomness. tive Gaussian noise, the model can produce undesired that the GM can be fitted only to the non-zero weights, negative values. i.e. the volumes existing between pairs of connected A related but more fundamental limitation of the GM countries. If used in this way, the model effectively dis- is that, at least in its simplest and most natural imple- regards the empirical structure of the network, both as mentations, it cannot generate zero volumes – thereby input (thus making predictions on the basis of incom- predicting a fully connected network [22–24]. This means plete data) and as output (thus failing to reproduce the topology). Operatively, the GM can be used only after the presence of a trade link has been established inde- Traditional Gravity Model pendently [22]. As observed in [21], “Omitting zero-flow observations implies that we loose information on the Year c α, β γ causes of (very) low trade”, because any fit to positive- 1970 9.9 · 108 0.91 0.81 9 only flows would significanlty underestimate the effects of 1980 3.1 · 10 0.83 0.89 factors that diminish trade. This problem is particularly 1990 1.5 · 1010 0.97 0.93 10 critical since roughly half of the possible links are found 2000 4.3 · 10 1.05 0.93 not to be realized in the real ITN [25–28]. Clearly, the TABLE I. Parameter values for the traditional Gravity Model same problem holds for the RM and any more general used in Fig.1 and calculated by fitting Eq. (1) (with the model of the form specified in Eq. (2). symmetry constraint α ≡ β) to all non-zero empirical bilateral While there are variants and extensions of the GM trade flows via an Ordinary Least Square (OLS) regression of that do generate zero weights and a realistic link density log-transformed weights. (e.g. the so-called Poisson pseudo-maximum likelihood 4 models [20] and ‘zero-inflated’ gravity models [21]), these informative than the knowledge of the corresponding variants systematically fail in reproducing the observed weighted properties (e.g. node strengths). Indeed, while topology [10, 22]. In other words, while these models can the binary network reconstructed only from the knowl- generate the correct number of connections, they tend to edge of the degrees of all countries is found to be topolog- put many of the latter in the ‘wrong place’ in the network. ically very similar to the real ITN, the weighted network Indeed, even in its generalized forms, the GM predicts a reconstructed only from the strengths of all countries is largely homogeneous network structure, while the empir- found to be much denser and very different from the real ical topology of the ITN is much more heterogeneous and network [26–28]. This is somewhat surprising, given that complex [22, 23]. Established empirical signatures of this the economic literature largely postulates that weighted heterogeneity include a broad distribution of the degree properties are per se more informative than the corre- (number of connections) and the strength (total trade sponding binary ones. volume) of countries [25–35], the rich-club phenomenon The solution to this apparent paradox lies in the fact (whereby well-connected countries are also connected to that, while the knowledge of the entire weighted network each other) [36, 37], strong clustering and (dis)assortative is necessarily more informative than that of its binary patterns [26, 27]. These highly skewed structural proper- projection (in accordance with economic postulates), the ties are remarkably stable over time. However, their are knowledge of certain marginal properties of the weighted not replicated by any current version of the GM [22]. network can be unexpectedly less informative than the knowledge of the corresponding marginal properties of the binary network. In fact, it turns out that if the de- B. Network models of trade grees of countries are (not) specified in addition to the strengths of countries, the resulting maximum-entropy As we mentioned at the beginning, many processes of model can(not) reproduce the empirical weighted net- great economic relevance crucially depend on the large- work of international trade satisfactorily [27, 40, 41]. scale topology of the ITN. In light of this result, the An important take-home message is that, in contrast sharp contrast between the observed topological com- with the mainstream literature, models of the ITN should plexity of the ITN and the homogeneity of the network aim at reproducing not only the strength of countries (as structure generated by the GM (including its extensions) the GM automatically does by approximately reproduc- calls for major improvements in the modelling approach. ing all non-zero weights), but also their degree (i.e. the In particular, in assessing the performance of a model number of trade partners) [26–28, 41]. In addition to of the ITN, emphasis should be put on how reliably the these studies, an alternative approach, the Linear Grav- (global) empirical network structure, besides the (local) ity Transportation Model (LGTM), has also demostrated volume of trade, is replicated. In the network science the importance of the ITN topology [46]. In this model literature, successful models of the ITN have been de- the monetary flow is balanced for each country (node) rived from the Maximum Entropy Principle [24–28, 38– based on the number of trade partners (degree). The 44]. These models construct ensembles of random net- model produces expectations of the GDP of countries works that have some desired topological property (taken that are consistent with real data, using both the volume as input from empirical data) and are maximally random of trade flows and the topology of ITN as input. These otherwise. Typically, the constrained properties are cho- studies indicate that, in order to devise improved mod- sen to be the degrees and/or the strenghts of all nodes. In els of the ITN, one should include the degrees, which this way the models can perfectly replicate the observed are purely topological properties, among the main tar- strong heterogeneity of these purely local properties, and get quantities to replicate. This is the guideline we will at the same time illustrate its immediate (i.e. prior to follow in this paper. invoking any other more complicated network formation Unlike the GM, maximum-entropy models of trade are mechanism) structural effects on any higher-order topo- a priori non-explanatory, i.e. they take as input struc- logical property of the network. In the different con- tural properties (as opposed to explanatory economic fac- text of financial networks, where the main challenge is tors) to explain other structural properties. However, a reliable inference of the unobserved topology of a net- they can in fact be used to select a posteriori an explicit, work (typically of interconnected firms or banks) starting empirically validated functional dependence of the struc- from partial, node-aggregate information [45], maximum- ture of the ITN on underlying explanatory factors. For entropy models have recently turned out to deliver the models with country-specific constraints, this operation best-performing reconstruction methods so far [43–45]. can be carried out as follows. Mathematically, controlling In general, different choices of the constrained proper- for node-specific properties is realized by assigning one or ties lead to different degrees of agreement between the more Lagrange multipliers, also known as ‘hidden vari- model and the data. This can generate intriguing and ables’ or ‘fitness parameters’ ~xi, to each node. If a certain counter-intuitive insight about the structure of the ITN. choice of local constraints is found to replicate the higher- For instance, contrary to what naive economic reasoning order properties of the real-world network satisfactorily, would predict, it turns out that the knowledge of purely then one can look for an empirical relationship between binary local properties (e.g. node degrees) can be more the values of the associated hidden variables and those of 5 candidate non-topological, country-specific factors of the ondly, even if the structure of the ITN can be repli- type ~ni, like the GDP or total import/export. If the hid- cated satisfactorily in terms of the ‘GDP-only’ model de- den variables are indeed (at least approximately) found fined in Eq. (3)[25, 30, 32], recent analyses have found to be functions of some country-specific factors (i.e. if evidence that certain metric (although not necessarily 2 ~xi f~(~ni)), then one can replace ~xi with f~(~ni) in the geographic ) distances do also play a role in determin- maximum-entropy≈ model, thus reformulating the latter ing the topology of the ITN [47]. Together, these two as a model with explanatory variables (i.e. ‘regressors’) pieces of evidence call for an inclusion of dyadic factors of trade, precisely like the GM. Already in one of the ear- in wij and pij, and highlight a limitation of current h i liest studies on the ITN topology [30], the approach out- maximum-entropy models based only on country-specific lined above led to the definition of a GDP-driven model constraints. for the binary structure of the network, where ~x GDP Combining all the above considerations, it is clear that i ∝ i (i.e., in this case ~xi is taken to be one-dimensional). The an improved model of the ITN should aim at retaining model, which is a reformulation of a maximum-entropy the realistic trade volumes postulated by models based on model for binary networks with given degrees, predicts Eq. (2) (including the GM, the RM, and possibly many that the probability of a trade connection existing from more), while combining them with a realistic network country i to country j is topology generated by (extensions of) maximum-entropy models. Such a model should also aim at providing the δ GDPi GDPj full probability distribution, and not only the expected pij = δ > 0, (3) 1 + δ GDPi GDPj values as in Eq. (1), of trade flows and, unlike the GDP- only model in Eq. (3)[25] or its current weighted ex- where δ is a free parameter that allows to reproduce the tension [42], allow for the inclusion of both dyadic and empirical link density. The model has been tested suc- node-specific macroeconomic factors. cessfully in multiple ways [24, 25, 30, 32, 38]. The GM in Eq. (1) and the maximum-entropy model in Eq. (3) have complementary strengths and weaknesses, III. THE ENHANCED GRAVITY MODEL OF the former being a good model for non-zero volumes INTERNATIONAL TRADE (while being a bad model for the topology) and the lat- ter being a good model for the topology (while providing In this Section, we introduce what we call the En- no information about trade volumes). An attempt to hanced Gravity Model (EGM) of trade. The EGM math- reconcile these two complementary and currently incom- ematically formalizes the two ingredients that, in the patible approaches has been recently proposed via the light of the previous discussion, any ‘good’ model of eco- definition of an extension of the maximum-entropy model nomic networks should feature: namely, realistic (trade) to the case of weighted networks [42]. Since, as we men- volumes and a realistic topology, both controllable by tioned, a maximum-entropy model of weighted networks macroeconomic factors. with given strengths and degrees [40] can correctly repli- cate many structural properties of the ITN [41], it makes sense to reformulate such model as an economically in- A. A single model for topology and weights spired model of the ITN. Indeed, like in the binary case, the hidden variables enforcing the constraints are found to be strongly correlated with the GDP, thus allowing to The first lesson we have learnt is that Eq. (2) is success- ful in reproducing link weights only after the existence express both pij and wij as functions of the GDP [42]. The resulting modelh is confirmedi to be in good accor- of the links themselves has been preliminarly established. dance with both the topology and the volumes observed This implies that Eq. (2), as a model of real-world trade in the real ITN. flows, is actually unsatisfactory and should rather be re- conditional expectation Unfortunately, in the above approach the choice of formulated as a of the weight wij, country-specific constraints (degrees and strengths) only given that wij > 0. In other words, if aij denotes the en- A W allows for regressors that have a corresponding country- try of the adjacency matrix = Θ( ) of the ITN (de- specific nature. This makes the model in Ref. [42] in- fined via the step function as aij = Θ(wij), i.e. aij = 1 compatible with the inclusion of dyadic variables of the type D~ and represents a strong limitation for (at least) ij 2 Building on the hypothesis of the existence of underlying hid- two reasons. Firstly, one of the main lessons learnt from den metric spaces in which real-world networks are embedded, the traditional GM is that the addition of geographic Ref. [47] models the ITN by looking for an optimal embedding of distances improves the fit to the empirical volumes sig- countries in some abstract metric space. The resulting inferred nificantly. Indeed, in the light of the large body of knowl- distances are interpreted as incorporating all possible sources of edge accumulated in the international economics litera- empirically revealed trade costs, possibly including geographic distances as well. However, since the postulated embedding space ture, it is hard to imagine a realistic and economically is either a unidimensional circle or a hyperbolic plane, these dis- meaningful model of international trade that does not tances are necessarily different from the usual geographic dis- allow for simple pair-wise quantities controlling for trade tances Rij appearing in the GM and measured as geodesics on costs and incentives, including geography [9, 10]. Sec- our spherical tridimensional world. 6 if wij > 0 and aij = 0 if wij = 0), an improved model on a single pair i, j of nodes and integrating out all other should be such that Eq. (2) is replaced by pairs, we can define the dyadic distribution qij(w) indi- cating the probability (mass or density) that wij takes w a = 1 = F (~n , ~n , D~ ) F > 0, (4) the particular value w. Note that the event wij > 0 in- h ij| ij i φ~ i j ij dicates the presence of a trade link (i.e. aij = 1). By where w a = 1 is the conditional expected weight contrast, the event wij = 0 indicates the absence of a h ij| ij i of the trade link from country i to country j, given trade link (i.e. aij = 0) but is also included as a pos- that such link exists. This operation ensures that, what- sible outcome in qij(w). The normalization condition P ever the new model looks like, its predictions for the ex- is therefore w 0 qij(w) = 1 (for integer weights) or R ≥ pected trade volume between connected pairs of coun- w 0 dw qij(w) = 1 (for continuous weights, in which ≥ tries remain identical to the ones proposed in more tra- case we anticipate that qij(w) will have a delta-like point ditional macroeconomic models. For instance, choosing mass at w = 0) for all i, j. Note that we are not as- ~ α β γ Fφ~ (~ni, ~nj, Dij) = c GDPi GDPj Rij− as in Eq. (1) al- suming independence of the trade volumes wij and wkl lows us to retain (in almost intact form) all the empirical between two distinct country pairs, or equivalently the Q knowledge that has accumulated in the econometrics lit- factorization of P (W) into the product i,j qij(wij) of erature since Jan Tinbergen’s introduction of the GM. dyadic probabilities. However, we will later find that An important difference, however, is that in our model the desired model has precisely this independence prop- the trade volumes will be drawn from a different proba- erty. Importantly, unlike in the traditional GM, in our bility distribution. approach dyadic independence is a consequence and not The second lesson we have learnt is that, in analogy a postulate. with Eq. (4), Eq. (3) should be generalized to allow for We now look for the form of qij(w) that enforces both Eqs. (4) and (5). Let us consider the latter first. In both dyadic (D~ ij) and node-specific (~ni) factors as fol- lows: terms of qij(w), the probability pij that i and j are con- nected (irrespective of the volume of trade) is given by ~ the complement of the probability q (0) that they are Gψ~ (~ni, ~nj, Dij) ij pij = aij = G > 0, (5) not connected, i.e. h i 1 + G ~ (~ni, ~nj, D~ ij) ψ  P w>0 qij(w) (integer) where a crucial requirement is that G can in general be pij = 1 qij(0) = R (6) − w>0 qij(w) dw (real) different from F in Eq. (4) and, correspondingly, the vector ψ~ of parameters can be different from φ~. Note where, for real-valued weights, qij(0) denotes the point that, since pij is monotonic in G, the above expression mass, i.e. the magnitude of the delta-like probability is entirely general, i.e. we have put no restriction on the density function qij(w), at w = 0. Imposing that Eq. (6) functional form of pij. It is also worth noticing that the has the form dictated by Eq. (5) leads to the following explanatory factors used in Eqs. (4) and (5) need not co- unique choice for qij(0): incide. However, to avoid using different symbols for the 1 arguments of the two functions, we adopt the conven- qij(0) = G > 0. (7) 1 + G (~n , ~n , D~ ) tion that D~ ij and ~ni denote the sets of all factors used ψ~ i j ij as arguments of either F or G, and that these functions can have flat (i.e. no) dependence on some of their argu- We now relate qij(w) to Eq. (4) in a similar manner. ments. For instance, Eq. (5) reduces to Eq. (3) by setting The expected trade volume, irrespective of whether a link exists, is ~ni = GDPi and assuming flat dependence on D~ ij, or it reduces to the hyperbolic model in Ref. [47] by setting  P w q (w) (integer) w w>0 ij (8) D~ ij equal to the hyperbolic distance and assuming flat ij R h i ≡ w>0 w qij(w) dw (real) dependence on ~ni. We want our model to produce both Eq. (4) as the (note that the event w = 0 does not contribute to the desired (gravity-like) conditional expectation for link above quantity). On the other hand the conditional prob- weights and Eq. (5) as a realistic expected topology. ability that wij equals w, given that the link is realized To do so, we introduce the full probability P (W) that (w > 0), is the model produces a weighted network specified by the ( qij (w) N N matrix W with entries (wij). We are free to choose p w > 0 × qij(w aij = 1) = ij (9) whether wij takes non-negative integer values (in which | 0 w = 0 case P (W) is a multivariate Probability Mass Function, or PMF) or non-negative real values (in which case P (W) and its expected value gives the conditional expectation is a multivariate Probability Density Function, or PDF). of the link weight, given that the link exists: The distribution P (W) is the key quantity that fully specifies the model and determines both the topology wij wij aij = 1 = h i. (10) and the link weights of the ITN. From P (W), focusing h | i pij 7

Setting Eq. (10) equal to Eq. (4) leads to (where the sum extends over all weighted graphs with N nodes, non-negative integer link weights, and such ~ ~ that wii = 0 for all i) subject to the constraints spec- Fφ~ (~ni, ~nj, Dij) Gψ~ (~ni, ~nj, Dij) wij = F, G > 0. ified by Eqs. (7) and (11). Since Eq. (7) is equivalent to h i 1 + G ~(~ni, ~nj, D~ ij) ψ Eq. (5), we select aij and wij (for all pairs i = j) as (11) the two sets of constraintsh i specifyingh i our model.6 In this Equation (11) carries an important message. It reveals way, if we introduce αij and βij as the (real-valued) La- that, while a superficial inspection of Eq. (8) might sug- grange multipliers required to enforce the expected value gest that the expected trade volume wij is independent of a = Θ(w ) and w respectively (where Θ(x) = 1 h i ij ij ij of the topology of the ITN, i.e. on qij(0) or equivalently if x > 0 and Θ(x) = 0 otherwise), then the maximum- G, this is actually not the case. In fact, qij(0) is cou- entropy problem becomes equivalent to one solved ex- pled to the other values qij(w) (with w > 0) through the actly in Ref. [48]. There, it was shown that upon intro- normalization condition manifest in Eq. (6). This neces- ducing the so-called Hamiltonian sarily implies that the topology of the ITN must have an X   immediate effect on the expected volume of trade between H(W) = αijΘ(wij) + βijwij , (13) any two countries. This effect is rigorously quantified in i,j Eq. (11), which shows that wij depends on both F and G. This result confirms theh inconsistencyi of the tradi- (representing a linear combination of the quantities tional GM defined in terms of Eq. (1) and of any of its whose expected value is being constrained) and the par- P H(W) extensions of the form given by Eq. (2). By contrast, the tition function Z = W e− , the maximum-entropy expected topology of the ITN is independent of the ex- probability P ∗(W) with constraints a and w is h iji h iji pected volumes of trade, since pij depends on G but not found to be on F . This simple but, to the best of our knowledge, pre- H(W) viously unrecognized result highlights a nontrivial asym- e− Y P ∗(W) = = q∗ (w ), (14) metry between weights and topology in the ITN and, by Z ij ij i,j extension, in any (economic) network described by our generic expressions involving F and G. This basic find- αij βij where, given xij e− (0, + ) and yij e− ing provides a natural explanation for the aforementioned (0, 1), ≡ ∈ ∞ ≡ ∈ empirical observation that the topology of the ITN and several other networks can be satisfactorily reconstructed Θ(w) w xij yij (1 yij) from aggregate local constraints [26, 40], while the same q∗ (w) − , w 0 (15) ij ≡ 1 y + x y ≥ result does not hold for the weighted structure of the − ij ij ij same network(s) [27, 28], unless topological information is explicitly included as an additional constraint [40, 41]. is the resulting (maximum-entropy) probability that the link from node i to node j carries a weight w. This prob- ability is called the Bose-Fermi distribution, as it unifies the Bose-Einstein and Fermi-Dirac distributions encoun- B. Maximum entropy construction tered in quantum statistical physics [48]. We stress again that all our formulas apply to both directed and undi- Equations (7) and (11) fix two important properties rected representations of the network and, correspond- we require for qij(w) and ultimately P (W), but they ingly, the sums and products over i, j should be inter- do not specify these probability distributions uniquely. preted as i = j in the directed case (where the pairs i, j To do so, we invoke the Maximum-Entropy Principle to and j, i are6 different) and as i < j in the undirected one ensure that the functional form of P (W) is maximally (where the pair i, j is the same as the pair j, i). As we random, given the desired constraints. As well known, had anticipated, the factorization of P ∗(W) in terms of this procedure is guaranteed to lead to the least biased products of qij∗ (w) shows that, for this particular choice inference, i.e. to introduce no unjustified ‘hidden’ as- of the constraints, pairs of nodes turn out to be statisti- sumption in picking a specific form of P (W)[43, 44]. cally independent as in the standard GM approach, even In applying this method we will focus primarily on the if we have not assumed this independence as a postulate case of integer-valued link weights, since this requirement in our approach. matches the datasets in our analysis. The case of real- Importantly, while the constraints used in the valued link weights is treated in the Appendix and the maximum-entropy models of the ITN considered so far corresponding key results are briefly reported at the end in the literature are observed topological properties (e.g. of this Section. the degrees and/or the strengths of nodes), the con- We look for the form of P (W) that maximizes the straints considered here are economically-driven expec- entropy functional tations, namely Eqs. (5) and (11). This key step allows us to reconcile macroeconomic and network approaches X S[P ] = P (W) ln P (W) (12) within a generalized framework, and represents an im- − W portant difference with respect to previous models. In 8 particular, we use Eqs. (6), (8) and (10) to express pij, as wij and wij aij = 1 in terms of xij and yij [48]: a∗ w∗ a∗ h i h | i  ij  ij − ij X Gψ~ Fφ~ 1 xijyij ~ ~ − (φ, ψ) = ln P ∗(W∗) = ln w∗ pij = 1 qij∗ (0) = , (16) L   ij − 1 y + x y i,j 1 + G ~ F~ − ij ij ij ψ φ X pij w = w q∗ (w) = , (17) h iji ij 1 y (where we have dropped the dependence of F and G on w>0 − ij ~ni, ~nj, D~ ij) and look for the parameter values φ~∗, ψ~∗ that wij 1 wij aij = 1 = h i = . (18) maximize (φ,~ ψ~) by requiring that all the first deriva- h | i p 1 y L ij − ij tives with respect to φ~ and ψ~ vanish simultaneously: The above expressions allow us to rewrite Eq. (15) as " # X wij∗ aij∗ wij∗ ~ (φ,~ ψ~) = − ~ F = ~0 (23)  1 p w = 0, ∇φ~ L F 1 − F ∇φ~ φ~ ij i,j φ~ φ~ qij∗ (w) = − w 1 (19) − pij yij− (1 yij) w > 0. " # − X aij∗ 1 ~ (φ,~ ψ~) = ~ G = ~0. (24) ∇ψ~ L G − 1 + G ∇ψ~ ψ~ Now, equating Eq. (16) to Eq. (5) and Eq. (17) to i,j ψ~ ψ~ Eq. (11) (or, equivalently, Eq. (18) to Eq. (4)) allows us to find the values of xij and yij solving the original For probability distributions belonging to the exponen- problem: tial family, i.e. in the form given by Eq. (14) like the one we are considering, the second derivatives of the log- ~ Gψ~ (~ni, ~nj, Dij) likelihood coincide with (minus) the covariances between xij = , (20) F (~n , ~n , D~ ) 1 the constraints included in the Hamiltonian defined in φ~ i j ij − Eq. (13) (see for instance [49, 50]). Since covariance F~ (~ni, ~nj, D~ ij) 1 matrices are positive-semidefinite (and actually positive- y = φ − . (21) ij ~ definite if the chosen constraints are linearly indepen- Fφ~ (~ni, ~nj, Dij) dent, i.e. non-redundant), (φ~∗, ψ~∗) is indeed a (global, L ~ ~ Inserting Eqs. (20) and (21) into Eq. (19), we finally get in the positive-definite case) maximum for (φ, ψ), en- ~ ~ L the explicit probability qij∗ (w) of any two countries trad- suring that the solution (φ∗, ψ∗) to Eqs. (23) and (24) ing a volume w, as a function of any choice of the fac- yields the optimal parameter values in our model. Se- tors ~ni and D~ ij. In terms of conditional probabilities, lecting these values into Eqs. (20) and (21) yields the the model becomes extremely simple: establishing a link values xij∗ and yij∗ that, when inserted into Eq. (15), fully from country i to country j is a Bernoulli trial with suc- specify the model. cess probability pij given by Eq. (5); if realized, this link The above expressions, which are valid for any spec- acquires a weight w with probability ification of the EGM, show that the estimation of the parameter φ~ nicely separates from that of ψ~. This re-   0 w = 0, sult solves, in a single step, two major problems encoun- ~ w−1 q∗ (w a = 1) = F~ (~ni,~nj ,Dij ) 1 (22) tered in previous econometric approaches: on one hand, ij ij [ φ − ] | ~ w w > 0,  [Fφ~ (~ni,~nj ,Dij )] in most alternative models the estimation of the param- eters determining the expected weights is badly affected which is a representing the chance by the presence of the zeroes; on the other hand, the of w 1 consecutive successes, each with probability yij, expected number of zeroes may paradoxically depend on followed− by a failure with probability 1 y . The above the (arbitrary) units of measure for the weights. For − ij result provides an insightful interpretation of the real- instance, if qij(w) is a as in zero- ized volumes in the model in terms of processes of link inflated GMs [20–22], then its only parameter (the mean) establishment and link reinforcement (see Discussion). determines both the magnitude of link weights and the connection probability pij. As the monetary units in the data are changed arbitrarily (e.g. from dollars to thou- C. Maximum-Likelihood parameter estimation sands of dollars), so will the estimated mean and the resulting expected number of zeroes. By contrast, in our ~ ~ We now take an econometric perspective and discuss model the monetary units affect φ∗ but not ψ∗ (hence F how the model parameters can be chosen to optimally as they should, but not G). fit a specific empirical instance of the network. To this end, we use the Maximum Likelihood (ML) principle ap- D. Real-valued trade flows plied to network models [38]. If W∗ denotes the weight matrix (with entries wij∗ ) of the empirical network, our model generates this particular matrix with probability The above results can be adapted in a straightfor- P ∗(W∗). We therefore define the log-likelihood function ward, although more technical, fashion to the case when 9 link weights are assumed to take non-negative real val- equal to the total trade in either direction) to facilitate ues. The entire derivation is reported the Appendix. For the definition of the topological properties characteriz- brevity, here we only report the main results. ing the ITN. Previous work has shown that, given the In the real-valued case, P ∗(W) is a multivariate PDF highly symmetric structure of the ITN, the undirected (rather than a PMF) and we look for its form by maxi- representation retains all the basic properties of the net- mizing a modified version of the entropy functional S[P ], work [26, 27, 30]. under the same constraints on aij and wij (for all ~ We choose Fφ~(~ni, ~nj, Dij) in such a way that the ex- pairs i = j) used above andh stilli givenh byi Eqs. (5) 6 pected non-zero trade flow wij aij = 1 is the same as and (11). The result is again of the factorized form given in the GM defined by Eq. (1h) (now| interpretedi as a con- by Eq. (14), where the Hamiltonian H(W) is still the ditional expectation). This means choosing ~ni = GDPi, one defined in Eq. (14) while the partition function Z is D~ ij = Rij, φ~ = (c, α, γ) and different and the resulting expression for qij∗ (w) is α γ ~ ~ w/F~ (~ni,~nj ,Dij ) F~ (~ni, ~nj, Dij) = c (GDPi GDPj) Rij− , (27) e− φ φ qij∗ (w) = δ(w)(1 pij)+Θ(w)pij , (25) − F (~n , ~n , D~ ) where we have set β α due to undirectedness. Simi- φ~ i j ij ≡ larly, we choose G (~n , ~n , D~ ) in such a way that the where δ(w) is the and p is still ψ~ i j ij ij probability p is the same as in the model defined in given by Eq. (5). ij Eq. (3), i.e. ψ~ = δ and The above expression shows that qij∗ (w) has now a point mass of magnitude q (0) = 1 p at w = 0, ij∗ ij G (~n , ~n , D~ ) = δ GDP GDP . (28) followed by a purely exponential probability− density for ψ~ i j ij i j w > 0. By design, the above PDF still produces the de- With the above specification, the expected topology does sired conditional expected trade volume w a = 1 , ij ij not depend on any dyadic factor. This is the simplest connection probability p and unconditionalh | expectedi ij choice that is found to reproduce the topology of the ITN trade volume w given by Eqs. (4), (5) and (11) re- ij very well [25, 30, 32, 38] and is supported by empirical spectively. Establishingh i a link from country i to country evidence that dyadic factors like geographic distances [51] j is still a Bernoulli trial with success probability p given ij and trade agreements [47] have a much weaker effect on by Eq. (5); if realized, this link acquires a weight w with the purely binary topology of the ITN than on trade vol- conditional probability density umes. Of course our formalism has been designed in such  0 w = 0, a way that we can immediately add dyadic factors, and  ~ −w/F (~ni,~nj ,Dij ) qij∗ (w aij = 1) = e φ~ (26) is therefore much more general. For instance, we might | ~ w > 0,  Fφ~ (~ni,~nj ,Dij ) easily add ‘hidden’ metric distances inferred via an opti- mal geometric embedding [47] (although they would not which is now a purely exponential distribution with the be identifiable with some empirically measurable, ‘exter- ~ desired (conditional) mean Fφ~ (~ni, ~nj, Dij). nal’ macroeconomic factors like those used elsewhere in The estimation of the parameters φ~ and ψ~ can be car- our model). ried out using the ML principle, via a straightforward Given the above model specification, for a given in- recalculation of the log-likelihood (φ,~ ψ~) = ln P ∗(W∗) stance W∗ of the empirical network we find the opti- L and a corresponding adaptation of Eqs. (23) and (24). mal parameter values c∗, α∗, γ∗ and δ∗ through the ML conditions given by Eqs. (23) and (24). Importantly, Eq. (24) reads in this case ∂ /∂δ = 0 and yields a L IV. EMPIRICAL ANALYSIS value δ∗ that ensures that the expected number of links P P i,j pij = i,j Gψ~/(1 + Gψ~) is exactly equal to the em- P We can finally test the predictions of our model against pirical number L∗ = i,j aij∗ , irrespective of the volumes empirical international trade data. The datasets are de- of trade. This result, which is equivalent to what is found scribed in the Appendix. Here, it suffices to report that for the purely binary model defined by Eq. (3)[38], shows trade volumes are reported in U.S. dollars and are there- that, unlike the standard GM, our model always gener- fore integer-valued. For this reason, throughout our anal- ates the correct number of links and, unlike some more ysis we will adopt the formulas we obtained assuming complicated variants of the GM, it does so independently integer weights. Clearly, the same analysis can be easily of the monetary units chosen for the volumes. repeated for real-valued volumes by using the correspond- ing formulas we have provided for real weights. B. Testing the model against real data

A. Model specification We first test the performance of the EGM in repli- cating the empirical trade volumes, i.e. the purely local We adopt an undirected network description (where (dyadic) structure of the ITN. In Fig.2, superimposed the connection between two countries carries a weight to the previous results for the standard GM given by 10

106 106 19701970 1980 105 105

104 104

w 103 w 103 w w

102 102

101 101

100 100 10-4 10-2 100 102 104 106 10-2 100 102 104 106 w w w w h ⟨ i⟩ h ⟨ i⟩ 106 106

1990 2000

105 1990 105 2000

104 104

w 103 w 103 w w

102 102

101 101

100 100 10-2 100 102 104 106 10-2 100 102 104 106 w w w⟨ ⟩ w⟨ ⟩ h i h i FIG. 2. Empirical non-zero trade flows vs. the corresponding expectations under the traditional Gravity Model and the Enhanced Gravity Model. Log-log plot comparing the empirical volume (y-axis) of all non-zero bilateral trade flows in the ITN with the corresponding (conditional) expected volume (x-axis) predicted by the Gravity Model defined in Eq. (1) (green, parameters estimated as reported in TableI) and by the Enhanced Gravity Model defined in Eqs. (4) and (27) (blue, parameters estimated as reported in TableII). Top left: year 1970, top right: year 1980, bottom left: year 1990, bottom right: year 2000. The black line is the identity line corresponding to the ideal, perfect match that would be achieved if the empirical weights were exactly equal to their (conditional) expected values, i.e. in complete absence of randomness.

Eq. (1) and already shown in Fig.1, the empirical non- in TableI for the GM, we see that the GM yields system- zero link weights wij∗ are also compared with their condi- atically larger parameter values (especially so for α, β). tional expected value wij aij = 1 under the EGM given This means that, with respect to the EGM, the GM over- by Eq. (27). As mentionedh | above,i for the EGM the pa- estimates the effects of both GDP and geographic dis- rameters are obtained via the ML principle as prescribed tance, and this is especially true for the GDP. This is due by Eq. (23) and their resulting values are reported in Ta- to the fact that the EGM is used to explain not only the bleII. As expected, the sets of points generated by the two models largely overlap, confirming that, in terms of trade volumes, the EGM cannot do worse than the GM. Enhanced Gravity Model Moreover, the EGM turns out to be more parsimonious Year δ c α, β γ than the GM as it achieves a narrower scatter of points 1970 4.7 · 105 1.0 · 108 0.67 0.78 while having no dedicated free parameter to tune the 1980 1.1 · 106 9.3 · 108 0.77 0.75 variance (as already mentioned, the GM usually assumes 1990 1.4 · 106 5.4 · 109 0.87 0.86 that each trade volume is drawn from a certain proba- 2000 3.3 · 106 1.7 · 1010 0.91 0.90 bility distribution, typically a normal or log-normal one, with mean value given by Eq. (1) and variance specified TABLE II. Parameter values for the Enhanced Gravity Model by an additional free parameter). calculated by considering integer link weights (equal to inte- Importantly, comparing the values of the parameters ger multiples of the monetary unit used in the dataset) and α, β, γ reported in TableII for the EGM with the corre- carrying out the corresponding ML estimation as prescribed sponding values of the same parameters shown previously by Eqs. (23) and (24). 11 volume of realized trade flows, but also their existence, 1 and has separate functions (F and G) with possibly over- 0.9 EGM lapping sets of explanatory factors (GDP is the common 0.8 GM ITN element in this case) but in any case distinct sets of pa- 0.7 ) rameters (α, β, γ on one hand and δ on the other), to ) 0.6 ij ) ij take these two aspects into account. The effects of GDP w w (w ( 0.5 > ( P and distance captured by the parameters α, β, γ are only 0.4 > P

those conditional on a link being created, while discount- P 0.3 ing the effects of link creation itself via the parameter δ. Note that α, β, γ and δ are all found to be monotoni- 0.2 cally increasing over time by the EGM, highlighting a 0.1 0 steady increase of the effects of GDP and distance (even 100 101 102 103 104 105 106 if milder than observed in the GM) and of the density ij wwij of connections. In fact, as the network density becomes h i higher (larger δ in the EGM), we see a smaller discrep- FIG. 3. Empirical and model-generated cumulative ancy between the fitted values of α, β in the two models, distributions of trade flows. Log-linear plot comparing consistently with the idea that, if all pairs of countries the empirical cumulative distribution of trade flows (normal- ized in order to include zero flows) in the ITN for the year were connected, then both the GM and the EGM would 2000 (red) with the corresponding distributions obtained us- estimate the effects of GDP only through the lens of trade ing the Gravity Model defined in Eq. (1) (green, parameters volumes, because the GDP would no longer explain the estimated as reported in TableI) and the Enhanced Gravity (fully connected) topology in such an extreme situation. Model defined in Eqs. (4) and (27) (blue, parameters esti- mated as reported in TableII). Note the discontinuous jump In order to better understand the differences between due to the ≈ 47% pairs of unconnected countries in both the the trade volumes predicted by the two models, in Fig.3 empirical and the EGM-generated curves, and the absence of we plot the cumulative distribution P (w) counting the ≥ such feature in the GM-generated curve (for which missing fraction of link weights larger than or equal to w in links are incorrectly given a positive weight). the empirical (red), GM-generated (green) and EGM- generated (blue) networks. All distributions are normal- ized as P (0) = 1 in order to include zero weights, corre- sponding≥ to pairs of countries that are not connected, in misplaced to the right in the distribution, which results their support. Note that P (w) is not simply the integral in exceedingly large values of the green curve with re- ≥ spect to the other two curves. We know that in the EGM of qij∗ (w) because the latter is a probability distribution defined for a specific pair of countries, while the former the discontinuity is indeed due to the extra point mass is defined for the entire network and hence determined at w = 0 in the expression of qij∗ (w) given by Eqs. (15) by the combination of all pair-specific probabilities. We or (19). Note that, technically, one can speak of a ‘dis- see that the empirical distribution has a discontinuous continuity’ only if weights take continuous values. This jump at w = 1, as it drops from a value P (1 ) = 1 would be possible by replicating our analysis in the case to a value P (1 + ) 0.53, where  > 0≥ is arbitrarily− of real-valued weights using the results provided in the small. Recalling≥ that link≈ weights take only non-negative Appendix and summarized in Eq. (25). Importantly, in this case the jump in P (w) would be observed precisely integer values in our analysis, this discontinuity indicates ≥ that there are roughly 47% pairs of countries that are not at the ‘true’ value w = 0, consistently with the genuine connected (w = 0) in this particular snaphot of the ITN, delta-like form of qij∗ (w) given by Eq. (25) (only, it would no longer be possible to show the discontinuity of P (w) so that the distribution keeps the value P (w) = 1 for ≥ w [0, 1) and, as we cross the smallest allowed≥ non-zero along a logarithmic axis and plot the full cumulative dis- weight∈ value (w = 1), it drops by a value 0.47 as it no tribution). The EGM would again correctly match both longer ‘sees’ those unconnected pairs. As bigger weights location and size of the empirical discontinuity (since pij, (w > 1) are considered, the distribution continues to de- hence the expected number of positive weights, is identi- crease continuously all the way to P (+ ) = 0, indicat- cal in the discrete and continuous versions of the model). ing that the only discontinuity we see≥ at w∞= 1 is actually For positive weights, the real-valued EGM would continu- due to the excess probability mass at zero weights pro- ously interpolate the discrete points of the integer-valued duced by the link-generating process. Remarkably, the EGM, because this is a generic property of geometric and empirical distribution is closely matched by the EGM. exponential distributions with the same expected value. The fact that this model replicates both the location and So in either specification, the EGM nicely replicates both size of the discontinuity indicates a correctly predicted the empirical distribution of strictly positive link weights number of missing trade connections in the ITN topology. and the sharp peak ‘jumping out’ from it, while the GM By contrast, the GM predicts a fully connected network, does not. evidenced from the absence of the discontinuity. Pair of We now want to check whether the trade links, be- countries that are unconnected in the real ITN are are sides being predicted in correct number by the EGM, are unavoidably given a positive weight by the GM and hence also placed between the correct pairs of countries by the 12

FIG. 4. Country-based network configurations for year 2011 in the real ITN (red), the GM (green) and the EGM (blue). For three representative countries, we show the connections to all trade partners in the world. The total number of countries in the data (see Appendix) is N = 208. The three countries are selected on the basis of their empirical degree k: the country with maximum degree (USA, k = 203), the one with minimum degree (Western Sahara, k = 13) and one with intermediate degree (Vanuatu, k = 91). The GM produces always the maximum possible number (N − 1) of connections. By contrast, the EGM produces connections randomly with probability pij , so links change from realization to realization. The expected degree is however independent of the individual realizations and is close to the empirical one for all countries. We have selected a typical realization that produces a degree equal to the expected degree for each of the three countries. same model. This means moving the focus of our anal- We now consider higher-order topological properties ysis towards the purely binary, global topology of the as a more stringent and quantitative test. In the top nn ITN. As a first qualitative illustration setting the stage left panel of Fig.5 we plot the average degree ( ki ) of for this analysis, in Fig.4 we show all the trade links of the trade partners of each country i versus the number the country with maximum degree (USA), the one with of such partners, i.e. the degree (ki) of country i itself. minimum degree (Western Sahara) and one with inter- Similarly, in the top right panel of Fig.5 we plot the mediate degree (Vanuatu). We also show the correspond- clustering coefficient (ci), i.e. the fraction of trade part- ing predictions under the standard GM (where Eq. (1) ners of country i that trade with each other, again versus is first fitted to the non-zero flows and then extended to the number (ki) of such partners. The empirical quanti- all pairs of countries) and the EGM. The traditional GM ties are compared with the expected quantities under the predicts a fully connected network, i.e. an expected de- GM and the EGM. The exact expressions for both empir- gree ki GM = N 1 for all i. This prediction may be ical and expected quantities are provided in Appendix. accidentallyh i correct− for one or a few countries with maxi- The decreasing empirical trends observed in both plots mal degree, if such countries turn out to be present in the show that the trade partners of poorly connected coun- network (in this case, this does not even happen as the tries (small ki) are on average highly connected, both nn maximum observed degree is k = 203 for USA), but dete- to the rest of the world (large ki ) and among them- riorates unavoidably and dramatically for other countries selves (large ci). By contrast, countries that trade with as their degree decreases. By contrast, the EGM gives a high-degree country (large ki) are on average poorly P nn an expected degree ki EGM = j=i pij (see Appendix) connected, both to the rest of the world (small ki ) and h i 6 which is in good agreement with the empirical one for among themselves (small ci). For both properties, we the entire range of connectivity. find that the EGM is in excellent agreement with the em- 13 pirical ITN, as opposed to the classical GM which sys- fects of the same factor in determining the volume of the tematically generates nearly constant and much higher realized trade connections, the EGM produces different values, as a result of predicting a complete network. parameter values with respect to the GM. By contrast, Having checked that the EGM does very well in sep- the latter lacks this possibility and tends to overestimate arately replicating both the local link weights and the the effects of GDP and distances on the measured trade global topology of the ITN, we now perform a last volumes. and most severe test monitoring properties that combine The agreement between the EGM and trade data calls topological and weighted information together (all defi- for an interpretation of the process generating the net- nitions are again given in the Appendix). In the bottom work in the model. In this respect, we notice that nn left panel of Fig.5 we plot the average strength ( si ), Eqs. (15) and (22) allow us to interpret the realized trade i.e. the average traded volume, of the trade partners of volumes in the EGM as the outcome of two equivalent each country i versus the strength (si) of country i itself. processes (a serial and a parallel one) of link creation In the bottom right panel, we plot a weighted version and link reinforcement. In the serial process, for a given w of the clustering coefficient (ci ) of country i, again ver- pair of countries i, j we first establish a trade link of unit sus the strength (si) of country i. The empirical trends weight with success probability pij and then increment its are compared with the predictions of the GM and EGM volume in unit steps, each with success probability yij. (see Appendix for all definitions). These two plots are in After the first failure, we stop the process for the pair some sense the weighted counterparts of the purely bi- of countries under consideration and start it again for a nary plots considered above. We find that, on average, different pair, and so on until all pairs are considered. countries connected to countries with a low trade activ- In the equivalent parallel process, all pairs of countries ity (small si) trade a lot with the rest of the world (large simultaneously explore the mutual benefits of trade and nn w si ) but relatively less so among themselves (small ci ). engage in a first connection, each with its probability pij. Countries connected to countries with a large volume of Then, all pairs of nodes for which the previous event has trade (large si) have instead a small trade activity with been successful reinforce their existing connection by a nn the rest of the world (small si ), but trade relatively unit weight, each with its probability yij. The process w strongly with each other (large ci ). Again, we find that stops as soon as there are no more successful events. In both trends are replicated very well by the EGM, while either case, Eq. (15) gives the resulting probability that the standard GM fails systematically. the realized volume is w.

Importantly, Eq. (19) shows that qij∗ (w) is a modified geometric distribution with an extra point mass qij∗ (0) V. DISCUSSION at zero volume, i.e. the first event has a probability pij which is in general different from the probability yij of each of the w 1 subsequent events required to produce In this paper we have introduced the EGM as a novel, − advanced model for the ITN and economic networks in a weight equal to w. This distinguishing property of the general. Phenomenologically, the EGM allows us to rec- Bose-Fermi distribution [48] ensures a realistic network oncile two very different approaches that have remained formation mechanism where the establishment of a trade incompatible so far: on one hand, the traditional GM connection for the first time is intrinsically different (and that is well established in economics and successfully re- therefore associated to a different ‘cost’) from the rein- produces non-zero trade volumes in terms of GDP and forcement of an already existing trade connection. This distance but fails in predicting the correct topology [22]; desirable distinction, interpretable for instance in terms on the other hand, network models that have appeared of profitability of trade, has been advocated in previous more recently in the statistical physics literature and studies [9, 10, 21]. Here, it is implemented naturally have been successful in replicating the topology [25, 44] within the maximum-entropy framework via Eq. (13), but are more limited in predicting link weights [42]. To where the (expected) binary topology is enforced sepa- our knowledge, the EGM is the first model that can re- rately from the (expected) link weights. Notice that the liably reproduce the binary and the weighted empirical distinction disappears if the parameter αij in Eq. (13) is properties of the ITN simultaneously. Just like the stan- set to zero, i.e. if the constraint on the expected value dard GM, the RM [11] or similar models, the EGM can of Θ(wij) (the expected topology) is removed as in the accomodate additional economic factors in terms of ex- standard GM. In such a case, pij becomes equal to yij tra dyadic and country-specific properties. Yet, it can (i.e. link creation and link reinforcement become equally likely) and therefore q∗ (w), not only q∗ (w a = 1), be- attribute each of these factors two different roles, by con- ij ij | ij sidering its measurable effects on the topology and on the comes a geometric distribution. However, this operation trade volumes separately from each other, although in a would lead to an unrealistically dense network because combined fashion. For instance, already in the analysis the expected topology would no longer be controllable presented here, we have noticed that the EGM uses the separately from the link weights. GDP in two different ways when explaining the presence Consistently with the fact that trade volumes are typ- and the intensity of links. By discounting the effects of ically reported as integer multiples of some indivisible GDP in determining the existence of links from the ef- monetary unit (e.g. dollars), the above discussion and 14

FIG. 5. Network properties in the real ITN (red), the GM (green) and the EGM (blue). Top left: average nearest nn neighbor degree ki versus degree ki for all nodes. Top right: clustering coefficient ci versus degree ki for all nodes. Bottom left: nn w average nearest neighbor strength si versus strength si for all nodes. Bottom right: weighted clustering coefficient ci versus strength si for all nodes. All results are for the shapshot of the ITN in the year 2000. For all the other years in the analysed sample, we systematically obtained very similar results. See Appendix for information about the data and all definitions of empirical and observed quantities. most of our analysis has been assuming non-negative in- micro-founded model specifications [52–55]. For instance, teger link weights. However we may also take the limit a gravity-like relation can emerge as the equilibrium out- of a vanishing monetary unit, in which case trade vol- come of models of trade specialization and monopolistic umes become non-negative real numbers and, as we have competition with intra-industry trade [10, 56]. The em- shown, qij∗ (w) becomes an exponential density with an pirical failure of the standard GM highlights a previously extra point mass at zero volume as reported in Eq. (25), unrecognized limitation of these micro-founded models, while qij∗ (w aij = 1) becomes a purely exponential den- at least in their current form, and indicates the need for sity as shown| in Eq. (26). Crucially, the extra point mass an appropriate reformulation that makes these models qij∗ (0) ensures that, even in this continuous limit, pij is consistent with the EGM, i.e. with a realistic topology unchanged and the expected topology is still described of the ITN. How policy implications change as the result by Eq. (5). In absence of topological constraints, i.e. if of such a reformulation of current micro-founded mod- we imposed αij = 0, in this real-valued case the net- els is an important point to add to the future research work would degenerate to a fully connected graph as in agenda. Research in the field of interbank networks [45] all specifications of the GM with continuous volumes [39]. has shown that, if unrealistically dense networks are as- This would happen due to the disappearance of the point sumed, then the outcomes of stress tests typically carried mass at zero volume, implying that ‘missing links’ be- out by central banks to study the propagation of stress come events with zero measure in probability. among financial institutions are dangerously biased to- wards a systematic underestimation of systemic risk. In- Our results may have strong implications both for the deed, running the stress test on a network with the ‘right’ theoretical foundations of trade models and for the result- density and topology turns out to be crucial in order to ing policy implications. It is known that the traditional achieve a reliable estimate of risk propagation [45]. These GM is consistent with a number of (possibly conflicting) 15 results make us confident that, in the field of interna- function Z is now calculated as tional economics where the propagation of trade risks is Z X H(W) determined by the ITN topology, the EGM may offer a Z = dW e− novel benchmark supporting improved theories of trade A Θ(W)=A Z and refined policy scenarios. X Y αij Θ(wij ) βij wij = dW e− − A Θ(W)=A i,j Z Y X αij Θ(wij ) βij wij = dwij e− − Θ(wij )=aij i,j aij =0,1 Z Y X αij aij βij wij = e− dwij e− Θ(wij )=aij i,j aij =0,1  Z +  Y αij ∞ βij wij APPENDIX = 1 + e− dwij e− i,j 0   Y xij = 1 + (30) From integer to real link weights β i,j ij

αij where we have again used the definition xij = e− , while in this case we find more convenient not to intro- If the link weights w take non-negative real values ij duce the corresponding transformation y = e βij , for instead of non-negative integer values, the probability ij − reasons that will be clear below. P (W) has to be interpreted as a PDF rather than a Inserting Eq. (30) into Eq. (14) yields the following new PMF. We then look for its maximum-entropy functional form of qij∗ (w), replacing the one appearing in Eq. (15): form P ∗(W) by maximizing the following modified ver- sion of the entropy introduced in Eq. (12): Θ(wij ) βij w xij βij e− qij∗ (w) = , w 0. (31) xij + βij ≥ Using Eqs. (6) and (8), we can now calculate the connec- X Z S[P ] = dWP (W) ln P (W), (29) tion probability and the (conditional) expected weight − A Θ(W)=A as xij pij = 1 qij∗ (0) = , (32) − xij + βij Z p w = dw w q (w) = ij , (33) where the constraints on aij and wij (for all pairs ij ij∗ h i βij i = j) are still given by Eqs.h (i5) andh (11i), and we keep w>0 6 wij 1 assuming zero-diagonal matrices (no self-loops in the net- wij aij = 1 = h i = . (34) work), i.e. aii = wii = 0 for all i. Note that, in going h | i pij βij P from Eq. (12) to Eq. (29), the summation W over all Equations (32), (33) and (34) replace Eqs. (16), (17) N N zero-diagonal matrices with non-negative integer and (18) in the case of real-valued link weights. Inserting × R W entries has been replaced by an integral Θ(W)=A d these expressions into Eq. (31), we get over all N N zero-diagonal matrices with non-negative ×  real entries and such that their binary projection Θ(W) is 1 pij w = 0, qij∗ (w) = − βij w (35) a given adjacency matrix A (i.e. such that Θ(wij) = aij p β e w > 0, P ij ij − for all i, j), followed by a discrete sum A over all such possible binary matrices. The resulting integral, written which replaces Eq. (19) in the real-valued case and shows P R in the combined form A Θ(W)=A dW rather than in that qij∗ (w) is now a mixture of a discrete part, character- R the unconstrained form dW, allows us to treat the bi- ized by a probability mass of magnitude qij∗ (0) = 1 pij W at w = 0, and a continuous part characterized by an− ex- nary constraint aij more naturally and to recover more general ‘mixed’h (i.e.i containing a mixture of a discrete ponential probability density for w > 0. If we want to interpret q∗ (w) uniquely as a PDF throughout its do- and a continuous part) solutions for P ∗(W) that are oth- ij erwise inaccessible, as we confirm later. main (or on the entire real axis), we may rewrite it via the Dirac delta function δ(x) as

Since the sets of constraints is the same as in the βij w qij∗ (w) = δ(w)(1 pij) + Θ(w)pijβij e− , (36) integer-valued case, we arrive at the same expression for − P ∗(W) given by (14), where the Hamiltonian H(W) is which allows for a fully continuous treatment. For in- still given by Eq. (13) but, importantly, the partition stance, the normalization can be correctly stated as 16

R dw qij∗ (w) = (1 pij) + pij = 1. Clearly, the above Observed network properties solution would not− be obviously retrieved if we used the R unconstrained integral W dW in Eq. (29), unless we im- Given a weighted undirected network with weight ma- posed, a priori et ad hoc, the presence of a delta-like spike trix W and adjacency matrix A, with entries related at zero weight. through aij = Θ(wij), the degree of node i is defined as In terms of conditional probabilities, we still find X that establishing a link from country i to country j is ki = aij, (40) j=i a Bernoulli trial with success probability pij given by 6 Eq. (5) as desired; if realized, this link acquires a weight the average nearest-neighbor degree of node i is defined w with probability density as P P a a  0 w = 0, nn X aijkj j=i k=j ij jk ki = = 6 P 6 , (41) qij∗ (w aij = 1) = βij w (37) ki aij | βij e− w > 0, j=i j=i 6 6 and the (binary) clustering coefficient of node i is defined which is now a purely exponential distribution with (con- 1 as ditional) mean β− as prescribed by Eq. (34). Now, ij P P a a a equating Eq. (32) to Eq. (5) and Eq. (34) to Eq. (4) yields j=i k=i,j ij jk ki ci = P6 P6 . (42) the values of xij and βij solving the original problem: j=i k=i,j aijaki 6 6 The average nearest neighbor strength of node i is defined ~ Gψ~ (~ni, ~nj, Dij) as xij = , (38) P P ~ aijwjk Fφ~ (~ni, ~nj, Dij) nn X aijsj j=i k=j si = = 6 P 6 (43) 1 ki j=i aij β = . (39) j=i 6 ij ~ 6 Fφ~ (~ni, ~nj, Dij) P (where si = j=i wij is the strength of node i) and the weighted clustering6 coefficient of node i is defined as Note that Eq. (11) holds in this case as well, as it should P P 1 (w w w ) 3 because it does not depend on whether link weights are w j=i k=i,j ij jk ki ci = 6 P 6 P . (44) taken to be integer or real. Inserting Eqs. (38) and (39) j=i k=i,j aijaki 6 6 into Eqs. (36) and (37), we get the explicit form of qij∗ (w) and qij∗ (w aij = 1) as a function of the factors ~ni and | Expected network properties D~ ij, as reported in the main text in Eqs. (25) and (26) respectively. The expected value (under the EGM) of each of the network properties defined above can be calculated either numerically, by averaging over many network realizations Data sampled independently from the probability P ∗(W) in Eq. (14), or analytically, using the following approach. First of all, in this model the expected value of all ra- We have used international trade and GDP data from tios can be approximated by the ratio of the expected the database curated by Gleditsch [57] for the years 1950, values [40, 41]. Secondly, all numerators and denomina- 1960, 1970, 1980, 1990 and 2000. This database includes tors involve only products over distinct pairs of nodes, yearly trade volumes wij (which we have symmetrized which are statistically independent in the model. Us- by taking the sum of wij + wji), yearly GDP values, and ing Eq. (15), the expected values of such products can the (time-independent) distance matrix Rij. The num- therefore be calculated exactly in terms of xij and yij as ber N of countries increases over time from roughly 85 follows: in 1950 to approximately 200 in 2000. Both GDP and * + X X trade data are reported in U.S. dollars and are there- a a ... = a a ... , (45) ij · jk · h iji · h jki · h i fore integer-valued. To produce Fig.4, we have used i,j,k,... i,j,k,... the BACI database [58], which reports imports and ex- * + X X ports between N = 208 countries in 2011. The BACI wα wβ ... = wα wβ ... ,(46) data were originally in disaggregated form, where total ij · jk · h iji · h jki · h i i,j,k,... i,j,k,... trade was resolved into 96 different non-overlapping com- modity classes. We have aggregated all these commod- where aij = pij, as given by Eq. (16), and h i ity classes together, and again symmetrized, to obtain a dataset consistent with the Gleditsch data used for the γ X∞ γ xij(1 yij)Li γ (yij) wij w qij(w) = − − , (47) earlier years. h i ≡ 1 yij + xijyij w=0 − 17

zl P∞ Lin(z) = l=1 ln denoting the so-called n th polyloga- proach, which requires no sampling of networks and is rithm of z. From the above two considerations,− it follows therefore extremely efficient. that the expected properties of all quantities of interest can be approximated with entirely analytical expressions γ ACKNOWLEDGEMENTS obtained by simply replacing aij with pij and wij with wγ in Eqs. (40), (41), (42), (43) and (44). Via x and h iji ij yij, the expected values are ultimately a function of only AA and DG acknowledge support from the Dutch the GDPs and distances. In our analysis, after prelim- Econophysics Foundation (Stichting Econophysics, Lei- inary checking that the analytical expressions matched den, the Netherlands). This work was also supported extremely well with the numerical averages over realiza- by the Netherlands Organization for Scientific Research tions, we have systematically adopted the analytical ap- (NWO/OCW).

[1] F. Schweitzer, G. Fagiolo, D. Sornette, F. Vega-Redondo, (2013). A. Vespignani, D.R. White. Economic networks: The [17] E. G. Ravenstein, The Laws of Migration, Journal of the new challenges, Science 325(5939), 422 (2009). Royal Statistical Society 52(2), 241-305. [2] R. Kali and J. Reyes,The architecture of globalization: a [18] R. Glick and A.K. Rose Does a Currency Union affect network approach to international economic integration, Trade? The Time Series Evidence, NBER Working Pa- Journal of International Business Studies 38, 595 (2007). per No. 8396 (2001). [3] R. Kali and J. Reyes, Financial contagion on the interna- [19] A. K. Rose, M. M. Spiegel A Gravity Model of Sovereign tional trade network, Economic Inquiry 48, 1072 (2010). Lending: Trade, Default, and Credit IMF Staff Papers, [4] S. Schiavo, J. Reyes, G. Fagiolo, International trade and Vol. 51, Special Issue, International Monetary Fund financial integration: a weighted network analysis, Quan- (2004) titative Finance 10(4), 389-399 (2010). [20] J. Silva and S.Tenreyro The Log of Gravity The Review [5] J. Spitz, T. Kastelle, Gains from Trade: the Impact of In- of Economics and Statistics, 88, issue 4, pages 641-658 ternational Trade on National Economic Convergence; A (2006). Complex Network Analysis Approach, Eastern Economic [21] G.J. Linders and H.L.F. de Groot Estimation of the Association Annual Meeting, 2010. Gravity Equation in the Presence of Zero Flows Tinber- [6] S. Battiston et al., Complexity theory and financial reg- gen Institute Discussion Paper No. 06-072/3 (2006). ulation, Science 351:6275, 818-819 (2016). [22] M. Duenas, G. Fagiolo, Modeling the International-Trade [7] P. Klimek, M. Obersteiner and S. Thurner, Systemic Network: A Gravity Approach, Journal Of Economic In- trade risk of critical resources, Science Advances, 1, teraction And Coordination 8 155-178 (2013). e1500522 (2015). [23] G. Fagiolo, The international-trade network: gravity [8] J. Tinbergen, Shaping the World Economy: Suggestions equations and topological properties, Journal of Economic for an International Economic Policy, (The Twentieth Interaction and Coordination 5(1), 1-25 (2010). Century Fund, New York, 1962). [24] T. Squartini and D. Garlaschelli, Jan Tinbergen’s legacy [9] P. van Bergeijk, S. Brakman (eds.) The gravity model in for economic networks: from the gravity model to quan- international trade (Cambridge University Press, Cam- tum statistics, in Econophysics of Agent-Based Models, bridge, 2010). pp. 161-186 (Springer International Publishing, 2014). [10] L. De Benedictis, D. Taglioni, The gravity model in inter- [25] D. Garlaschelli, M.I. Loffredo, Fitness-Dependent Top- national trade, in The Trade Impact of European Union logical Properties of the World Trade Web, Phys. Rev. Preferential Policies, pp. 55-89 (Springer Berlin Heidel- Lett 93, 188701 (2004). berg, 2011). [26] T. Squartini, G. Fagiolo, D. Garlaschelli, Randomizing [11] F. Simini, M.C. Gonz´alez,A. Maritan, A. Barab´asi A world trade. I. A binary network analysis, Phys. Rev. E universal model for mobility and migration patterns Na- 84, 046117 (2011). ture 484, 96100 (2012). [27] T. Squartini, G. Fagiolo, D. Garlaschelli, Randomizing [12] G. K. Zipf, The P1P2/D hypothesis: on the intercity world trade. II. A weighted network analysis, Phys. Rev. movement of persons, Am. Sociol. Rev. 11, 677-686 E 84, 046118 (2011). (1946). [28] G. Fagiolo, T. Squartini, D. Garlaschelli, Null Models of [13] D. Balcan, V. Colizza, B. Gon¸calves, H. Hu, J. J. Ra- Economic Networks: The Case of the World Trade Web, masco, A. Vespignani, Multiscale mobility networks and J. Econ. Interac. Coord. 8(1), 75-107 (2013). the spatial spreading of infectious diseases, Proc. Natl. [29] A. Serrano and M. Boguna,Topology of the world trade Acad. Sci. USA 106(51), 21484-21489 (2009). web, Phys. Rev. E 68,015101(R) (2003). [14] W.-S. Jung, F. Wang, H. E. Stanley, Gravity model in [30] D. Garlaschelli and M. Loffredo, Structure and Evolution the Korean highway, EPL 81, 48005 (2008). of the World Trade Network, Physica A 355, 138 (2005). [15] G. Krings, F. Calabrese, C. Ratti, V. D. Blondel, Urban [31] A. Serrano, M. Boguna, and A. Vespignani, Patterns of gravity: a model for inter-city telecommunication flows, dominant flows in the world trade web, J. Econ. Interact. J. Stat. Mech. 2009, L07003 (2009). Coord.2, 111 (2007). [16] G. Fagiolo, M. Mastrorillo, International migration net- [32] D. Garlaschelli, T. Di Matteo, T. Aste, G. Caldarelli, and work: Topology and modeling, Phys. Rev. E 88, 012812 M. Loffredo, Interplay between topology and dynamics in 18

the World Trade Web, Eur. Phys. J. B 57, 1434 (2007). [46] T. Deguchi, H. Takayasu, M. Takayasu, Simulation of [33] G. Fagiolo, J. Reyes, S. Schiavo, On the topological prop- Gross Domestic Product in International Trade Net- erties of the world trade web: A weighted network anal- works: Linear Gravity Transportation Model, Proceed- ysis, Physica A 387(15), 3868-3873 (2008). ings of the International Conference on Social Mod- [34] G. Fagiolo, J. Reyes, S. Schiavo, World-trade web: Topo- elling and Simulation, plus Econophysics Colloquium logical properties, dynamics, and evolution, Physical Re- 2014 (2015). view E 79(3), 036115 (2009). [47] G. Garc´ıa-P´erez,M. Bogu˜n´a,A. Allard, M. Serrano, The [35] G. Fagiolo, J. Reyes, S. Schiavo, The evolution of the hidden hyperbolic geometry of international trade: World world trade web: a weighted-network analysis, Journal of Trade Atlas 18702013, Scientific Reports, 6, 33441, Evolutionary Economics, 20(4), 479-514 (2010). (2016). [36] V. Colizza, A. Flammini, M. A. Serrano, and A. Vespig- [48] D. Garlaschelli, M.I. Loffredo, Generalized Bose-Fermi nani, Detecting rich-club ordering in complex networks, Statistics and Structural Correlations in Weighted Net- Nature Physics 2, 110 - 115 (2006). works, Phys. Rev. Lett. 102, 038701 (2009) [37] V. Zlatic, G. Bianconi, A. D. Guilera, D. Garlaschelli, [49] D. Garlaschelli, F. den Hollander, A. Roccaverde, Co- F. Rao, and G. Caldarelli, On the rich-club effect in variance structure behind breaking of ensemble equiva- dense and weighted networks Eur. Phys. J. B 67, 271- lence in random graphs, Journal of Statistical Physics 275 (2009). 173:3-4, 644-662 (2018). [38] D. Garlaschelli, M.I. Loffredo, Maximum Likelihood: Ex- [50] T. Squartini, D. Garlaschelli, Reconnecting statistical tracting Unbiased Information from Complex Networks, physics and combinatorics beyond ensemble equivalence, Phys. Rev. E 78, 015101(R) (2008). https://arxiv.org/abs/1710.11422 [39] A. Fronczak, P. Fronczak, J.A. Holyst, (2012) ‘Statistical [51] F. Picciolo, T. Squartini, F. Ruzzenenti, R. Basosi, D. mechanics of the international trade network’, Phys. Rev. Garlaschelli, The role of distances in the World Trade E, Vol. 85, pp.056113 Web, Proceedings of the Eighth International Conference [40] R. Mastrandrea, T. Squartini, G. Fagiolo, D. Gar- on Signal-Image Technology & Internet-Based Systems laschelli, Enhanced reconstruction of weighted networks (SITIS 2012), pp. 784-792 (edited by IEEE) (2013). from strengths and degrees, New J. Phys. 16, 043022 [52] J. E. Anderson, A Theoretical Foundation for the Gravity (2014). Equation, American Economic Review, 69 (1), 106-16 [41] R. Mastrandrea, T. Squartini, G. Fagiolo, D. Gar- (1979). laschelli, Reconstructing the world trade multiplex: the [53] J. Bergstrand, The Gravity Equation in International role of intensive and extensive biases, Phys. Rev. E 90, Trade: Some Microeconomic Foundations and Empiri- 062804 (2014). cal Evidence, The Review of Economics and Statistics, [42] A. Almog, T. Squartini, and D. Garlaschelli, A GDP- vol. 67, issue 3, pages 474-81 (1985). driven model for the binary and weighted structure of the [54] A.V. Deardorff, Determinants of Bilateral Trade:Does International Trade Network, New J. Phys. 17, 013009 Gravity Work in a Neoclassical World? NBER Work- (2015). ing Paper, No. 5377, (1995). [43] T. Squartini, D. Garlaschelli, Maximum-Entropy Net- [55] J.E. Anderson, E. Wincoop, Gravity with Gravitas: A works: pattern detection, network reconstruction, and Solution to the Border Puzzle, NBER Working Paper, graph combinatorics (Springer International Publishing No. 8079, (2001). AG, SpringerBriefs in Complexity, 2017). [56] M.Fratianni, Expanding RTAs, trade flows, and the [44] G. Cimini, T. Squartini, F. Saracco, D. Garlaschelli, A. multinational enterprise, Journal of International Busi- Gabrielli, G. Caldarelli, The statistical physics of real- ness Studies, Vol 40, 7, 1206-1227, (2009). world networks, Nature Reviews Physics 1, 58-71 (2019). [57] Gleditsch, K. S. (2002). Expanded trade and GDP data. [45] T. Squartini, G. Caldarelli, G. Cimini, A. Gabrielli, D. Journal of Conflict Resolution, 46(5), 712-724. Garlaschelli, Reconstruction methods for networks: the [58] G. Gaulier and S. Zignago, CEPII Working Paper 23 case of economic and financial systems, Physics Reports (2010). 757, 1-47 (2018).