Systemic liquidity contagion in the European interbank market

Systemic liquidity risk, defined by the IMF as"the risk of simultaneous liquidity difficulties at multiple financial institutions", is a key topic in macroprudential policy and financial stress analysis. Specialized models to simulate funding liquidity risk and contagion are available but they require not only banks' bilateral exposures data but also balance sheet data with sufficient granularity, which are hardly available. Alternatively, risk analyses on interbank networks have been done via centrality measures of the underlying graph capturing the most interconnected and hence more prone to risk spreading banks. In this paper, we propose a model which relies on an epidemic model which simulate a contagion on the interbank market using the funding liquidity shortage mechanism as contagion process. The model is enriched with country and bank risk features which take into account the heterogeneity of the interbank market. The proposed model is particularly useful when full set of data necessary to run specialized models is not available. Since the interbank network is not fully available, an economic driven reconstruction method is also proposed to retrieve the interbank network by constraining the standard reconstruction methodology to real financial indicators. We show that the contagion model is able to reproduce systemic liquidity risk across different years and countries. This result suggests that the proposed model can be successfully used as a valid alternative to more complex ones.


Introduction
The global financial crisis has shown how fundamental is the role of liquidity risk in the stability of the financial system. Recently, an IMF Working Paper on macroprudential stress testing has pointed out that liquidity shocks can rapidly manifest and impact the whole financial system, while bank solvency concerns tend to take more time to build up (Jobst et al., 2017). On the same line, the Bank of England  draws attention on the fact that "although the failure of a financial institution may reflect solvency concerns, it often manifests itself through crystallisation of funding liquidity risk". Likewise, the ECB (ECB, 2018) has recently released a paper on the monitoring framework for systemic liquidity and the use of macroprudential liquidity tools in the banking system of the European Union. However, despite its fundamental relevance in macroprudential policy and financial stress analysis, Figure 1: Channels of liquidity risk in the funding market. Source: Bank of England  5. Counterparty credit risk.
In this paper, we will base the model mostly on funding liquidity risk, so we will not touch channel 5 and we will consider market liquidity as an amplification mechanism rather than a contagion channel. Based on this argument, we use compartmental models that allow the simplification of the contagion dynamics so that few assumptions on the contagion and transmission parameters are required. Those models are particularly useful when the full set of data necessary to run more specialized and sophisticated models is not available (Cont et al., 2019;Greenwood et al., 2015;Manna and Schiavone, 2012;Smaga et al., 2015). In fact, effective contagion models require not only the real underlying network but also their complexity demands balance sheet data with sufficient granularity and other economic data which are hardly available. When the real topology of the interbank network is not available, these missing data have to be compensated using reconstruction techniques, based on the principles of statistical mechanics. We have thus based the reconstruction of the interbank market structure on the only available information for the network, i.e. aggregated data of banks' exposure provided by Bankscope database (Battiston et al., 2016), implementing techniques already developed in previous works (Cimini et al., 2015b;Squartini et al., 2017Squartini et al., , 2018. We further develop a new reconstruction technique by imposing macroeconomic constraints to the standard reconstruction methodology. In particular, we used as constraints the volumes of inter and intra-country exposures provided by the BIS database 1 . In this way, the lending relationship is not only driven by the amount of the aggregate interbank assets and liabilities but it also takes into account the real preferential relationship between countries. It is in fact observed in the data that volumes exchanged by banks of the same country account for most of the interbank lending volume, and this preferential lending is retrieved by the proposed reconstruction method. The paper aims to assess systemic liquidity risk defined by the IMF (IMF, 2011) as "the risk of simultaneous liquidity difficulties at multiple financial institutions", which asks for both a contagion mechanism and an interbank topology. We tackle the problem by proposing a tool which is easy to implement and use but still being flexible and containing financial information, a contagion mechanism and underlying market topology. In particular, the model is built in order to reflect both the funding and market liquidity in the mechanics and amplification of the contagion. This is done via considering also node's properties, such as the banks' country, its size, the liquidity resilience in addition to the heterogeneities due to the different volumes of money exchanged in the interbank market. The model builds on the epidemiological-like models discussed in Brandi et al. (2018) and improves on it adding node-specific information. We show that the differentiation of banks' susceptibility and contagiousness, as well as the network topology, play a non-negligible role in the spread of liquidity distress. In the European interbank market, systemic funding liquidity risk started to set up during the global financial crisis but particularly escalated during the European sovereign debt crisis. Our dataset covers the period 2006-2013 so it is not possible to understand if the systemic liquidity risk we found falls back to pre-crisis levels. The rest of the paper is structured as follows. Section 1 introduces the epidemic-like contagion processes implemented, section 2 presents the data and the network reconstruction technique used to build the network while section 3 reports the results of the network reconstruction and of the liquidity-driven dynamics. Section 4 is devoted to final remarks and conclusions.

