The interconnected wealth of nations: Shock propagation on global trade-investment multiplex networks

The increasing integration of world economies, which organize in complex multilayer networks of interactions, is one of the critical factors for the global propagation of economic crises. We adopt the network science approach to quantify shock propagation on the global trade-investment multiplex network. To this aim, we propose a model that couples a spreading dynamics, describing how economic distress propagates between connected countries, with an internal contagion mechanism, describing the spreading of such economic distress within a given country. At the local level, we find that the interplay between trade and financial interactions influences the vulnerabilities of countries to shocks. At the large scale, we find a simple linear relation between the relative magnitude of a shock in a country and its global impact on the whole economic system, albeit the strength of internal contagion is country-dependent and the inter-country propagation dynamics is non-linear. Interestingly, this systemic impact can be associated to intra-layer and inter-layer scale factors that we name network multipliers, that are independent of the magnitude of the initial shock. Our model sets-up a quantitative framework to stress-test the robustness of individual countries and of the world economy.

The integrated nature of the world economy is the ultimate cause for the propagation of economic crisis at a global scale 1 . A shock originated in a country may spread to its economic partners through multiple channels, captured by the balance of payments 2,3 . Shocks can have different origins, e.g. financial shocks can be caused by defaults of big financial institutions or sovereign debt crisis, while trade shocks may be triggered by barriers raised by governments, such as protective tariffs. The increasing global interconnectedness of world economies 4 calls for a modeling framework of shock propagation able to incorporate the full complexity of these interactions [5][6][7] .
Network science 8 provides useful tools to quantify, model, and predict the behavior of spreading phenomena in complex systems, from information diffusion over social networks to epidemics in living systems 9,10 . The study of international trade networks, in particular, has a long tradition in network science [11][12][13][14][15][16][17][18] . Network effects have been showed to substantially affect the spreading of economic crises [19][20][21] , while network tools are being increasingly employed to estimate systemic risk among financial institutions [22][23][24][25][26][27][28] and to evaluate financial contagion over networks of banks [29][30][31][32] . Most of these works assess financial stability by considering the failure of single institutions (e.g., banks) and specific propagation channels (e.g. interbank lending), and only a few works considered global networks at the country level 33,34 and addressed shock propagation over financial cross-border networks [35][36][37] .
Since international shocks spread through both trade and financial channels, neglecting the interplay between them may lead to underestimate spillover effects. In this paper, we address global shock propagation by taking into account both trade and financial international relations, represented as a multiplex network 38 . The trade-investment multiplex is reconstructed using yearly data of bilateral trade and financial positions between countries, coupled to a dynamics describing how economic distress is transmitted from one country to another. Our model allows us to estimate both the vulnerability of a country to external shocks, and the systemic impact

the trade-investment Multiplex network
Trade and investment interactions between countries in the world can be represented in two different layers of a multiplex network, the global trade-investment (GTI) network. Multi-layered networks provide a proper theoretical framework to address contagion phenomena involving different propagation channels, whose interplay cannot be captured by single-layered networks 39,40 . In the GTI multiplex network, countries are represented as nodes and weighted links represent the existence and intensity of trade or financial connections between countries, and are separated in two different layers, one for each type of economic interaction. In the trade (T) layer, the amount of goods exported from country i to country j can be taken as a proxy for the bilateral vulnerability of i with respect to a shock originated in j: the more country i exports to country j, the more country i will be affected by a demand drop in country j. We reconstruct the T layer by means of bilateral trade data of goods exchanges, by using the United Nations Commodity Trade Statistics Database 41 (analyzed for the first time as a complex network in 11 ), as detailed in the Methods section. A directed link from country i to country j in layer T represents the exports of goods from i to j, x ij , in a given year, which is equivalent to the imports of goods of j from i, ≡ m x ji ij . The total exports of country i are simply X x i j ij = ∑ , and its total imports are M x m i j ji j ij = ∑ = ∑ . Transactions in goods account for the majority (generally over 70%) of the current account of a country, and thus they can be considered as a good proxy of the strength of its trading interactions, see Supplementary Material (SM) for details.
In the investment (I) layer, the bilateral vulnerability of a country i with respect to a shock originated in a country j can be accounted for by the financial dependence of i on j: the more i relies on j's investments to finance its economy, the more country i will be directly affected by a shock originating in country j. Here, we consider cross-border positions of portfolio securities between two countries, reported in ref. 42 , as a proxy of the strength of their financial bilateral exposure, see Methods and SM. The I layer is thus reconstructed such that a link directed from node i to node j represents the stock of portfolio assets owned by country i and issued by country j in a given year, a ij , equivalent to a portfolio liability for j to i, ≡ l a ji ij . The total stock of portfolio assets owned by i in a given year is simply = ∑ A a i j ij , and its total portfolio liabilities reads L a l i j ji j ij = ∑ = ∑ . Note that while the T layer is formed by trade flows, links in the I layer represent stock quantities. Finally, note that the following trivial relations hold where W T stands for the annual total value of traded goods, and W I for the annual total value of investment positions. We reconstructed GTI multiplex networks for each year between 2001 and 2008. Notice that bilateral data disclosing international financial exposures are scarce and affected by important biases, like those introduced by the effects of offshore tax heavens, which could greatly affect the reliability of the results. Therefore, we decided to consider the high-quality data sets available in 42 (stopping in 2008 right before the last crisis), which completed financial data collected by the International Monetary Fund (IMF), see Methods and SM. In the rest of the paper, we consider the GTI network corresponding to the year 2005 (whose topological properties are described in SM) as an illustrative case, results for other years are similar.

