Introduction

The financial crisis of 2007-2008 highlighted the enormous effect of contagion over world bank networks (see e.g. Gai and Kapadia (2010); Elliott et al. (2014); Fink et al. (2016)). Similar contagion effects appear also in the world trade which is especially vulnerable to energy crisis mainly related to the trade of petroleum and gas (see e.g. Wikipedia contributors (2019); Kettell (2020)). In this work, we model the crisis contagion in the world trade using the UN Comtrade database (Comtrade 2010). We use the Google matrix analysis (Brin and Page 1998; Langville and Meyer 2012; Ermann et al. 2015) of the world trade network (WTN) developed in Ermann and Shepelyansky 2011; 2015. In comparison with the usual import-export analysis based on the counting of trade volumes directly exchanged between countries, the advantage of the Google matrix analysis is that the long range interactions between the network nodes, i.e., the countries, are taken into account. Otherwise stated, this analysis captures the fact that even two countries which are not direct trade partners can possibly have their economies correlated through the cascade of trade exchanges between a chain of intermediary countries. The power of the specific Google matrix related algorithms, such as the PageRank algorithm, is well illustrated by the success of the Google search engine (Brin and Page 1998; Langville and Meyer 2012), and also by their possible applications to a rich variety of directed networks (see Ermann et al. 2015 for a review). The detailed UN Comtrade database, collected for about 50 years, allows to perform a thorough modeling of the crisis contagion in the WTN. In the following, we use the contagion model inspired by the analysis of the crisis in the Bitcoin transactions network presented in Ermann et al. (2018); Coquidé et al. (2019c).

The resilience of complex networks undergoing structural changes such as attacks and takeovers have been considered in Podobnik et al. (2015). The studies devoted to crisis propagation (crowd disasters, war, epidemic spreading…) inevitably have to involve feedback loops producing instabilities and cascade effects (Helbing et al. 2015). In our Markov chain based method which consider any range interaction between nodes of a complex network, such feedback loops are naturally built-in.

We note that various research groups studied the statistical properties of the world trade network (see e.g. Serrano et al. (2007); Fagiolo et al. (2009); He and Deem (2010); Fagiolo et al. (2010); Barigozzi et al. (2010); De Benedictis and Tajoli (2011); Deguchi et al. (2014)) but the contagion process has not been analyzed so far. We think that our study will attract research interest to this nontrivial and complex process. Such an analysis can be also extended to networks of interconnected banks (see e.g. Roncoroni et al. (2019)) where the contagion process is of primary importance.

Datasets

Using the UN Comtrade database (Comtrade 2010), we construct the multiproduct World Trade Network (WTN) for the years 2004, 2008, 2012 and 2016. Each year is characterized by a money matrix, \(M^{p}_{cc^{\prime }}\), giving the export flow of product p, expressed in USD, from country c to country c. The data concern a set \(\mathcal {C}\) of Nc=227 countries and territories, and a set \(\mathcal {P}\) of Np=61 principal type of products. The list of these products, which belongs to the Standard International Trade Classification (Rev. 1), is given in Ermann and Shepelyansky (2015). The 2016 WTN is represented in Fig. 1. The set \(\mathcal {C}\) comprises Nc=227 sovereign states and territories which are listed, with their associated ISO 3166-1 alpha-2 code, in the “Abbreviations” section. Among territories, most of them belong to a sovereign state, some are disputed territories, such as Western Sahara, and Antarctica is a international condominium. The UN Comtrade database inventories commodities flows, not only between sovereign states, but also from and to these territories. The present study complies with the UN Comtrade terms of use.

Fig. 1
figure 1

2016 World trade network. Two countries A and B are related by a directed link, the direction of which is given by its curvature. If A points to B following the bent path in the clockwise direction (A ⌢B) then A exports to B, otherwise, i.e. (A ⌣B), B exports to A. The width of the link is proportional to the exportation volume in the WTN from the source country to the target country. The colors of country nodes range from red (blue) for a country going to bankruptcy at stage τ=0 (τ=τ) in the case of a bankruptcy threshold κ=0.1 and for the following crisis scenario: once a country goes to bankruptcy, it is prevented to import products with the exception of petroleum and gas (see details in the “Contagion model” section). Only transactions above 1010 USD are shown. Most of the Polynesian islands have been removed, here and in the following figures, to improve visibility

Model

In this section, we recall the construction process of the google matrix G associated to the WTN, and the PageRank-CheiRank trade balance (PCTB) (Ermann and Shepelyansky 2015; Coquidé 2019a, b). We introduce also a model of crisis contagion in the WTN.

Multiproduct world trade network