Contagion process
The recent global crisis has shed light on the importance of the interconnection among players in the financial systems to assess their systemic risk. This led to the new paradigm "too-interconnectedto-fail" to emerge (Battiston et al., 2012b;Haldane, 2009;Toivanen, 2013) alongside the "too-big-tofail". Network representation (Catanzaro and Buchanan, 2013;Haldane, 2013) allows to clearly depict and model the different interactions between the financial institutions to deeply understand complex phenomena as financial crisis (Hüser, 2015). Many studies (Freixas et al., 2000;Iori et al., 2006;Rochet and Tirole, 1996) focus on assessing the systemic risk in the interbank market network, i.e. on banks' direct exposures and connections. The interbank market network is, in fact, the first line of defence against liquidity and credit shocks . Its role is to quickly provide liquidity to banks through interbank lending. During the crisis, however, this market has proved its fragility (Fricke and Lux, 2015) and inability to give to the system the liquidity needed (Allen et al., 2014;Brunnermeier, 2009;Gabbi et al., 2015), because of liquidity hoarding caused by financial turmoil and by fear of contagion (Arinaminpathy et al., 2012;Brandi et al., 2018;May and Arinaminpathy, 2009;Smaga et al., 2015;Toivanen, 2013). It is also shown (Cifuentes et al., 2005;Upper, 2011) as bank failures due only to losses in the interbank market have not been observed, maybe because liquidity risk can generate solvency issues and then be masked or because of government interventions. 2 However, exploring and assessing the systemic risk via the interbank market is important to take into consideration its interaction with other possible channels of contagion (Hüser, 2015).
Several sources and dynamics of contagion have been identified and analysed in order to assess systemic risk and resilience. A seminal work (Gai and Kapadia, 2010) has shown the robust yet fragile tendency of the financial network whereby even a low probability of contagion could cause a disruptive crisis. Besides, this study has pointed out as identical (same magnitude) financial shocks may lead to very different outcomes because of the crucial role played in the shock spreading by the complex topology of the connections between financial institutions. Much attention is devoted by both regulators and by academics to assess if such a complex and interconnected interbank structure lessens or enhances the contagion spreading (Hałaj and Kok, 2013;Nier et al., 2007). From the point of view of a single bank, the aim is to diversify and then to increase the number counterparties in order to dampen its risk of contagion. However, considering all the financial institutions and their risk containment strategies, the systems turn to show increased complexity and interconnectivity (Glasserman and Young, 2016). Network connections have thus both positive effects (risks' diversification) but also they create channels through which shocks can spread. In addition, before the crisis, banks have shown the tendency to increase their debt levels and their exposure to derivatives and securitizations. The interplay of all of these factors has affected the stability of the financial system (Glasserman and Young, 2016;Upper, 2011) that have become so much prone to shock propagation and then to unexpected failure knock-on effects. Starting from the pioneering models of Eisenberg and Noe (2001);Furfine (2003), an increasing stream of literature have focused on the development of new dynamics and metrics to describe the spread of financial distress over the network (Amini et al., 2016;Bardoscia et al., 2015Bardoscia et al., , 2017Battiston et al., 2012b;Brandi et al., 2018;Cifuentes et al., 2005;Cimini and Serri, 2016;Cimini et al., 2015a;Diamond and Rajan, 2001;Elsinger et al., 2013;Hurd et al., 2016;Kapadia et al., 2012;Krause and Giansante, 2012;Nier et al., 2007;Serri et al., 2017). The aim of these models is not only to assess the systemic risk but also understand which features and how their interplays are involved in the system robustness and resilience against shock spreading. Our work is part of this context as its aim is to model the spread of financial distress over a network representing the interbank market, by means of an epidemiological-like model.

Epidemic contagion processes
Epidemiologist and financial policymakers, in a way, share a common interest in studying spreading phenomena and rely on models for the description of the contagion diffusion over the population considered. So, epidemic modelling, with its methods and results, could be adapted to describe the domino effect that could arise in the interbank market subject to financial shocks (Barrat et al., 2008;Keeling and Eames, 2005;Pastor-Satorras et al., 2015). The main idea is to adapt the well-known Susceptible-Infected compartmental model (SI model) in the framework of contagion so that liquidity and credit shocks propagate as an epidemic disease over the interbank market.
In the literature, epidemic-like contagion processes have been adapted to the interbank market in order to study and quantify the liquidity-driven (Brandi et al., 2018) and the credit-driven (Philippas et al., 2015;Toivanen, 2013) spread of financial distress. In this work, we focus on the infection due to banks' liquidity hoarding and the consequent counterparties' liquidity shortages, further enhancing such model by considering not only the links' heterogeneity but also nodes' features. In fact, each bank has different financial structure and operate in a specific country which also plays a central role in the contagion spreading and then systemic risk. As aforementioned, banks have not complete information on the financial structure of their counterparties, so, a contagion, through such direct exposures, is also driven by psychological aspects as the perceived counterparty risk and expectations. In order to overwhelm further this extended uncertainty, we have implemented stochastic compartmental models that add randomness to the possible contagion channels and to the propagation dynamics and outcomes.

Liquidity driven model
The interbank market allows banks temporarily short on liquidity to borrow money from other banks. The major part of these loans has an overnight duration so the borrower must repay the lender at the start of business the next day. These loans let the bank to temporarily meet reserve requirements and find additional liquidity without having to sell their assets. Usually, these liquidity shortcomings are longer than a night so the overnight loans need to be replaced by new debt. The system is thus subject to roll-over risk: distressed banks might not find in the interbank market the liquidity they need and then they are forced to sell assets, eventually also illiquid ones whose sale may trigger further losses (fire sales) (Brandi et al., 2018). Besides, if other banks perceive these troubles, they will hoard liquidity and this will induce another wave of liquidity shocks and then lead to a shrinkage of the volume exchanged in the interbank market.
Our contagion process is an adaption of the SIR (Susceptible-Infected-Recovered) model without considering the recovery state but instead two different infectious compartments, I 1 and I 2 . This is because the time-scale of the contagion spreading is supposed to be too fast with respect to the period required for an infected bank to recover from their liquidity problems. 3 Indeed, an infected bank remains contagious because the removal procedure needs longer times than the dynamics considered. In epidemiology, the system of equations describing the dynamics of this Susceptible-Infected model is given by: 3 If such a mechanism would be of economic relevance, the model would be easily adapted to an SIS (Susceptible-Infected-Susceptible) model, with a stochastic rate of recovery.
where s(t), i 1 (t), i 2 (t) are the fraction of individuals in the susceptible and infectious states at time t and is a scale parameter. The transition from a group to another is regulated by the contagion rate λ and the default rate µ. In the liquidity-driven model, we adapt this SI model into the EDB (Exposed-Distressed-Bankrupted) model. Exposed compartment corresponds to the susceptible one while both distressed and bankrupted correspond to two different infectious compartments. Exposed banks (hereinafter S) are those that have obtained the needed liquidity in the interbank market but they are also susceptible to contagion because their lenders may be distressed or bankrupted banks. They are thus healthy at the inception but the liquidity shortages of their counterparties could deprive them of the liquidity provision. When that happens, the contagion spreads to the exposed bank that goes into the distressed state and in turn becomes contagious for its counterparties. Distressed banks (hereinafter I 1 ) are those infectious due to their liquidity troubles and they could turn into the bankrupted state (hereinafter I 2 ) when these losses become overwhelming. In this work, we set = 1 so that the contagion rate of the distressed and bankrupted banks has the same value. 4 We further improve the SI model (eq. 1) considering node and link dependant contagion (λ) and bankruptcy (µ) rate, i.e. driven by lending relationship and lenders' state. In a previous work (Brandi et al., 2018), the rate of the contagion from a distressed/bankrupted bank i to an exposed j is defined as follows: where w ij is the transaction volume between the lender i and the borrower j. The economic rationale behind this contagion rate specification is that the funding shock is proportional to the amount of money i lend to j with respect to its total interbank lending volume. The bankruptcy rate µ, instead depends on the real-time state of the banks and it is defined as follows: where H(t) is the set of distressed and bankrupted lenders of i at time t. As defined, the bankruptcy rate is the fraction of liquidity that bank i needs that were previously lent by infectious banks. The idea is that bank's losses become overwhelming when they are so high that bank has no possibility to reallocate its assets to absorb quickly the losses. As it is defined (eq.2), the contagion rate does not take into account any nodes' feature. This would imply that the contagion rate is independent of bank features and the country in which they operate. Unlike previous models (Brandi et al., 2018), we take into account lenders' features as how risky they are and how suffering and indebted are the economies of their countries. Indeed, liquidity shocks are more probable for banks with higher liquidity risk operating in countries with a more fragile economy. To incorporate this feature on the contagion model, we redefine the contagion rate as follows: where γ i ∈ [−1, 1] is the node-term of the infected bank i. This functional form ensures that the contagion rate is always bounded between 0 and 1. In fact, as γ i tends to 1, the bank i contagion rate tends to 1 whilst in the case γ i tends to −1, the contagion rate diminishes 5 . In the neutral case with γ i = 0, we restore the functional form of the contagion rate already discussed in literature (Brandi et al., 2018), which we use as a benchmark model (BM). The node-term variable γ i that we take is a combination of a bank liquidity risk measure and a country-specific risk measure. Regarding the bank-specific liquidity risk, we compute the following liquidity indicator: where T i are the values of the i-th bank total assets and F i is a proxy of banks' liquid assets (hereafter LA). 6 The more a bank is fragile and much higher is the value of the liquidity indicator and the bank's infectiousness. In fact, when systemic risk comes into being, the LA plays the role of the first defence. If the liquidity indicator is high, the bank is likely to be more severely stricken than other banks in the market. Instead, with regards to the country-specific liquidity risk, we use as a proxy of it the bid-ask spread δ P computed on the 10-year government bonds, which is a popular measure of market liquidity given by: where B P is the bid price of the 10-year government bond, which is defined as the highest price that a buyer is willing to pay for the bond while A P is the ask price, that is the lowest price that a seller is willing to accept in order to sell the bond. A high value of this measure indicates lower liquidity, while a lower value signals higher liquidity in the market. The European Central Bank has recently released a paper on systemic liquidity (ECB, 2018) where they state that such a measure "shows a clear distinction between periods of stress and periods of more benign market conditions". For the current research, we computed the measure from the bid and ask prices 7 for government bonds for every country at the end of each year.
As mentioned in eq. 4, the node-term variable γ i should be in the interval [−1, 1]. In order to achieve this, different transformations are available. In this paper, we use the following transformation f (·): where x is a generic variable, m(x) is the median of x and x is the transformed variable. This transformation has the feature to be in the prescribed range and additionally it is symmetric around the median. The rationale behind the choice of such transformation is to discriminate between banks increasing the contagion effect from the ones which decrease it. We define the node-term γ i of the bank i as the rescaled version of the product of its country and bank liquidity risk. The motivation for using the product between the two terms is to have an amplification mechanism between the country liquidity risk and the bank liquidity structure so that a solid bank liquidity structure would imply a contraction of the country risk while a fragile structure would magnify it. 8 The bank i node-term γ i is therefore defined as: where δ P i is the bid-ask spread of the 10-year government bonds and Liq i is the liquidity indicator. This model could be further enhanced by considering a bankruptcy rate µ * which depends on nodes liquidity resilience. As we introduced the node-term γ to take into account the fragility of the infected banks, we follow the same reasoning for the bankruptcy rate. In particular, it is clear that the transition from the distressed to the bankrupted state does not depend only on banks' connectivity but also on bank's capabilities to absorb liquidity shocks, so we introduce a bank (node) specific indicator ν which the liquidity resilience of the distressed bank. The bankruptcy rate is so defined as follows: where the ν i ∈ [−1, 1] is the rescaled liquidity resilience indicator of the bank i that is defined as: where L i are the interbank liabilities and F i is a liquidity proxy of the bank i. This indicator is a proxy of the capabilities of a bank to absorb the liquidity shock in the interbank market using liquid assets. As for the contagion rate, the node-term ν i amplifies the default rate when ν i > 0 while decreases it when ν i < 0. This model specification is mostly relevant for regulatory activities since the asymptotic stage remains unchanged but what changes is the speed of the systemic default risk. In fact, knowing such resilience proxy for the whole system and a networked contagion mechanism, it can be used to tackle timely the systemic liquidity risk. However, as noted in the IMF Working Paper on macroprudential stress testing (Jobst et al., 2017), "liquidity crises are partly attributable to psychological factors or confidence effects". This feature of the market depends upon the state of health of the whole system and of specific banks which are in a state of distress. To account for this, we introduced a systemicdependent variable which measures the entire health of the system, in order to capture the increasing pressure on the interbank market when most of the banks are infected or defaulted. Hence, we introduce a further variable θ(t), which we call systemic risk multiplier that enters the equation for the contagion rate. This modification makes the contagion rate dynamic and dependent on the state in which the whole market is at each point in time. The parameter θ(t) measures the health of the entire system and is defined as follows 9 : where s(t), i 1 (t) and i 2 (t) are respectively the fraction of exposed, distressed and bankrupted banks, β 0 is a normalizing parameter in order to have proper bounds and β 1 , β 2 , β 3 are weights attributed to the specific banks state. The βs serve to increase or decrease the importance of one segment or another and so the dynamic of the systemic risk multiplier. To avoid irregular patterns, we set β 1 to unity and the other βs are set to the same value (β 0 = β 2 = β 3 = β * ) which relates to the importance attached to the distressed and bankrupted banks. Using this formulation, eq. 11 simplifies to: In fact, if β * is high (≥ 1) this translates to a financial system in which distressed and defaulted banks generate a negligible (or even positive) psychological effect to the other market participants. This will considerably slow down the contagion, which seems to be unrealistic from a behavioural economics point of view. On the other hand, if we set β * = 0, this generates a strong psychological effect even if only few banks are in distress or defaulted, which appears extreme. A reasonable value for β * should be in the range (0, 1), with small values having a stronger behavioural effect. This contagion specification, with the contribution of the parameter θ(t), results in: where γ i is the node-term introduced in eq. 4. By definition, the parameter θ ∈ [0, 1 + β * ]. This means that high (low) values θ > 1 (θ < 1) increase (decrease) the contagion rate and accelerate (slow down) the infection spreading. It is also possible to apply a transformation to θ such that the feedback effect is stronger or weaker with respect to the systemic risk.

Data
We use three different sources of data to our model. To take information on market liquidity, we use the data on bid-ask spread δ P available on Bloomberg and which provides information on two main aspects: the country riskiness and liquidity tightness (Iachini and Nobili, 2016). Secondly, we use the Bankscope dataset from which we compute the liquidity indicator Liq i and the liquidity resilience proxy ν. We finally use the BIS dataset to extrapolate interconnectedness between banks operating in different European countries and use those as constraints for the network reconstruction. We now briefly present these datasets and the reconstruction technique used.

Bid-ask spread data
The bid-ask spread is a widely adopted measure as a proxy of market liquidity in the marketplace and it is computed as in eq. 6 using the 10 years maturity government bonds. In normal time, the bid-ask spreads mostly synthesize market structural features, while during turbulent periods it becomes a very responsive indicator of liquidity tightness (market liquidity risk) (Iachini and Nobili, 2016;Kyle, 1985). In distress periods, a high spread indicates lower liquidity while a lower bid-ask spread indicates higher liquidity in the market. Since we have data from 2006 to 2013, we download the end of the year bid and ask prices from Bloomberg and compute the spread. Figure 2 shows the dynamic (in semi-log scale) of the bid-ask spread for the countries in our dataset. It clearly shows that some countries, the so called PIGS, are at the top of the graph for the whole period of consideration. This indicates that such countries hugely suffer from liquidity risk and they can cause, through network contagion, a systemic event.

Bankscope dataset
Data about the bilateral interbank exposures are unfortunately not available but we have access to Bureau Van Dijk Bankscope database (Battiston et al., 2016) that contains information on banks' aggregate exposures and on their balance sheets. We have access to the annual balance sheet of 97 anonymized European banks that were publicly traded between 2006 and 2013. 10 In particular, we have information on the country in which each bank is based, their interbank assets, interbank liabilities, total assets, equities, total customer deposits, total deposits, money market, short-term funding and derivatives. The 97 banks of the dataset represent 9 different EU countries: Austria (AT), France (FR), Germany (DE), Great Britain (GB), Greece (GR), Italy (IT), Portugal (PT), Spain (ES) and Sweden(SE). The number of banks for each country is reported in figure 3 and it is possible to notice that there is heterogeneity between countries. The fraction of total asset, interbank assets and liabilities per each country for 2007 and 2012 is reported in figure 4 and as is possible to notice, the higher number of banks of a specific country does not directly translate to an higher contribution of asset and liabilities in the market. In fact, Great Britain has higher figures relative to Italy, even if it is represented by less than half of banks. On the contrary, Germany seems to be under-represented in term of total assets. This is probably due to the fact that the biggest banks are not present in our dataset. 10 We use the subset of banks for which there was no missing information and whose country was represented by at least 4 banks. Total assets are used as the proxy for the bank size while the data on annual exposure in the interbank market (interbank assets and liabilities) defines the amount of money a bank lend or borrow from its counterparties. Since the actual interconnection between banks is not available, these data allow reconstructing the network topology using reconstruction methods that have been proved to have good performance in generating network close to the real one (Anand et al., 2018;Cimini et al., 2015b;Squartini et al., 2017). The amount of money exchanged in the interbank market during the crisis shrank while the total volume of total assets and total deposits, money market and short-term funding increased during the same period. On one side, the banks increasingly hoard liquidity to counteract the crisis and on the other, several liquidity injections are made by Central Banks to support the banking system and to avoid the breakdown of the whole system. Thus, during the crisis, the interbank market freezes (Fricke and Lux, 2015;Squartini et al., 2018). As explained in section 1, the contagion model takes into account some amplification mechanism. In particular, with the introduction of the node-term in both the contagion and default rates, we enrich the mechanical dynamic that the liquidity epidemics generate. Figure 5 depicts the liquidity indicator of eq. 5. Here it is possible to notice, most of the banks have a liquidity indicator of under 20, while a German bank has a value consistently over 40. This bank, if hit by a liquidity shock, could propagate the shock trough its neighbours because of the amplification mechanism the high liquidity indicator would have on the contagion rate.
On the contrary, the liquidity resilience indicator introduced in eq. 10 serves to accelerate or decelerate the default of a bank. In fact, if a bank has a liquidity buffer to sustain itself from an interbank indicator is always bounded between 0 and 1. Four banks have consistently high values so these ones are more inclined to default in case they are hit by a shock and consequently would be dangerous for the entire system.

BIS data
Cross-country interbank exposures are approximated by using consolidated banking statistics of the Bank for International Settlements (BIS). This statistical source provides information on banks' financial claims, covering the cross-border bank exposures of a country's banking sector with other countries. The idea is to incorporate countries' preferential lending relationship in the network reconstruction. This means that reconstructed networks have a block structure where each block represents the lending exposures between the two countries. BIS data give the annual amount of money that banks in country U lend to banks in country V , hereinafter exp U V . Considering the interbank market composed by the 9 countries in our dataset, the reconstruction takes into account the fraction of money borrowed and lent in each block when generates the links' weight between banks. 11 Due to several missing values in the BIS dataset during 2006-2013, we use the bilateral exposures of 2013-Q4, which is the one with fewer missing values. In this respect, we need to impute the values for the pairs GB-GB, ES-ES, IT-AT and PT-PT. For the first three pairs we use the lending exposures GB-GB of 2014-Q1 and ES-ES and IT-AT of 2014-Q4 while for the PT-PT lending exposure, we imputed the value so that this exposure is proportional to the ES-ES, which has similar (in terms of proportion) bilateral exposures with the rest of the countries. 12 In figure 7 we report the rescaled BIS data defined as follows: where exp U V is the BIS reported lending volume lent by banks of country U to banks of the country V . This figure shows two clear facts. First of all, it shows that there is a strong country preferential lending since banks tend to lend a higher amount of money to banks of the same country rather than to foreign banks. Secondly, there is a huge heterogeneity between foreign exposures among countries. Using this information in the reconstruction mechanism prevents the unconstrained reconstruction to be free of any economic structure. Having explained the issue of missing interbank market topology in our dataset, we now explain the state of the art in network reconstruction and our adaptation to our problem in which we impose financial specific constraints.

Network reconstruction
The problem of network reconstruction is widely studied and several algorithms are proposed in order to overcome the limits of the information available. In the case of the interbank market networks, the data available are usually the aggregated exposures, usually taken from the banks' annual balance sheet, or in addition the total/partial number of bank's connections (nodes' degree). An overview of the reconstruction models is presented in the reference Squartini et al. (2018). Maximum-entropy reconstruction techniques are based on the maximum entropy principle. In fact, they consist of the maximization of the Shannon entropy that is defined using the banks' bilateral exposures (w ij ) as random variables. In fact, this reconstruction method is constrained only by the banks' aggregated positions (nodes' strength in and out). This is the most reasonable assumption if we do not have any further data on market structure. In this way, it is assumed that banks distribute their lending as evenly as possible given the assets and liabilities reported in the balance sheets of all other banks and then this leads to a maximization of the number of a bank's lending counterparties. This implies that the reconstructed networks have a fully-connected structure (Cimini et al., 2015b). Maximum entropy (ME) techniques generate a fully connected network whilst real networks show rather a sparse topology. This disagreement leads then to a bad estimation of the resilience network properties. To overwhelm this limitation, it was developed other reconstruction techniques, the so-called fitness model.
In many real networks, in fact, is observed that the links' probability can be expressed in term of intrinsic node-specific features, i.e. fitnesses. The idea is that nodes with stronger fitnesses are more likely to be network hubs, i.e. they have higher connectivity.

Fitness models
Firstly introduced in Bianconi and Barabási (2001); Caldarelli et al. (2002), fitness model is used to describe and reconstruct network topologies that are characterized by a strong correlation between the degree and the fitness of a node. Considering the interbank networks, the nodes' strengths themselves play the role of fitnesses since the total interbank assets and liabilities are considered as responsible for the nodes' connectivity distribution. These techniques allow reconstructing the networks' topological structure when only banks' aggregate exposures and link density are known. This approach consists of the two following steps: the reconstruction of the binary network topology and then the reconstruction of the weights to assign to those links (Cimini et al., 2015b;Squartini et al., 2017).
The binary topology is reconstructed from an ensemble of binary directed networks induced by the directed Configuration-Model (Cimini et al., 2015b;Squartini et al., 2017) assuming that nodes' fitnesses are linearly correlated to the out-degree and in-degree. In the case of interbank network reconstruction, the fitnesses are the in and out strength of the node i, s in i and s out i , i.e. the aggregated interbank liabilities and assets. We define A i and L i as the interbank assets and liabilities of the bank i, respectively, while W = ( i A i )( i L i ) is a normalization term that represents the expected induced total weight of the network. The outcomes are an ensemble of networks that meet the constraints given by the aggregated exposure on average.
The adjacency matrix a ij is reconstructed from the probability matrix where the element p ij is the probability that the i-th bank lends to j-th bank: The value of the free parameter z is found imposing the value of the network density by mean of the following relation: where ρ gen and ρ real are the density of the generated network and of the real one, respectively. The weighted matrix w ij is then reconstructed using the degree-corrected gravity model. To respect the constraints given by the aggregated exposures in the balance sheets, the bilateral exposures are given by: where a ij = 1 with probability p ij 0 otherwise.
These reconstruction methods allow self-loops. However, in many real networks, self-loops are absent or even excluded. It is necessary to opportunely redistribute each diagonal term of the weight matrix across the columns and rows in order to still maintain the strengths constraints. For this reason, a procedure inspired to the Iterative Proportional Fitting algorithm (IPF) has to be implemented (Cimini et al., 2015a). In a recent paper (Anand et al., 2018), performances of different reconstruction models based only on the aggregated data are tested using the true bilateral data obtained from 25 markets spanning 13 jurisdictions. It is in fact postulated that the only information available is the aggregate asset and liability positions of each bank. Such datasets consist on interbank networks, payment networks and several other networks for different financial contracts: repurchase agreement, i.e. repos, foreign exchange derivatives (FX), credit default swaps (CDS), and equities. These networks' differences make the performance of the reconstruction algorithms depending on the real network considered since each method varies in term of the emphasis placed on the network features to reproduce. The purpose of the analysis in Anand et al. (2018) is testing the different methods' performance in the reconstruction and it is shown as the aforementioned fitness model (Cimini et al., 2015b) is the clear winner between the ensemble methods across different markets. However, these methods are not anchored to any economic indicator, so potentially weakening their intrinsic information. In order to include reasonable macroeconomic constraints, we assume that the volume of the relative inter-country lending exposure is proportional to the one reported in the BIS Consolidated Banking Statistics dataset. First, we divide banks into different groups by their nationalities and then we divide the weight matrix into local blocks, where each block represents the lending relationship between banks of country U to banks of country V . These blocks are reconstructed separately using the aforementioned method and imposing the following local fitnesses.
We define exp U V the interbank exposure of the banking sector of the country U to the country V , where U is the reporting country (lender) and V is the counterparty (borrower). We define the interbank assets and liabilities in the block U V as: The probability matrix and the weight matrix are so defined as: where W = ( iÃ i U V )( jL j U V ). We find the free parameter z by solving the equation: Imposing the same value of the free parameter z in each block is the simplest assumption that requires only the overall density value of the interbank matrix. On the contrary, when the density values of each block are available, different block values of the free parameter z U V could be considered and found by imposing Results show as the imposition of such constraints preserves the network's core-periphery structure, typical of the interbank market network. However, it makes the network density not uniform over the country blocks, reflecting the preferential lending relationship, especially between banks of the same country.

Results
Our work deals with two aspects: network reconstruction and financial contagion modelling. Firstly, we have implemented reconstruction techniques to generate, from aggregated data, the structure of banks' bilateral exposures. Such reconstructed networks constitute the underlying topology of the contagion spreading. Then, we have run our epidemic-like contagion models on the reconstructed interbank networks and we have tested models' sensitivity with respect to different scenarios. From now on, for the sake of readability, we report only plots related to 2007 and 2012. 13

Network reconstruction
We have reconstructed the interbank market network using the Fitness model already discussed in section 2.4.1. These reconstruction techniques generate an ensemble of weighted directed networks without selfloops since inter-node transactions are not considered. This reconstruction method requires that the sum of total interbank asset and liabilities is the same i A i = l L j . However, in our dataset, the total amount of interbank liabilities is generally greater than the one of interbank assets so we introduced a "ground" bank. This bank does not participate in the contagion dynamics and acts as an external lender whose assets are given by the difference A gbank = j L j − i A i . In this way, we succeed to generate an ensemble of networks that are consistent with the balance sheet constraints. It is assumed that the density value of the interbank network ρ real does not change over the period considered (2006)(2007)(2008)(2009)(2010)(2011)(2012)(2013) and it is equal to 0.3. 14 For each year in the period 2006-2013, we have generated an ensemble of 100 weighted directed networks using the equations 21 and 22. Figure 8b reports the mean over the network ensemble of the weight matrices. It is possible to notice from the plot that, as for the standard fitness model reconstruction, the network exhibits a core-periphery structure when the banks are sorted by total asset, similar to the real interbank topology (Craig and Von Peter, 2014;Finger et al., 2013;Fricke and Lux, 2015).
Due to the country-block constraints, the density is not uniform with respect to the banks' country as we could see in the figure 9b. 15 This result is in line with the concept of preferential lending in the interbank market as we would expect in a real financial system. The comparison with the reconstruction without economic constraint is striking. Without imposing such constraints, the network density in each block is uniform, something difficult to assume from an economic viewpoint. Besides, the average values of the node strength are in line with those ones reported in the balance sheets. In both reconstructions, there are high values of the Sweden block densities. This is because there are only four Swedish banks but very big in term of total assets and interbank assets and liabilities. This implies a higher probability to be connected (eqs. 15, 21).
The contribution given by the block constraints to the reconstruction technique is more evident when we compare the weighted network obtained imposing or not such country requirements, i.e. the volumes of inter and intra-country exposures provided by the BIS database. For the matter of sole graphical analysis, we compare the rescaled inter-country volume exposures (eq.14) of the real and the generated topology, considering the cases in which the block structure is enforced or not. Results (Figs. 7, 10) confirm a clear similarity between real and reconstructed inter-country exposures. Given the result of this enhanced reconstruction with economic constraints, we use the generated ensemble of networks to run our contagion model to asses systemic risk in the interbank market.
13 Plots of other years in the period 2006-2013 are available in the electronic supplementary materials. 14 This density value is reasonable when compared with the density of the European interbank network (Anand et al., 2018). We repeated the simulations with a lower density parameter and the results were qualitatively identical. 15 We have only generated network topologies with a unique weakly-connected component so there are no isolated nodes.

Contagion setting
As previously explained, we have generated an ensemble of 100 weighted directed networks for each year and on each annual network in the ensemble, we compute 97 stochastic SI contagion simulations for each network of the ensemble. Each of these simulations has a different initial infectious seed, i.e. the infected bank from which the infection starts. Each contagion begins from a single distressed bank and each node is used once as initial seed. We have in total 9700 contagion dynamics for each year. The simulation stops when no more banks are in the distressed state or 50 iterations are reached.

Contagion without node-term
In this scenario, we consider the functional form of the contagion rate λ (eq. 2) already discussed in Brandi et al. (2018). In figure 11, it is shown the prevalence dynamics in 2007 and 2012, namely the proportion of banks that belong to each compartment at each time-step of the contagion spreading. It is also reported the annual weighted prevalence so each bank is represented by the fraction of total assets that it owns in the considered year. It is possible to notice that although similar, the 2012 contagion spreads slightly faster. The contagion dynamic is also more rapid and sharper when we consider the prevalence weighted by banks' total assets. To better understand the systemic risk during the years, we plot the bankruptcy ratio dynamics. The ratio is computed as the fraction of bankrupted banks at the end of the infection or as the fraction of total assets owned by bankrupted banks at the end of the infection. It is possible to notice from figure 12 that there are differences among years although not as one would expect. If we turn our attention to the assets owned by bankrupted banks, it tends to be around the 90% of the total market. It means that on average bigger banks are failing more than the smaller ones. This is also due to their higher connectivity (higher in-and out-degree); they are more prone to contagion because they are involved in several contagion paths. It is also true that bigger banks have most of the interbank exposure so their bilateral exposures are also large but the rate of contagion is proportional to the relative exposure, not the absolute one. Figure 13a represents the decomposition of the bankruptcy ratio with respect to the country in which banks are based. The graph shows that France, Italy and Great Britain are the ones which contribute the most to systemic risk. It is important to notice that even if some countries are more represented than others, it does not directly reflect in having more banks defaulted. In fact, GB has less than half of the Italian banks and almost 50% banks less than Germany but its contribution is comparable to the former and higher than the latter. This is because GB banks are more interconnected with foreign banks with respect to other countries' banks. Moreover, figure  13b depicts the decomposition of the asset owned by defaulted banks for each country. In this case, the GB is the main contributor, even if it is not the biggest country in terms of assets and number of banks. This is due to two main factors, i.e. the average bank is big and central in the interbank market. Furthermore, France, even if it has a huge fraction of assets in defaulted banks, has an average figure per each bank smaller than other countries which are less represented in number but with a consistent fraction of assets owned by bankrupted banks, e.g. Spain and Sweden. This result suggests that in some countries big banks are the ones which default more because of their centrality while in other countries the default concerns both central and peripheral banks irrespective of the size. Figure 14 shows the dynamics of the bankruptcy rate µ (eq.3). The slope, the convergence and the mean value change from 2007 and 2012, showing that the contagion dynamic is more severe in 2012. In fact, this rate µ can be interpreted as a measure of the system health. Banks' bankruptcy rate depends on the real-time state of the banks since it is defined as the fraction of liquidity that a bank needs that were previously lent by infectious banks. The higher the value the greater is the number of the infected lender of a bank and the probability to go bankrupt. Individually, it is a measure of banks' fragility, considering instead the overall dynamic it gives information on the resilience of the whole system.

Contagion with node-term
In this scenario, we consider the node-term in the functional form of the contagion rate λ (eq. 4). 16 This is because we want to take into account banks' contagiousness heterogeneity using balance sheet and country information which account for liquidity risk. Figure 15 shows the prevalence and the weighted prevalence dynamics in 2007 and 2012. As can be noticed, the node-term changed the dynamic of the prevalence, and in particular, the systemic risk in 2012 is much higher and this can be easily noticed by the fact that the fraction of bankrupted banks is higher than the one of healthy banks. If we shift the attention to the full dynamics of the bankruptcy ratio, we can notice from figure 16 that there are significant differences between years and we can observe a clear and evident dynamic on  figure 16 shows as the liquidity systemic risk, i.e. the bankruptcy rate, increases not so much during the global financial crisis but rather during the European sovereign debt crisis. To understand the role played by the node-term in the contagion dynamics we compare the bankruptcy ratio dynamics with node-term in the infection rate λ (Fig. 16) with the benchmark scenario (Fig. 12). In both cases, we observe an increasing systemic liquidity risk starting from 2008, although the more pronounced when we consider nodes' features. This result strongly suggests that the distribution of the node-term, starting from 2008, increasingly moved upwards to positive values consequently increasing the contagion rate, especially for highly connected banks. As shown, the dynamics of the bankruptcy ratio has a break in 2012, probably due to the ECB forward guidance in 2012 to counteract the European sovereign debt crisis. The contribution of the contagion rate's components is not equivalent. The country term, having strong fluctuations over the years, drives the dynamic of the liquidity risk, while the bank component has an elastic mechanism, magnifying or reducing the liquidity risk dynamics.  figure 17a, we can see that Italian banks are the one with the highest contribution to the potential systemic contagion. This is due both to the fact that banks operating in this country have a high liquidity risk and a lot of interconnections, both with domestic and foreign banks. In this case, contrary to the benchmark model, we can see that the heterogeneity in liquidity risk incorporated in the node-term, reduced the magnitude of GB banks. This is due to the fact that GB banks are both resilient and with low liquidity risk. Also, France bears a huge share of the systemic risk proxied by the bankruptcy ratio, and this is mostly due to the huge amount of links with risky banks. If we analyse the average risk per-bank contribution in each country (country risk contribution divided by the number of banks in the country), we can notice that Spain and Sweden play a huge role, bearing a non-negligible fraction of systemic risk even if the number of banks is quite small. A similar argument to the benchmark model applies to the asset at default decomposed by country. In fact, figure 17b shows that GB is the country with the highest fraction of assets at default. This is because, even if not all the GB banks default, the ones which do default, are the biggest ones. The contrary argument applies to France, where even if more banks default, they are of smaller size on average. This highlights that peripheral countries, even with a marginal number of banks in default, can generate a non-negligible impact in both the number of banks and the amount of assets in default. Figure 18 shows the dynamics of the bankruptcy rate µ (eq.3). While in 2007 the time evolution of the bankruptcy rate is similar to the benchmark case without node-term (Fig. 14), if we compare the

Contagion and bankruptcy rates with node-term
In this scenario, we consider the liquidity resilience indicator in the functional form of the bankruptcy rate µ (eq. 9). In this way, the spontaneous transition from the infected I 1 to the bankrupted state I 2 is also dependent on nodes' feature as banks' interbank liquidity resilience (eq. 10). For long enough simulations, the systemic risk would result to be equal since without a recovery mechanism, distressed banks are set to remain in the distress compartment or to default and this node-term would only accelerate or decelerate the bankruptcies. For this reason, showing the systemic liquidity risk would not carry any additional information. What is important though, is not only the final state of the simulation but also its speed to convergence. In fact, if a policymaker is able to monitor a distress situation, it would intervene timely. For this reason, it is of crucial importance to understand if liquidity resilience of some banks (in topologically relevant positions) can indeed slow down the contagion process. If it is the case, a central bank would operate on banks which can help to stop the contagion rather than injecting liquidity directly to more central or more vulnerable banks. To see if we have any effect by the liquidity resilience indicator, we compare the dynamics of the average bankruptcy rate µ for different model specification. In figure 19 we represent the different dynamics of the bankruptcy rate over time when the liquidity resilience indicator is considered or not. For the case in which we don't use nodes specific features in the bankruptcy rate, we plot both the benchmark model (BM) and the model with node-term in the contagion rate (NT). As it is possible to notice, in 2007 the three plot are statistically different in mean at 5% confidence level. In fact, the mean values do not intersect with the 95% confidence bands of the other specification. In 2012 however, apart from the initial steps of the contagion in which the benchmark model has a statistically lower speed in the bankruptcy rate compared to the other two, the three lines cross, meaning that they are not statistically different at 5% confidence level. From an economic viewpoint, the 2007 case is more interesting. As it is possible to notice, the introduction of the liquidity resilience indicator lowered the speed of contagion. Even if the difference between the two curves is not huge in absolute terms, it can make the difference when preventing an additional bank to fail that can generate a domino effect is vital.

Contagion and bankruptcy rates with node-term and dynamic confidence contagion
In this scenario, we consider a richer model in which we have the node-term in both the contagion and the bankruptcy rate parameters and, in addition, the contagion rate has a dynamic confidence multiplier which makes the contagion rate intrinsically dynamic. In particular, the liquidity resilience indicator enters in the functional form of the bankruptcy rate µ * (eq. 9) while the systemic risk multiplier θ enters the dynamic of the contagion rate λ + as reported in eq. 13. The systemic risk multiplier, as described in eq. 11, depicts the health of the system at each iteration and it proxies the negative feedback loop and confidence contagion in the interbank market. When a fraction of the banks is failed or in distress, the confidence contagion kicks in since the remaining banks are classified as risky banks. This, in turn, gives rise to a negative spiral effect which magnifies the risk of distress in the market and the freeze of liquidity exchanges. On the contrary, if the market is characterized by few distressed or bankrupted banks, the banks don't see the other banks as risky and continue lending money to them. In practice, there should be a phase transition to the contagion to escalate rapidly. In fact, given the definition of θ in eq. 12, if more than s * = 1 1+β * 17 of the banks are healthy, the contagion rate λ + is slower than λ * while it rapidly increases if less than s * of the banks are healthy. This means that only if the contagion rate and the liquidity epidemics have enough power, the systemic liquidity risk fully materializes. As defined in eq. 13, this "psychological" effect is responsible for the reduction or increase of the contagion rate and consequently the spread of the financial distress. Observing the bankruptcy ratio dynamics for different θ specifications shown in figure 20, we can make some comments. 18 First of all, for every specification, a sharp surge in all the curves is observable in 2011 which represents the peak of the sovereign debt crisis. Unlike the previous dynamics (Fig. 16), we can notice that the effect played by the parameter θ is quite important and can be categorized in three main effects: slow-reversal, fast-reversal and a mixed-effect. In fact, for a big value of β * as 1, the effect is to slow the contagion at every point in time, reaching the same number of bankrupted banks only for 2011. On the contrary, for a very low value of β * , the contagion sped up and many more banks default with respect to the θ = 1 case (no risk multiplier). However, even if the number of banks defaulted is considerably higher, these are small banks since the assets in default are statistically equivalent. The mixed-effect cases (with intermediate values of β * ) are the more interesting ones. In fact, these cases are the ones more credible both ex-ante from an economical point of view and ex-post from the results we get. We can notice that the confidence contagion kicks in only in some years and that this has a stronger effect on small (peripheral) banks since even in the years in which the number of banks defaulted is higher, this reflects in an equivalent or lower value of asset defaulted with respect to the θ = 1 case. We finally show the speed of bankruptcy in this context for different θ specifications. As it is possible to deduce from the previous plot, if the contagion is lessened for one specific year, also the bankruptcy rate evolution would be lower and vice-versa the opposite. In fact, the bankruptcy rate µ * grows as the number of distressed lenders increases, so we also observe a different dynamic of such parameter when the contagion rate is dynamic or static (Fig. 21). In particular, in 2007 the bankruptcy rate is quite flat for the low-reversal specification while the fast-reversal specification is very similar to the confidence contagion neutral case (θ = 1). In this specific year, the mixed-effect specification has a lower speed of default rate and hence a lower or comparable number of banks defaulted with respect to the θ = 1 specification. Regarding 2012, the bankruptcy rate for the mixed-effect specifications is quite interesting. In fact, in the first part of the simulation they depict an overall slower default rate, while after some time steps, the opposite is true. This leads to at least 15% more banks defaulted at the end of the contagion process. The behaviour of the contagion due to the psychological effect suggests that if tackled in time, the contagion could be lessened before it degenerates to a systemic collapse. This result highlights that an effective macroprudential policy could be to undertake actions in interbank hubs where the contagion and domino effects are more probable rather than inject money in the more central or vulnerable banks. These results make clear that if the psychological effect for bank run is

Conclusions
In this paper, we proposed a stochastic epidemic-like model for systemic (funding) liquidity risk in the European interbank market. We built the model enriching the Exposed-Distressed-Bankrupted (EDB) contagion model recently proposed in Brandi et al. (2018) adding node-specific features related to liquidity risk. In particular, we used the bid-ask spread and a banking liquidity indicator to amplify (or contract) the contagion dynamic on the interbank network. We also augmented the model with a bank liquidity resilience indicator to take into account the heterogeneous probability of default of a bank hit by a liquidity shock. We finally introduced the confidence contagion via a systemic parameter which proxies the health of the banking system. We simulated the model using an agent-based simulation since the result is not achievable in closed form. We run the model on the European interbank market reconstructed with an economic enhanced method that uses external economic information to anchor the classic fitness-based reconstruction model. In particular, we used the BIS data on inter-countries banking exchanges to constraint the reconstruction model and we could appreciate a huge improvement with respect to the unconstrained version. The results of the contagion process are promising. We could appreciate that using node features in the contagion mechanism they enriched considerably its dynamic providing good information for systemic risk assessment. We could notice that both the market topology and the contagion dynamics play a non-trivial role. In fact, however, Greece has the highest (country) market liquidity indicator, their risk is attenuated on the final result because of a lower amount of interconnections with foreign banks with respect to other countries as Italy, which other than having a high liquidity risk, is strongly connected with foreign banks. These results show that if a specialized model cannot be used, this model is easy still flexible to reproduce different contagion dynamics. A limitation is represented by the limitedness of the data about banks' exposures. In fact, other features of the lender and the borrower could be considered, e.g. the volume of liquid and illiquid assets, but, as the first step, we consider only the interbank market as the possible channel of contagion. Such a simplification, as well as adopting an epidemiological model, in fact, allows to reduce the complexity of the spreading dynamics and it is possible to run the model when most of the information is missing, as in this case. Another comment regarding the reconstruction must be made. In fact, the results must be taken at face value since the external information, the BIS data, refers to Q4 2013, while a more robust result would have been achieved using the corresponding year of the BIS from 2006 to 2013. In fact, it is possible to argue that this information is not fully representative of the countries linkages in previous years, especially pre-crisis years. However, this is the only information we could rely on. If banks would not be anonymous, other information could be used to anchor the reconstruction method. A future step in the use of epidemic-like models for financial contagion is to introduce the credit risk channel in the funding liquidity risk dynamics as prescribed by the Bank of England . This would require a multilayer network with spillover effects between layers devoted to liquidity and credit risk. The model can also be easily extended to more parameters to enter the node-term γ and ν or to change the functional form of the contagion and bankruptcy rate to mimic more some specific financial mechanism. In conclusion, this modelling approach could be used when relying on more sophisticated models is not possible but using only topological measure would be too simplistic.

B Results for non-linear systemic risk multiplier
We report here the results of the systemic liquidity risk when we have a non-linear systemic risk multiplier. Figure 22 depicts the results of the time evolution of the systemic risk in the period 2006-2013 when we consider θ + = h(θ, 2) as the systemic risk multiplier in the contagion rate. We can notice that when a stronger behavioural effect is implemented, the confidence contagion kicks in in all the considered scenarios apart from the extreme case of β * = 1.  h(θ, 2). Mean over the all simulations with 95% confidence bands. On the left, the fraction of bankrupted banks at the end of the infection while on the right, the fraction of total assets owned by bankrupted banks at the end of the infection Figure 23 depicts the time of reversal speed of the contagion for both the linear and non-linear scenarios, i.e. φ = 1 and φ = 2. In particular, empty dots underline the critical time t * such that θ + = 1. It is possible to notice from both graphs that, as expected, all the scenarios start from deceleration and, depending on the parameters β * and φ, the time of reversal speed is reached at a higher or lower pace. In particular, for low values of β * , the critical time of reversal speed is reached quite soon while for very high values of β * , it is not reached at the end of the contagion simulation.
Finally, figure 24 shows that the time reversal with respect of each year for different values of β * and φ. It is clear from those plots that (both in the linear and non-linear scenarios) 2011 is the year with a lower critical time of reversal speed and that the slope is less steep, meaning that the node-term in the contagion rate has had a huge role in the speed of time reversal.