the Shock propagation Model
A shock in an epicenter country may be driven by different domestic or exogenous factors, such as political instability, fiscal contraction, banking crisis, etc. Here, we assume that shocks cause a drop on aggregate demand 43 . This implies that the epicenter country may reduce its imports from other countries and/or its investment in financial assets issued by other countries. An initial shock in a country i can be fully characterized by two parameters α and β, representing the initial variations in imports and foreign assets investment, M i δ α = and A i δ β = , respectively. The notation δY i stands for the relative variation of the quantity With this notation, an epicenter country i that reduces its import by 10% and investment by 20% is characterized by α = − . 0 1 and 0 2 β = − . . The distress is subsequently distributed from country i to its partners, proportionally to the intensities of the corresponding economic interactions. This implies negative variations in the exports and liabilities -δX j and δL j -of impacted neighbors j. On their turn, these variations may produce variations in imports, δM j , and assets acquisition, δA j , of each country j, that will be again distributed proportionally to their neighbors in the GTI multiplex network, and so on. Therefore, the model's behavior is defined by a coexistence of two coupled but different dynamics: i) the external propagation of the shock from distressed to connected countries, and ii) the internal contagion of the shock within distressed countries.
The inter-country contagion runs on top of GTI multiplex network and accounts properly for reverberation and second-order effects. Akin to general spreading models in network science 10 , each country is classified in three mutually exclusive states: vulnerable to receive the shock for the first time, active if it has accumulated distress and is able to propagate it, or inactive when it can receive distress from its partners but cannot propagate it anymore. Initially, all countries are in the vulnerable state, except for the epicenter country, which is active. Active nodes spread their distress to all neighbors (regardless of their status) as described in the previous paragraph, and turn inactive immediately after. Vulnerable countries reached by the propagation become active. The shock propagation continues until all active countries have spread their accumulated distress, and the active state disappears from the system. Then, the contagion dynamics is repeated several times, each time setting as initial variations the distress accumulated by inactive nodes in the last round, until the system reaches a final steady state (see SM for a concrete example). Therefore, each step of the contagion corresponds to a time interval obtained by dividing the total duration of the shock propagation dynamics, assumed to be one year, by the number of contagion steps, = n 50, that ensures that the system has reached a steady state. See SM and Fig. S3 for details. The internal contagion of the shock within distressed countries can be modeled by relating the variation of imports and assets acquisition of a country to the variation in its exports and liabilities incurrence in the short term, such as M f X L ( , ) By considering balance of payments constraints, indeed, the capacity of a country to pay for its import and to acquire foreign assets may depend on its ability to generate sufficient revenues from exports and financial liabilities. We thus assume that a country's revenues from exports and financial liabilities can be viewed as a budget constraint on its capacity to import and acquire foreign assets 44 . We also assume that the exchange rate and prices do not adjust quickly and we neglect possible policy action aimed at counteract the shock effects.
Therefore, the dependency of imports and financial assets on revenues from exports and liabilities can be viewed as a simple elasticity relation, and learned from the data. To this aim, for each country we consider a multivariate linear regression model representing the correlations between the quantities δX t , δM t , δA t , and δL t . The elasticity relations can be described by the following equations (we omit the dependency in the country i for brevity): where c M and c A represent the intercept terms and the coefficients c MX , c AL , c ML , and c AX encode the correlations between (δX, δL) and (δM, δA), while ε M and ε A account for Gaussian noise, with zero average 0 A . It is worth to note that Eq. (2) incorporates the mechanical accounting constraint linking trade deficit/surplus with variations in part of the financial account (portfolio investments). Coefficients c MX , c ML , c AX , and c AL thus play the role of internal pass-through coefficients, since they describe how the variations of imports and asset of a country depend on the variations of its exports and liabilities. It is important to remark that (i) Eqs. (2) are treated as simultaneous equations, by incorporating the possible correlations between all variables, (ii) the statistical significance of pass-through coefficients is implicitly encoded in the variances of the noise (σ ε 2 M and σ ε 2 A ), the larger the noise, the less significant the associated coefficient. See Methods and SM for further details. Countries with internal pass-through coefficients smaller/larger than one will reduce/ increase the impact of the shock to their commercial or financial partners, acting thus as absorbers/amplifiers. For instance, oil exporters play the role of shock blocker, having small internal pass-through coefficients. See Methods and SM for a detailed description of internal pass-through coefficients and their estimation.