For a given year, the multiproduct WTN is characterized by NcNp nodes, each one representing a couple of country and product (cp). We assign a weight \(M_{cc'}^{p}\) to the directed link from node cp to cp. We define \(V_{cp}=\sum _{c'}M_{cc'}^{p}\) as the total volume of product p imported by the country c, and \(V^{*}_{cp}=\sum _{c'}M_{c'c}^{p}\) as the total volume of product p exported from the country c.

Google matrix of the world trade network

The Google matrix G is constructed as

$$ G=\alpha S + (1- \alpha)\mathbf{v} \mathbf{e^{T}} $$
(1)

where S is a stochastic matrix, the elements of which are

$$ S_{cp,c'p'}=\left\{ \begin{array}{ll} \delta_{pp'}M^{p}_{cc'}/V^{*}_{c'p}&\text{if }V^{*}_{c'p}\neq 0\\ 1/N&\text{if }V^{*}_{c'p}=0 \end{array}\right.. $$
(2)

Here, α∈[0.5,1[ is the damping factor, v is a preferential probability vector, and \(\mathbf {e^{T}}=(1,1,\dots,1)\) is a row vector. The Google matrix G (1) describes the transition probabilities of a random surfer which, with a probability α, follows the architecture of the multiproduct WTN encoded in the stochastic matrix S, and, with a probability (1−α), jumps to any node of the WTN according to the preferential probability vector v. Below, we use either α=0.5 or α=0.85. This second value is the one used in the seminal paper of Brin and Page devoted to the PageRank algorithm (Brin and Page 1998). The PageRank vector P characterizes the steady state of the Markovian process described by the Google matrix G (1), i.e., GP=P. The cp component of the PageRank vector P, i.e., Pcp, gives the fraction of time the random surfer spent on the node cp during its infinite journey in the WTN.

Following Ermann and Shepelyansky 2015; Coquidé et al. 2019a, the final WTN Google matrix is obtained after two contruction steps. We use a first preferential probability vector v1, the components of which are \(v^{1}_{cp}=V_{cp}/\left (N_{c}V_{c}\right)\) where \(V_{c}=\sum _{p}V_{cp}\) is the total volume of commodities imported by the country c. This choice of the preferential probability vector ensures equity for the random jumps between countries. This preferential probability vector v1 allows to compute the PageRank vector P1 associated to the Google matrix G1. As a second step, we use the PageRank vector P1 to define a new preferential probability vector v, the components of which are \(v_{cp}=P^{1}_{p}/N_{c}\) where \(P^{1}_{p}=\sum _{c'} P^{1}_{c'p}\) gives the ability of a product p to be imported. The final Google matrix G (1) is constructed using the latter defined preferential probability vector v. The PageRank vector component Pcp naturally characterizes the ability of a country c to import a product p (Ermann and Shepelyansky 2015; Coquidé et al. 2019a).

It is interesting to consider the complex network built by inverting the directed links of the WTN. The Google matrix G associated to this inverted network is obtained from the stochastic matrix S, the elements of which are

$$ S^{*}_{cp,c'p'}=\left\{ \begin{array}{ll} \delta_{pp'}M^{p}_{c'c}/V_{c'p}&\text{if }V_{c'p}\neq 0\\ 1/N&\text{if }V_{c'p}=0 \end{array}\right., $$
(3)

and from the preferential probability vectors v∗1 and v, the components of which are \(v^{*1}_{cp}=V^{*}_{cp}/\left (N_{c}V^{*}_{c}\right)\) and \(v^{*}_{cp}=P^{*1}_{p}/N_{c}\), where \(V^{*}_{c}=\sum _{p}V^{*}_{cp}\) is the total export volume of the country c and \(P^{*1}_{p}=\sum _{c'} P^{*1}_{c'p}\) gives the ability of the product p to be exported. Here, P∗1 and P are the CheiRank vectors defined such as G∗1P∗1=P∗1 and GP=P. The CheiRank vector component \(P^{*}_{cp}\) naturally characterizes the ability of a country c to export a product p (Ermann and Shepelyansky 2015; Coquidé 2019a, b).

In addition to the PageRank vector P and the CheiRank vector P, we can define the ImportRank vector I and the ExportRank vector E, the components of which are Icp=Vcp/V and \(E_{cp}=V^{*}_{cp}/V\) where V is the total volume exchanged through the WTN. The ImportRank and ExportRank constitute crude accounting measures of the capabilities of a country c to import or export a given product p. It has been shown (Ermann and Shepelyansky 2015; Coquidé et al. 2019b) that the rankings by PageRank and CheiRank provide a more finer measure of these capabilities since it takes account of the all the direct (cpcp) and indirect \(\left (c'p\rightarrow c_{1}p\rightarrow c_{2}p\rightarrow \dots \rightarrow cp\right)\) economical exchanges of any commodity p between any pair of countries c and c. The PageRank and CheiRank algorithms express the economical importance of a (cp)-pair, i.e., a country-product pair, inside the complex network constituted by the international trade.

PageRank-CheiRank trade balance

As the PageRank and CheiRank algorithms measure the capabilities of a country to import or to export products, we can define the PageRank-CheiRank trade balance (PCTB) of a given country c as

$$ B_{c}=\frac{P^{*}_{c}-P_{c}}{P^{*}_{c}+P_{c}} $$
(4)

where \(P_{c}=\sum _{p}P_{cp}\) is the country c PageRank component and \(P^{*}_{c}=\sum _{p}P^{*}_{cp}\) the country c CheiRank component. The PCTB is bounded, Bc∈[−1,1]. The more Bc is positive, the more the country c is a more efficient exporter than importer in the WTN. Consequently, the country c economic health should be correlated with the value of Bc.

Analogously, the usual normalized import-export trade balance can be defined using the ImportRank and the ExportRank as

$$ \hat{B}_{c}=\frac{E_{c}-I_{c}}{E_{c}+I_{c}} $$
(5)

where \(E_{c}=\sum _{p}E_{cp}\) is the country c total export volume (divided by V) and where \(I_{c}=\sum _{p}I_{cp}\) is the country c total import volume (divided by V).

Contagion model

Countries with large negative PCTB naturally have to restrain their imports of non vital goods. This restriction can be de facto, as not enough liquidity are available for these countries, or can be imposed by a supranational organization in order to hold back a possible crisis contagion (e.g. the European Union for countries belonging to the Eurozone). Thus, let us assume that every country c with Bc≤−κ goes to bankruptcy. Here, κ≥0 is the bankruptcy threshold.

At the crisis stage τ=0, using the Google matrix G0=G defined by (1), we compute the PCTB Bc for each country c. We obtain a set of countries \(\mathcal {B}_{0}=\left \{c\in \mathcal {C}\,|\,B_{c}\leq -\kappa \right \}\) which go to bankruptcy at the crisis stage τ=0 and which remain in this state in the following crisis stages τ>0. Let us assume that all the bankrupted countries are prevented to import products at the following stages, τ≥1. We will consider two cases: the import ban concerns all the products with the exception of petroleum and gas (model A) or the import ban concerns all the products (model B). At the stage τ=1, the world trade network is modified setting to zero the money matrix elements corresponding to the banned trade exchanges, i.e.,

$$ M_{cc'}^{p}=0,\forall c'\in\mathcal{C},\forall c\in\mathcal{B}_{0}, \left\{ \begin{array}{l} \forall p\in\tilde{\mathcal{P}}\qquad\text{(model A)}\\ \forall p\in\mathcal{P} \qquad\text{(model B)} \end{array} \right. $$
(6)

where \(\tilde {\mathcal {P}}=\mathcal {P}-\left \{\text {petroleum},\text {gas}\right \}\) is the set of all the exchanged commodities in the WTN with the exception of petroleum and gas. The Google matrix G1 is constructed using the above modified money matrix M (6). We compute again the PCTB for each country, and establish the set of countries, \(\mathcal {B}_{1}=\left \{c\in \mathcal {C}-\mathcal {B}_{0}\,|\,B_{c}\leq -\kappa \right \}\), which go to bankruptcy at the stage τ=1 and will remain in this state at later stages τ>1, according to model A or model B. The crisis contagion stops at the contagion step τ for which no more countries go to bankruptcy. The WTN crisis contagion model is described by the Algorithm 1. This contagion model has already been used to analyze the crisis contagion in the bitcoin transaction network (Coquidé et al. 2019c).

The model A import ban is more realistic than the model B since bankrupted economies have to survive by importing essential commodities in order to export/sell other manufactured commodities. However, the choice A, allowing only petroleum and gas imports, can still be considered as too crude. It is possible to consider other essential commodities to import such as iron, chemical compounds … Also, an extension of the import ban model could be, an optimal weighting of the import volumes in accordance with the main exports of the considered bankrupted country. Such an import ban model requires an imput-output based economic network such as the one constructed from the OECD-WTO TiVA database (Coquidé et al. 2019b; OECD-WTO Trade in Value Added 2016; Kandiah et al. 2015) or from the World Input-Output Database (World Input-Output Database 2015). These import ban model refinements are left for further studies. We expect that model A captures the essential properties of the crisis contagion phenomenon in the world trade network.

In our crisis contagion model, we assume that each contagion time steps are so short that no economical mechanism is able to get the countries out of the bankruptcy. Of course, the economy of a country is more complex than its participation in the international trade, and, e.g., a country with an unhealthy economical balance, going to bankruptcy in our model, can obtain international credit to continue to import commodities. We left for further studies the ability of bankrupted countries to recover, after a finite time, from bankruptcy.

Let us define the proportion η(τ,κ) of the world countries in bankruptcy at the crisis stage τ for the bankruptcy threshold κ. Here, η=0 if no countries are in bankruptcy, and η=1 if all the Nc countries and territories are in bankruptcy. For a given bankruptcy threshold κ, let us also define the cost of the crisis up to the end of the contagion stage τ

$$ C\left(\kappa,\tau\right)=\sum_{c\in\bigcup\limits_{\tau'=0}^{\tau}\mathcal{B}_{\tau'}}\sum\limits_{\begin{array}{l} p\in\tilde{\mathcal{P}}\\ \text{(model A)}\\ \text{or}\\ p\in\mathcal{P}\\ \text{(model B)} \end{array}} V_{cp}. $$
(7)

The value of C(κ)=C(κ,τ) gives the total cost of the crisis, i.e., it gives the total volume of all the non accomplished commercial exchanges due to the successive bankruptcy of countries during the crisis contagion.

Results

Phase transition of the crisis contagion

The crisis contagion in the 2016 WTN is observed in Fig. 2 where the fraction η of countries which go to bankruptcy is displayed as a function of the crisis contagion stage τ and of the bankruptcy threshold κ. We clearly see a transition from a regime of contained contagion for κ>κc to a regime of global contagion for κ<κc. The Brin & Page original damping factor value, i.e., α=0.85, leads to a less frank transition (Fig. 2, second row) than the α=0.5 value which exhibits an “all or nothing” transition at κc (Fig. 2, first row). We note also that the critical bankruptcy threshold is, for α=0.5,κc≃0.15 (model A) and κc≃0.175 (model B), and, for α=0.85,κc≃0.18 (model A) and κc≃0.24 (model B). For a given bankruptcy threshold κ, the more α is low, the more the contagion is able to spread all over the WTN. This explain that for α=0.5 the transition is more abrupt and the critical bankruptcy threshold κc is lower than for α=0.85. The model A is more realistic than the model B since a country in bankruptcy still needs to import vital commodities, as petroleum and gas, in order to support its industry which in return will provide commodities to export. For low κ, the model B leads to a more global contagion crisis (η≃1) than the model A since the latter model indirectly protects countries which are petroleum and/or gas exporters.

Fig. 2
figure 2

Fraction of bankrupted countries for the 2016 WTN. Fraction η of countries went to bankruptcy up to the τth stage of the crisis contagion as a function of the bankruptcy threshold κ. For the first column, once a country goes to bankruptcy, it is prevented to import products with the exception of petroleum and gas (model A). For the second column, once a country goes to bankruptcy, it is prevented to import any product (model B). The first (second) row corresponds to a damping factor α=0.5 (α=0.85). The evolution of the fraction of bankrupted countries is monitored by the PCTB (4) (first and second rows) and by the ImportRank-ExportRank balance (5) (third row). The insets show the corresponding fraction η of bankrupted countries in the (τ,κ) plane. Dark red corresponds to the case where all the countries went to bankruptcy (η=1), and dark blue to the case where all the countries are safe (η=0)

We also checked the robustness of the phase transition if the countries are allowed to recover from bankruptcy after Δτ crisis stages. Hence, in the case 2016 WTN, model A, α=0.5, corresponding to the first row / left panel of Fig. 2, and allowing bankruptcy recovery after Δτ=1, 2, and 4, we still observe a phase transition at κc≃0.15 (the transition being sharper as Δτ increases). In the following, we consider the case Δτ, i.e., we do not consider the possible recovery from bankruptcy that could be the subject of further detailed studies.

Let us use the ImportRank and the ExportRank, and consequently, the normalized import-export trade balance \(\hat {B}_{c}\) (5), to monitor the crisis contagion. In this case, the third row of Fig. 2 shows the fraction η of countries in bankruptcy as a function of the bankruptcy threshold κ. We observe that for any κ, more than a third of the countries go to bankruptcy already at the τ=0 crisis stage. Moreover, there is no crisis containment for κ>κc, since for a bankruptcy threshold κ just above the critical value κc half of the world countries and territories are in bankruptcy already at the stage τ=0 of the contagion. This ImportRank-ExportRank description is less suitable than the PageRank-CheiRank description to follow the crisis contagion since the transition around κc≃0.2 in Fig. 2 (third row) is less frank. Indeed, for model A, at the transition, η goes from 0.5 to 0.9 (Fig. 2 third row, left column), while η goes from 0.15 to 0.9 for the PageRank-CheiRank description (Fig. 2 first row, left column). For a given country c, the ImportRank-ExportRank description is based only on the relative balance between the total export and import volumes. Contrarily to the PageRank-CheiRank description, it does not take into account the relative centrality of the country c in the WTN. Otherwise stated, it does not take account of the possible strong indirect economical relations between countries.

In the following, we analyze the crisis contagion in the WTN for different years using the PageRank-CheiRank trade balance Bc with the model A and with α=0.5. In Fig. 3, for all the considered years, 2004, 2008, 2012, and 2016, we observe a similar phase transition from a regime of contained crisis contagion (κ>κc), for which the crisis only spreads over a small fraction (less than 10%) of the countries, to a regime of global crisis contagion (κ<κc), for which the crisis spreads over about 90% of the countries. For these years, the transition occurs at about the same critical bankruptcy threshold κc≃0.14−0.175. Some peculiarities are present for the 2016 WTN, for which, we observe an irregular and non monotonous profile in the [0,κc] region. This is due to the interplay between the WTN rewiring occurring at the successive stages of the crisis contagion and the relative protection of the main petroleum and gas exporters since even countries which went to bankruptcy can import these commodities from these suppliers. Such irregular profile is absent for the less realistic model B which exhibits an even more sharper phase transition than the model A (see Additional file 1 - Fig. A1). As an example, for the 2016 WTN, with the model A, Russia never goes to bankruptcy in the bankruptcy threshold interval κ<0.04, it goes to bankruptcy in the κ∈[0.04,0.11] interval, it stays safe for κ∈[0.12,0.13], it goes to bankruptcy at κ=0.14, then it stays safe for κ>0.14. The intervals for which Russia goes to bankruptcy are concomitant with the bumps and the peaks observed for the 2016 WTN in the region κ<κc (Fig. 3). In the model A, the fall of Russia is responsible for a almost complete WTN crisis.

Fig. 3
figure 3

Fraction of bankrupted countries for the WTN of 2004, 2008, 2012, and 2016. Fraction η of countries went to bankruptcy up to the τth stage of crisis contagion as a function of the bankruptcy threshold κ. The crisis contagion has been computed for the WTN of 2004 (top left), 2008 (top right), 2012 (bottom left), and 2016 (bottom right). Once a country goes to bankruptcy, it is prevented to import products with the exception of petroleum and gas (model A). The damping factor is α=0.5

As seen in Fig. 3, in the κ∈[0,κc] region, about 90% of the countries go to bankruptcy. The countries which remain safe at a bankruptcy threshold κ=0.1 (model A) are given in the Additional files 2 (Table A1) for 2004, 3 (Table A2) for 2008, 4 (Table A3) for 20012, and 5 (Table A4) for 2016. Most of these countries are petroleum and/or gas exporters, and, with the exception of 2016, for some of them petroleum and gas constitute the major volume of their exports, e.g., Nigeria (in 2004), Saudi Arabia (in 2004), Russia (in 2004, 2008, 2012), East Timor (in 2008). Also many of these remaining safe countries are islands, many of them being petroleum and gas exporters. We suppose that the other islands are peripheral in the WTN network and/or belong to some insulated minor trade exchange networks insensitive to the contagion. For the year 2016, for κ=0.1, the list of remaining safe countries is short, and even countries with a strong component of petroleum and gas in their export volume go to bankruptcy.

The total number of crisis contagion stages, τ, as a function of the bankruptcy threshold κ, also exhibits a phase transition (see Fig. 4 left) from a regime (κ<κc) for which τ rapidly increases with κ, from τ≃4 for κ=0 up to τ≃12−16 for κ=κc, and a regime (κ>κc) for which the crisis contagion stops after few stages, τ≲5. In the latter regime, it is not infrequent that the contagion even stops after τ=1 or 2 stages. We clearly observe that, for all the considered years, we obtain the same curve τ vs. κ/κc whether we use the model A or the model B.

Fig. 4
figure 4

(Left) Total number τ of crisis contagion stages as a function of the bankruptcy threshold κ and (right) total crisis cost C as a function of the bankruptcy threshold κ. The total cost C is defined according to the formula (7), i.e., C(κ)=C(κ,τ). We use the WTN for years 2004 (black), 2008 (red), 2012 (blue), and 2016 (green). Solid lines correspond to the model A: once a country goes to bankruptcy, it is prevented to import products with the exception of petroleum and gas. Dashed lines correspond to the model B: once a country goes to bankruptcy, it is prevented to import any product. The lines allow to adapt an eye between the dots which represent the numerically computed values. The total amount of the World Trade transactions is V=9.43×1012 USD in 2004, 1.68×1013 USD in 2008, 1.85×1013 USD in 2012, and 1.62×1013 USD in 2016. The damping factor is α=0.5

The phase transition is also clearly seen in the evolution of the total crisis cost C (7) as a function of the bankruptcy threshold κ (Fig. 4 right). For κ<κc, the cost of the crisis is about 80-90% of the total USD volume V exchanged between the countries in the WTN. By contrast, for κ>κc, the total cost of the crisis is less than 5% of V. Such a graph could help any supranational agency to limit the cost of a crisis induced by the application of austerity policies to indebted countries. Indeed, the calculus of the PCBT (4) allows to select a bankruptcy threshold limiting the crisis cost below a given value. Eg, for \(\kappa \gtrsim 1.5\kappa _{c}\), the cost of a crisis is less than the hundredth of the total volume exchanged. We also observe that the curves for all the considered years, whether we use the model A or the model B, fall into practically the same curve. Differences between different years are visible for \(\kappa \gtrsim 1.5\kappa _{c}\). In this region, going from κ=3.5κc to κ≃1.5κc, the stairway structure of the curves is due to the successive sudden bankruptcies of countries at specific bankruptcy thresholds κ. These bankruptcies are dependent of the details of the WTN structure for the considered years. Let us also note that, in the region κ<κc, the total cost of the crisis is about 80-90% of the total USD volume V exchanged, the remaining 10-20% of the volume V still flows through the WTN since exports to the remaining 10% of the countries are still allowed even for countries in bankruptcy.

In the following, we analyze with details the role of the countries in the crisis contagion.

Geographical distibution of the PageRank-CheiRank trade balance

In Fig. 5, we present the PCTB for each country. As an example, let us consider that the bankruptcy threshold is κ=0.1. Hence, countries with Bc<−κ=−0.1 are the seeds of the crisis contagion. Among these countries, there are many African countries including some Sub-Saharan countries, i.e., Mali, Niger, Burkina-Faso, DRC, Zambia (all considered years), some Central American countries including Mexico (2004, 2008, 2016) and the Dominican Republic (all considered years), some Middle East countries including Israel (2004, 2012, 2016), Egypt (2012), Syria (2004, 2012), Irak (2004, 2008, 2012), and Saudi Arabia (2008), some Asian countries including Afghanistan and Pakistan (all considered years except Pakistan for 2008), Papua New Guineas (2012), Bangladesh (2012), and Philippines (2016), East Europe countries including Poland (2004, 2008), Slovakia (2004, 2008, 2016), the successor states of the former Yugoslavia (alternately during the considered years), Greece (2008), and Georgia (all considered years). More globally, countries with Bc≲0 will certainly go to bankruptcy at the very first stage of the crisis contagion. These countries, with magenta, red, and yellow colors in Fig. 5, are systematically the whole African continent excepting Morocco and South Africa, the Middle East, Laos, Cambodia, Papua New Guineas, the Central America and the Caribbean region, the northern South America, Bolivia, and Paraguay. Also, we note that North American countries, e.g., US (excepting for 2012), West European countries, e.g., France, UK, Ireland, Switzerland, and East European countries have Bc≲0. Contrarily, the five BRICS appear to be among the most virtuous countries, with 0.1≲Bc≲0.4.

Fig. 5
figure 5

Geographical distribution of the PageRank-CheiRank trade balance Bc at the contagion stage τ=0 with the bankruptcy threshold κ=0.1. For each year, at the contagion stage τ=0, the countries colored in red (blue) have the most negative (positive) balance Bc>−κ. Color categories are obtained using the Jenks natural breaks classification method (Wikipedia contributors 2020). Countries going to bankruptcy at contagion steps τ=0 are colored in magenta. The damping factor is α=0.5

Let us define for each country the maximum bankruptcy threshold κmax at which a country goes to bankruptcy at least at the final stage of the crisis contagion. Otherwise stated, for a κmax value associated to a given country c, this country do not go to bankruptcy for κ>κmax, i.e., Bc is always greater than −κ at any stage of the contagion process for any κ>κmax. Figure 6 shows the geographical distribution of κmax. For the model A, we observe that Russia is the less affected country by the crisis for the years 2004, 2008, and 2012 (for Russia, κmax≃−0.2, i.e., at any crisis stage τ,Bc>−κ, ∀κ>−0.2). Also, for 2004, Saudi Arabia, Nigeria, and Kenya are among the safest countries with κmax≲0.1 (i.e., these countries have \(B_{c}>-\kappa,\; \forall \kappa \gtrsim 0.1\)). The fact that the four just above cited countries, for the above cited years, are the safest countries is due to their status of big petroleum and/or gas exporter. Russia has even κmax<0, this means that, for the years 2004, 2008, and 2012, Russia occupies a peculiar protected position in the WTN.

Fig. 6
figure 6

Geographical distribution of the maximum bankruptcy threshold κmax at which a country goes to bankruptcy at any step of the contagion. Countries with the highest (lowest) κmax are colored in red (blue). Color categories are obtained using the Jenks natural breaks classification method (Wikipedia contributors 2020). Here, once a country goes to bankruptcy, it is prevented to import products with the exception of petroleum and gas (model A). The damping factor is α=0.5. At this scale, small sized islands are not visible. For information, the blue colored countries for the 2016 WTN are the following islands BV, IO, CC, HM, YT, AN, PN and GS (not visible in the world map)

For each considered years in Fig. 6, we observe a peak in the country distribution at κmax just below κc≃0.175 (2004), 0.15 (2008), 0.14 (2012), 0.15 (2016). Such a country distribution can be used to precisely determine the critical bankruptcy threshold κc.

The most vulnerable countries (with \(\kappa _{\text {max}}\gtrsim 0.2\)) are Central and South American countries (2004, 2008, 2016), including Mexico (2004, 2008, 2016), Guatemala (2004, 2008, 2016), El Salvador (2004, 2016), Honduras (2004), Costa Rica (2004), Dominican Republic (2004, 2008), Venezuela (2008, 2012), Guyana (2016), and Suriname (2016), Sub Saharan countries, including Mali (2004, 2008, 2012, 2016), Burkina Faso (2004, 2008, 2012, 2016), Togo (2004), Benin (2004, 2016), Niger (2004, 2016), RDC (2004, 2008, 2012, 2016), Liberia (2008), Ghana (2008, 2012, 2016), Nigeria (2008), Sudan (2008, 2012), Uganda (2008, 2012, 2016), Rwanda (2008, 2012, 2016), Tanzania (2008, 2012, 2016), Zambia (2008, 2012, 2016), Zimbabwe (2008, 2012, 2016), Malawi (2008, 2012), Senegal (2012, 2016), Egypt (2012), Republic of Congo (2012), Angola (2012), Burundi (2012, 2016), Kenya (2012, 2016), Mozambique (2012, 2016), Bostwana (2012, 2016), Nigeria (2016), Ethiopia (2016), Algeria (2016), and Namibia (2016), Middle East countries, including Syria (2004), Iraq (2004), Georgia (2004), Egypt (2012), Israel (2016), Jordan (2016), and Saudi Arabia (2016), few European countries, Slovenia (2008), Bosnia-Herzegovina (2008) and Serbia (2008), and Asian countries, including Pakistan (2004, 2008, 2016), Afghanistan (2008, 2016), and Philippines (2016), and Papua New Guineas (2012). As a summary, for the considered year, the most fragile countries in the WTN are primarily many Sub Saharan countries, Central and South American countries, and some Middle East and Asian countries.

The fact that bankrupted countries are prevented to import products implies that, during the contagion process, more and more products can not be exchanged. As an example, we show in Fig. 7, for a bankruptcy threshold κ=0.1, the fraction of products which, at the end of the contagion, can not be exported by countries by lack of importers. For the 2008 WTN (Fig. 7, left column), we observe that most of the countries of the Western world have less than 17% of their exports blocked due to the crisis contagion. This means that at the end of the contagion process, these countries have at least one importer for almost each of their product. The same situation is found for some former USSR countries or satellites, such as Ukraine, Belarus, Moldova, Bulgaria, and Kazakhstan, some Middle Eastern countries, such as Turkey, and Asian countries, such as China, India, Thailand, Taiwan, South Korea, Japan, Singapore, and Indonesia. Although Russia do not go to bankruptcy during the crisis contagion at κ=0.1, nevertheless more than 87% of its exports have been indirectly prevented by the crisis contagion. Russia remains safe in the 2008 WTN crisis contagion thanks to petroleum and gas exports which correspond to 60% of the total Russian exports and which can be imported by any country in the model A. For the 2016 WTN (Fig. 7, right column), the crisis is more severe as most of the countries have more than 90% of their exports prevented. Only UK, Poland, South Africa, and New Zealand have less than 30% of their exported products blocked.

Fig. 7
figure 7

Fraction of products which can not be exported by countries by lack of importers. The color is function of the fraction of products which can not be exported by countries. Countries in blue can still export most of their products. Countries in red can almost no more export any of their products. Color categories are obtained using the Jenks natural breaks classification method (Wikipedia contributors 2020). The computed data concern the 2008 and 2016 WTNs with κ=0.1 at τ and α=0.5. Once a country goes to bankruptcy, it is prevented to import products with the exception of petroleum and gas (model A)

Crisis contagion networks

Let us define a network of causality where a country c points to a country c, if the country c goes to bankruptcy at the crisis contagion stage τ and the country c goes to bankruptcy at the next stage τ+1. Otherwise stated, the bankruptcy of the country c follows right away the bankruptcy of the country c. In Fig. 8, we show the network of crisis contagion causality for 2004, 2008, 2012, and 2016 WTNs and for a bankruptcy threshold κ=0.1. A country is colored according to the crisis contagion stage at which it goes to bankruptcy, from red for τ=0 to blue for τ=τ. The direction of the links is given by the bending of the links, i.e., if the country c points to the country c following a bent path in the counterclockwise direction, cc, then the country c goes to bankruptcy right after the country c. In the other hand, if the path direction from c to c is clockwise, cc, then the country c goes to bankruptcy right before the country c. The width of the link from country c to country c is proportional to the prevented export volume from country c to country c, i.e., \(M_{cc'}=\sum _{p\in \tilde {\mathcal {P}}}M^{p}_{cc'}\). The links are colored according to the color of the source. Consequently, the patients zero of the crisis are the reddish countries and the very first banned trade exchanges are the reddish links. For all the considered years, the seeds of the crisis are mainly countries from Sub Sahara, Middle East, Central America, and Eastern Europe. We can observe only very few Asian countries as seeds of the crisis. The directions of the very first banned trade exchanges are meaningful. For the 2004 WTN, bunches of them come from Africa, Middle East, and Central America to Europe. Another bunches come from Eastern Europe and Central America to North America. Thus the fall of the US, which occurs at the second stage of the crisis contagion, stems mainly from the failures of Mexico, and Central American countries and East European countries. Once fallen, US drives to bankruptcy Western European countries and ignite the crisis in Asia where Japan and South Korea go to bankruptcy at the third stage of the contagion. The failure of these latter countries then induce the failure of China and Australia. A similar contagion scheme occurs in the 2008 WTN. For the 2012 WTN, the US go to bankruptcy at the third stage of the crisis contagion after the failure of Mexico, South Korea, Singapore, and France. Singapore and South Korea propagate the crisis to Japan. For the 2016 WTN, the US also fall at the third contagion stage being impacted by the previous failure of Singapore, Great Britain, and France. Then, the failure of the US directly impacts China, South Korea, and Japan. An animation shows the contagion dynamics for the 2016 WTN (see Additional file 6 – Evolution of the crisis contagion in the 2016 WTN).

Fig. 8
figure 8

Crisis contagion network for years 2004, 2008, 2012, and 2016. The colors of country nodes range from red, for countries going to bankruptcy at stage τ=0, to blue, for countries going to bankruptcy at stage τ=τ. White nodes corresponds to countries which never go to bankruptcy. The direction of the link between two countries A and B is given by its curvature. If A points to B following the bent path in the counterclockwise direction (A ⌣B) then A went to bankruptcy at the stage just before B, otherwise, i.e. (A ⌢B), B went to bankruptcy at the stage just before A. The color of the link is the color of the node source. The width of the link is proportional to the export volume from the target country to the source country in the unmodified WTN. Here, once a country goes to bankruptcy, it is prevented to import products with the exception of petroleum and gas (model A). The bankruptcy threshold is κ=0.1 and the damping factor is α=0.5

Let us focus on the greatest volume trade exchanges between countries. Figure 9 shows the hierarchy of the crisis contagion causality for imports greater than 1010 USD (as a complement, Additional file 7 - Fig. A2 shows the same data but geographically distributed).

Fig. 9
figure 9

Crisis contagion network with a hierarchical layout for years 2004, 2008, 2012, and 2016. Only imports greater than 1010 USD are represented. Countries going to bankruptcy at the same contagion step τ are aligned in the same row. From bottom (red country nodes) to top (blue country nodes), the rows are associated to contagion step from τ=0 to τ=3 for 2004, τ=4 for 2008, τ=5 for 2012 and 2016. The width of the link going from a country c which goes to bankruptcy at the stage τ to a country c which goes to bankruptcy at the stage τ=τ+1 is proportional to the volume usually imported by country c from c. Here, once a country goes to bankruptcy, it is prevented to import products with the exception of petroleum and gas (model A). Colored zones gather countries from the same continent (green for European countries, blue for American countries, and pink for Asian countries). The bankruptcy threshold is κ=0.1 and the damping factor is α=0.5

For the 2004 WTN, among the big exporters, Mexico and Israel contribute to the fall of the US. From the fall of the US, one of the main paths of contagion can be followed, US → JP → (Asian countries and Australia). The bankruptcy of all the European countries are due to the conjugated effect of the fall at stage τ=1 of the US and of part of the main European economies. Bankruptcies of the European countries, and also of South Korea, contribute then to the fall of the Asian big exporters (such as China) and of Australia, which, as stressed before, are the last countries to go to bankruptcy. Let us note that France and Great Britain also contribute to the failure of Japan.

For the 2008 WTN, we obtain a similar scenario excepting that Venezuela and Saudi Arabia, in addition to Mexico, lead the US to the bankruptcy. Also, Eastern Europe countries, Poland and Slovakia, are the seeds of the contagion in Europe. We can observe that the BRIC, i.e., Brazil, India, and China, are among the countries which are the last affected by the contagion. This remark is also true for 2012 and 2016 WTNs. Russia, which is a petroleum and gas exporter, is never affected by the contagion excepting for the 2016 WTN.

For the 2012 WTN, at the crisis stage τ=0 and τ=1, there are several sources of contagion: Central America with Mexico, Panama and Costa Rica, Europe with Austria, France, and Slovakia, Middle East with Iraq and Turkey, and Asia with Singapore and South Korea. The crisis is already present, at the very first stages of the contagion, in all the continents excepting Oceania. At stage τ=2, the US are mainly affected by the previous fall of some Central American countries, some Asian countries and France. Then the US contributes to propagate the crisis to the rest of the world. The crisis in Asia is also brought by the fall of Japan induced by the bankruptcy of Singapore and South Korea, and in a somewhat lesser importance by the bankruptcy of France. The bankruptcy of the rest of European countries follows mainly the fall of France, and Austria, and follows secondarily the fall of Turkey, South Korea, Singapore, and Mexico.

For the 2016 WTN, the European countries ignite the crisis with Slovakia as seed of the contagion. The crisis propagates to North American countries and then to Asia and the rest of the world. We note that in addition to European countries Singapore is also in bankruptcy at the early stages of the contagion and contributes to the fall of the US. Here, Russia is the last country going to bankruptcy.

Conclusion and discussion

The Google matrix analysis of the world trade network allows to probe the direct and indirect trade exchange dependencies between countries. Unlike the simple accounting view obtained from the usual import-export balance, relying on the total volumes of exchanged commodities between countries (5), the PageRank-CheiRank trade balance (PCTB) (4) allows to take account of the long range inter-dependencies between world economies. The WTN crisis contagion model is build upon the iterative measure of the PCTB for each country. Once a country have a PCTB below a threshold −κ, it is declared in a bankruptcy state in which it can no more import commodities excepting some vital one for the industry, i.e., petroleum and gas. This state corresponds either to the fact that a country with a very negative trade balance have not enough liquidity to import non essential commodities, or to the decision of a supranational economic authority trying to contain a crisis by placing an unhealthy national economy in bankruptcy. The bankruptcies of economies with PCTB less than −κ induce a rewiring of the world trade network which possibly weaken other economies. In the phase corresponding to a bankruptcy threshold κ>κc, the crisis contagion is rapid and contained since it affects only less than 10% of the world countries and induces a total cost of less than 5% of the total USD volume exchanged in the WTN. This total cost of the crisis drops exponentially with the increase of κ. In the phase corresponding to a bankruptcy threshold κ<κc, the cascade of bankruptcies can not be contained and the crisis is global, affecting about 90% of the world countries. The bankruptcy threshold κ is the order parameter of the phase transition. In the global crisis phase (κ<κc), at the first stage (τ=0) of the contagion, myriads of countries with low exchanged volume (ie, low import and export volumes) go to bankruptcy. These countries belong mainly to Sub Saharan Africa, Central and South America, Middle East, and Eastern Europe. In the next stage of the crisis contagion, the conjugated effect of the bankruptcies of these countries contribute to the fall of big exporters, such as the US or Western European countries. As an example, for 2004, 2012, and 2016 WTNs, the bankruptcy of France at the contagion stage τ=1 is solely due to the failure of many low exchanged volume countries, which, here, individually import from France a volume of commodities less than 1010 USD. Otherwise stated, France failure is caused by the failure of many small importers. Great Britain is a similar case for the 2004, 2008, and 2016 WTNs. Among the big exporters (ie, with a exchanged volume greater than 1010 USD), European and American countries are the sources of the crisis contagion. The gates from which crisis enters Asia are usually Japan, Korea, and Singapore. Generally, Asian countries go to bankruptcy at the end of the crisis contagion, with China, India, Indonesia, Malaysia and Thailand, being, with Australia, usually the last economies to fall. We also observe that failures of the four BRIC occur during the last stages of the crisis contagion.

As a future development of the presented WTN crisis contagion analysis, it would be interesting to study the cascades of country bankruptcies induced by a sharp increase of the price of a given commodity. Indeed, within our model, such an increase of the price of petroleum and/or gas would highlight the structural vulnerability of the countries to an energy crisis contagion.