Systemic Vulnerability of countries to propagating Shocks
The shock propagation model allows us to assess the impact of demand shocks in one or more countries on the rest of the world, when the shock spreads from one country to another through international macroeconomics networks like the GTI multiplex. The impact on a country i produced by a shock originated in an epicenter country E, with parameters (α,β), can be quantified by considering the relative variations , measured at the end of the system's evolution (once the shock has been totally absorbed by the entire system) Y i F , with respect to its initial value Y i I , that is, gives a measure of the vulnerability of country i to a shock originated in country E. This magnitude can be very heterogeneous across different countries and, even for the nearest neighbors of the epicenter country E, it incorporates systemic effects beyond direct bilateral economic interactions. By running several numerical simulations of the model with the same initial conditions (α, β, E), one can obtain probability distributions for the , and consequently the average 〈V i (Y|α, β, E)〉 and value at risk , as measures of the expected variability and the risk of loss. Figure 1 shows the heterogeneity of the vulnerability (right plots). One can see that American countries are more vulnerable to a shock originated in the United States (first row), with respect to both trade (the exports of Mexico, Canada and other South American countries may drop more than 25%) and investment. Shocks in China (second row) have a considerable lower impact on the rest of the world, especially with respect to investments. Australia, some African and South American countries may be forced to reduce their exports (probably raw materials) up to 20%, while the United States shows one of the largest reduction of foreign investment, around 10%. The economic impact on trade of a shock involving all Eurozone countries (third row) is homogeneously distributed to the rest of the world, with a general reduction of exports around 30%, while the financial impact is much more heterogeneous: most vulnerable countries are Southern European countries, forced to reduce their liabilities by more than 40%, probably due to sovereign debt exposures. The average vulnerabilities

Quantifying Systemic impact of epicenter countries
Beyond country vulnerabilities, our model allows us to measure the potential risk that each country poses for the international economic system as a whole. The global impact of a shock in a given country across the GTI multiplex can be quantified by defining its systemic impact ( , ) i α β  , as the total economic value that is affected by a shock originated in country i with parameters (α, β). The systemic impact is expected to depend crucially on the propagation of the shock from financial to trade layer, and vice versa. These spillover effects between layers can be addressed by considering separately the impacts on trade and investment. One can define the systemic impact on trade,  α β ( , ) i T , and investment α β ( , ) i I  , as the affected value of traded goods and financial securities expressed as a fraction of the global value of traded goods W T and financial securities W I , respectively, that is Note that the second equality holds because of Eq. (1). Figure 2 shows the systemic impact on trade, ( , ) , of a shock originated only in the financial layer (α = 0, Fig. 2a), or trade layer (β = 0, Fig. 2b) of the GTI multiplex networks, with the United States as epicenter country. As expected, the larger the initial distress, represented by parameters (α, β), the larger the systemic impact on the rest of the world. Even if the initial shock only involves one layer, the economic distress spreads from the financial to the trade layer, and viceversa. Interestingly, the different magnitudes of systemic impact reported in Fig. 2 can be quantitatively explained by our model, as we will see in the next section.
Different countries exhibit different magnitudes of systemic impact on trade or investment, that can be taken as a measure of their relevance for the stability of the GTI multiplex network. The systemic impact of a country i, indeed, is expected to depend on the economic value of the initial shock  i , determined simply as  Surprisingly, we found that the systemic impacts of these countries on global trade ( =  T ) or investment ( I  = ) are well fitted by linear regressions, whose coefficients  ( , ) γ α β represent scale factors for the initial shock. This implies that, at least for big economies, the systemic impact of a country i can be described simply as ) encodes the sensitivity of the GTI network to the shock. The larger the coefficients  ( , ) γ α β , the larger the shock amplification. Notice that these coefficients depend on the initial shock but are country-independent. Even if the elasticity relations (2), determining the internal contagion within countries, are linear, the pass-through coefficients are quite heterogeneous across countries (see SM), and the inter-country propagation phase modeled by the spreading dynamics introduces highly non-linear effects. i  are expected to depend on the magnitude of the initial shock, these countries presenting significant values of the deviations have qualitatively similar behavior regardless the value of (α, β), as shown in the SM. It is worth to note that it is not possible to verify the linear scaling between initial shock and systemic impact, and consequently its deviations, for small economies, due to large uncertainties over the impact of these countries.

network Multipliers encode Systemic impact
The value of the coefficients ( , )  γ α β depends on the parameters (α, β) characterizing the initial shock (see SM). One can understand this dependency by considering separately shocks originated only in one layer, investment or trade, of the GTI multiplex. Figure 4 shows that, also in the case of a exclusively financial (α = − . 0 1, Fig. 4a) or exclusively trade ( 0 3 β = − . , Fig. 4b) shock, the systemic impacts  i T and i I  are well fitted by linear regressions. However, the regression coefficients do not strongly depend on the magnitude of the initial shock, being remarkably similar for different values of (α, β), see SM. Therefore, we name the scale factors γ ′→   as intra-and inter-layer network multipliers, as they gauge the network effects of shock propagation from layer  to layer ′ on GTI networks, Figures 4, S9 and S10 show that a financial shock has an intra-layer network multiplier 1 , and a inter-layer network multiplier  γ . ± .  , of a shock originated in the United States. Different combinations of values (α,β) are considered: the initial shock can be originated in the trade layer (plot (a)), α = 0, β < 0), or trade layer (plot (b)), β = 0, α < 0). Error bars represent the standard error of the mean over 100 runs. A financial shock reducing by 40% the foreign assets demand in a single, large country such as the United States is expected to reduce the total value of financial securities by 11%, but also the total traded goods by 4%. (2019) 9:13079 | https://doi.org/10.1038/s41598-019-49173-2 www.nature.com/scientificreports www.nature.com/scientificreports/ on the investment layer, γ → I I , is much larger than the one for the trade layer, γ → I T . Conversely, a trade shock shows an intra-layer network multiplier of 4 , and an inter-layer network multiplier of γ − . ± . →  0 6 0 3 T I . It is interesting to note that the network multiplier giving the systemic impact on trade for a trade shock T T γ → is much bigger than the network multiplier giving the systemic impact on investment for an investment shock γ → I I , meaning that the intra-layer network effects are stronger for trade shocks than for financial shocks. The network multiplier γ → T I is negative, indicating that trade shocks can produce an increase in the incurrence in liabilities, probably to compensate the revenue reduction from exports.
The network multipliers   γ → ′ may be used to infer the systemic impact of a country hurt by a combined or single-layer shock, given its relative magnitude in each layer. If we assume that the systemic impact generated by an initial shock in both financial and trade layers, characterized by (α, β), is comparable to the sum of the systemic impacts of a trade shock with α, and a financial shock with β, then one can estimate the expected impact as ( )  Figure 5 shows a comparison between the expected impact on trade (Fig. 5a) and investment (Fig. 5b), as derived from Eq. (7), and the systemic impact obtained by numerical simulations, originated by an initial shock with α = − . 0 3, β = − . 0 5. One can see that, by taking into accounts the statistical error on the systemic impact and the uncertainty on the network multipliers γ → ′   , expected and numerical impacts are actually very close. Thus, Eq. (7) allows us to infer the systemic impact of a country, given the initial shock (see SM for different values of α, β), at least for large economies.
Finally, Figs 5 and S11 show clearly that the systemic impact of a country does not only depend on its GDP, and may be significantly different for trade or investment. The country with the largest systemic impact on the rest of the world is by far the United States, with respect to both trade and investment. However, the next countries with the largest impact on investment are the United Kingdom and Japan, while Germany and China have the  www.nature.com/scientificreports www.nature.com/scientificreports/ next largest impact on trade. Note that China, with the second largest GPD, has an expected impact on global investment ten times smaller than the United States.

Discussion
Estimating the global effects of economic crises remains a major challenge that we have to solve to advance in their prevention and control. We have proved here that a modeling strategy combining a multilayer network approach with inter-country and intra-country contagion dynamics is useful to stress-test the systemic vulnerability of individual countries, that can act as absorbers or amplifiers and of the world economy to propagating shocks. At the large scale, the simple linear relation between the relative magnitude of a shock in a country and its impact on the global system is surprising, since the strength of internal contagion is country-dependent and the inter-country propagation dynamics is non-linear. Interestingly, this systemic impact is associated to intra-layer and inter-layer network multipliers, that are independent of the magnitude of the initial shock.
It is important to remark that our modeling framework has several well-known limitations. Financial data are still scarce for specific economies and often show inconsistency, caused for instance by tax heavens 42 . The missing information should then be estimated at the risk of adding noise coming from the estimation methodologies. On the other hand, our stress-test model represents a solid but first step towards a more sophisticated quantitative framework. For instance, we did not take into account the possible variation of optimal decision rules of economic agents as a response to policy change 45 and, in order to minimize the number of assumptions, the complexity of the economic structure of a country is neglected. Furthermore, there might be several sources of endogeneity in determining internal pass-through coefficients through Eq. (2), such as omitted variables (e.g., GPD variation), which may lead to biased estimations of the parameters 46 .
Nevertheless, our approach aims at overcoming more serious limitations in the current modeling approach of global shock propagation, mostly based on threshold models, in which a node's failure triggers a cascade dynamics. Even if the complete collapse of a financial institution has been empirically observed several times, the default of one or more countries, implying the complete stop of trade and financial flows, seems a very unrealistic assumption. Finally, the linearity assumed in the intra-country phase of the shock propagation (another limitation, yet common in standard econometrics) is at least partially compensated by the non-linearity of the inter-country phase, originated from the repeated spreading dynamics.
One natural spinoff of our work would be to analyze how the GTI multiplex network topology, intra-layer pass-through coefficients, and network multipliers evolve in time to compare pre-and post-crisis scenarios. Future work should also be devoted to consider the effects of supply-side shocks, in which the epicenter country does not reduce its imports from other countries, but rather it reduces exports to its trading partners, comparing this scenario with demand-side shocks addressed in this work. In the long run, we hope that our network-based macroeconomic approach to the propagation of shocks could be enriched to contribute to the detection of early warning signals, as well as suggesting regulatory strategies to prevent the social, economic, and ecological cost of crises.

Methods
Here we describe the empirical data used in the paper, available through motivated request to the authors, and the estimation of the internal pass-through coefficients of the shock propagation model. www.nature.com/scientificreports www.nature.com/scientificreports/ empirical data. Our work relies on different data sources, described in details in the SM, and summarized here. The investment layer of the GTI network is reconstructed by using the bilateral matrix of cross-border financial positions between countries, as reported in ref. 42 . Bilateral data disclosing financial exposures are scarce. However, the Coordinated Portfolio Investment Survey (CPIS) annually conducted by the IMF reports data of cross-border positions of portfolio securities between countries. Portfolio securities represent the largest fraction of cross-border investment positions, that include also direct investments and banking sector positions 37 . We consider cross-border portfolio investment positions between two countries as a proxy of the strength of their financial interactions. While portfolio investments account only for a part of a country's financial exposures, we choose to focus on them for two reasons: i) data regarding portfolio investments are the more complete and reliable available, ii) portfolio investments can be considered short term as compared with other financial exposures, e.g. foreign direct investments, and thus are more appropriate to describe shock propagation. Note that, since CPIS data are biased because of offshore tax heavens, here we considered the data sets compiled in ref. 42 , which completed CPIS data, as detailed in the SM. The trade layer of the GTI multiplex network is reconstructed by using the United Nations Commodity Trade Statistics Database 41 , also used and described in ref. 18 . The multivariate regression model, described by Eq. (2), is informed by the time series of exports, imports, incurrence of liabilities, and acquisition of assets, as recorded by the IMF. We considered yearly data, from 1980 to 2015. We exclude global recession periods from the time series, i.e. years 1982, 1991, and 2009 47 .
Estimation of internal pass-through coefficients. We estimate trend terms, internal pass-through coefficients, and noise terms in Eq. (2) for each country by calculating variances and co-variances of the four time series {dX, dM, dA, dL}, extracted from annual data recorded by the IMF, as described in SM. Some observations are in order. First, the model assumes that there are no lags between exports/liabilities revenues and imports/ assets payments. Second, one can de-trend the relations described by (2)  . Finally, note that correlations between terms dM and dA are directly related to the correlation between noises ε 1 and ε 2 , as σ 〈 〉= ε ε dMdA 2 1 2 , see SM.