On the Epidemic of Financial Crises

This paper proposes a framework for modelling financial contagion that is based on SIR (Susceptible-Infected-Recovered) transmission models from epidemic theory. This class of models addresses two important features of contagion modelling, which are a common shortcoming of most existing empirical approaches, namely the direct modelling of the inherent dependencies involved in the transmission mechanism, and an associated canonical measure of crisis severity. The proposed methodology naturally implies a control mechanism, which is required when evaluating prospective immunisation policies that intend to mitigate the impact of a crisis. It can be implemented not only as a way of learning from past experiences, but also at the onset of a contagious financial crisis. The approach is illustrated on a number of currency crisis episodes, using both historical final outcome and temporal data. The latter require the introduction of a novel hierarchical model that we call the Hidden Epidemic Model (HEM), and which embeds the stochastic financial epidemic as a latent process. The empirical results suggest, among others, an increasing trend for global transmission of currency crises over time.


Introduction
A …nancial crisis originating in one country can travel within and beyond its original neighbourhood spreading among countries like a contagious disease. Loosely speaking, this phenomenon, which was a common feature of the major recent crises, is referred to by economists as 'contagion'. Contagion by de…nition can only occur if there are interactions among subjects. These interactions can materialise at di¤erent levels and through di¤erent channels simultaneously, some channels being more important during particular events than others. 1 As …nancial crises spread across countries, they a¤ect nations with apparently healthy fundamentals and sound policies. The better understanding we have of their propagation mechanism, the better we are positioned in proposing policy interventions which can most e¤ectively reduce their contagious spread.
The economics and …nance literature have a number of theoretical models that aim to explain the contagious spread of crises, emphasising trade linkages (bilateral or third party, Gerlach and Smets, 1995;Corsetti et al., 1998), …nancial linkages (Allen and Gale, 2000), as well as models on information asymmetries and investor behaviour (Calvo and Mendoza, 2000;Kodres and Pritsker, 2002), among others. More recently, recognition of the inherent complexities and interconnections associated with …nancial systems has advocated the need to consider methods from other disciplines such as ecology, epidemiology, biology and engineering in studying …nancial networks (May et al. 2008, Haldane, 2009. Indeed, researchers have turned to alternative methods in modelling …nancial contagion, which are largely based on numerical simulations. For example, Gai and Kapadia (2010) study a percolation-type process on a weighted network of banks as a model of contagion. 2 They make use of tools from contemporary network theory, which have lately been gaining considerable popularity. May and Arinaminpathy (2010) pursue recent advances in the area of complex ecological systems in a study similar in spirit to Gai and Kapadia, though they employ a mean …eld approximation rather than resorting to simulations. Amini et al. (2010) analyse distress propagation in a network of banks, via a cascading process, and derive the asymptotic 1 The literature typically distinguishes between fundamentals-based contagion, a transmission of a crisis from one country to another through real and …nancial linkages, also known as spillovers, and pure contagion where a crisis might trigger additional crises elsewhere for reasons unexplained by fundamentals. 2 (Bond) percolation processes are equivalent to SIR epidemics given proper model speci…cation, see Newman (2010). magnitude of contagion. Caporale et al. (2009) make use of agent-based simulation models to investigate the dynamics of …nancial contagion.
On the empirical front considerable e¤ort has been devoted to documenting the existence of contagion. 3 The bulk of the studies suggest that there is evidence of contagion. For an overview of the empirical evidence of contagion see Dornbusch et al. (2000) and Pericoli and Sbracia (2003). Less emphasis, however, has been placed on modelling the propagation mechanism of …nancial crises. A class of models that features prominently in the empirical contagion literature is that of cross country probit-type regressions of a binary crisis indicator on variables representing potentially important transmission channels. Such channels have been identi…ed as trade links, Glick and Rose (1999), …nancial links and the common creditor, Caramazza et al. (2004) and Kaminsky and Reinhart (2000), neighborhood e¤ects, De Gregorio and Valdes (2001), and macroeconomic similarities, Sachs et al. (1996). More recently, Dungey and Martin (2007) have proposed capturing …nancial market linkages during crises through the use of common factors, while Aït-Sahalia et al. (2010) suggest modelling …nancial contagion using mutually exciting processes.
In this paper we propose a framework for modelling …nancial contagion which is based on SIR (Susceptible-Infected-Recovered) transmission models from epidemic theory (see for example, Bailey, 1975). This class of models addresses two important features of contagion modelling which are a common shortcoming of most existing empirical approaches, namely the direct modelling of the inherent dependencies involved in the transmission mechanism, and an associated canonical measure of crisis severity. At the same time, it allows to incorporate features that re ‡ect relevant theoretical and empirical evidence in the literature through the inclusion of appropriate covariates. The proposed methodology naturally implies a control mechanism, which is required when evaluating prospective immunisation policies that intend to mitigate the impact of a crisis. This control mechanism can be implemented not only as a way of learning from past experiences, but also in real-time as a contagious …nancial crisis unfolds.
Speci…cally, the approach is based on a stochastic epidemic transmission process where the population of countries is explicitly structured, and a crisis may be propagated both locally and globally. Having identi…ed all countries that su¤ered during a particular crisis episode, the focus is on how crises spread from an initially a¤ected (or 'infected') country to the rest of the countries by considering their interaction at the local and global level.
We explicitly model regional and global contagious 'contacts' and infer the rate of their transmission. These transmission rates allow us to directly quantify the severity of the crisis, in contrast to conventional approaches in the literature where severity is measured by a composite index of macroeconomic indicators, see Kaminsky and Reinhart (1998) and Kaminsky (2006). The methodology also delivers an estimate of the number of countries to provide …nancial support to, in order to prevent a major crisis.
In the proposed framework a country may experience a crisis not only because of its direct links to the originally infected (ground zero) country, but also due to local and/or global contacts with countries that are already infected. Thus, we allow for the so called 'cascading e¤ect' following the terminology of Glick and Rose (1999), which is typically ignored in the literature. In fact, the proposed approach e¤ectively considers the set of all possible transmission channels of a crisis. Furthermore, it naturally accounts for an increase in the likelihood of a crisis in a particular country given that there is a crisis elsewhere. This is explored in Eichengreen et al. (1996) and Kaminsky and Reinhart (2000) as being consistent with the existence of contagion.
The methodology is illustrated on a number of currency crisis episodes, using both historical …nal outcome and temporal data. The former provides information on the number of initially 'healthy'countries, that were ever a¤ected or otherwise by a particular …nancial crisis. The information provided by the latter allows to estimate the 'infection'and/or 'recovery' times of the crisis, in addition to the trasmission rates. The use of temporal data is necessary for performing real-time analysis of a crisis spread. It requires the introduction of a novel hierarchical model, that we call the Hidden Epidemic Model (HEM), and which embeds the stochastic …nancial epidemic as a latent process. Our …ndings, among others, point to an increasing trend for global transmission of currency crises over time.
The paper is structured as follows. In Section 2 we introduce the modelling framework and describe the inference procedure associated with …nal outcome data. Section 3 describes the hidden epidemic model associated with the use of temporal data. In Section 4 the proposed approach is illustrated via an empirical application to several currency crisis episodes. Section 5 discusses the relevance of the methodology for policy analysis. Section 6 contains some further discussion.

Modelling Framework
Consider the onset of a …nancial crisis, for example, a currency crisis or a stock market crash, with contagious e¤ects to a given population of, say, countries. 4 Our interest is in modelling the process associated with the propagation of the crisis. The approach can be equally applied to populations of …rms or banks, among others.

The Model
Consider a closed population of N countries, partitioned into regions of varying sizes.
Speci…cally we will assume that the population contains r j regions/groups of size j, where r = P S j=1 r j is the total number of regions and S denotes the size of the largest group. The total number of countries is then N = P S j=1 jr j . The crisis originates in a typically small number of countries. At the outset, all countries are deemed susceptible to the particular crisis episode. As the crisis unfolds, each country is considered to belong to any one of three states: susceptible, infected (and 'infectious') or recovered. Such processes are often referred to as SIR models in epidemic theory. In the SIR model a susceptible country is in a 'normal'state and can be a¤ected by the crisis in question. An infective country is in a state of crisis and may trasmit it to other countries. At the end of its infectious period an individual country is considered recovered, in the sense that it plays no further role in the propagation of the crisis. Thus, we e¤ectively assume that a country may not experience multiple recoveries within a single crisis, which appears reasonable for such applications.
A country, say j, remains in crisis for a positive random time, denoted by I j , which is allowed to follow any speci…ed distribution. The periods for which the individual countries remain in crisis are assumed to be a-priori independent. While infectious, a country may transmit the crisis to each country within its region at times given by the points of a Poisson process of rate L . Additionally, each country may trasmit the crisis to any given country 4 The presence of contagion can be veri…ed through the use of various tests developed for this purpose (see footnote 3). worldwide according to a Poisson process with rate G =N . That is, there are two levels of mixing between countries, namely at the local and global level. The contact processes within this construction are assumed to be a-priori independent. This formulation of the model e¤ectively assumes that each country has local contacts with rate L + G =N . Alternative parameterisations of the epidemic model can be obtained using the superposition and splitting of the Poisson process (see Kingman, 1993). The crisis ends when there are no remaining infectious countries in the population. Notice the di¤erent scaling of the two transmission rates. This is a common assumption in two-level-mixing models and it implies that there will be more infectious contacts locally if the local population grows, while this is not the case globally.
The model described above is a stochastic epidemic two level mixing model introduced in Ball et al. (1997), where a detailed discussion of related work can be found. While the model does not explicitly assume a latent period for the crisis to unfold once a particular country has been a¤ected, but rather assumes immediate infection, the distribution of the …nal outcome is invariant to very general assumptions concerning a latent period (see Ball et al., 1997;Andersson and Britton, 2000). The two level mixing model encompasses the so called generalised stochastic epidemic model (GSE), which arises by setting ( L = 0; G = ), that is, assuming all countries mix homogeneously with rate : 5 Epidemic models in their simple deterministic form are not foreign to the economics literature. They typically feature in studies of treatment and control, see for example Geo¤ard and Philipson (1997), Gersovitz and Hammer (2004) and Toxvaerdy (2010). However, for a complex, highly non-linear phenomenon such as contagion, the stochastic model described above is more appropriate compared to any simple deterministic analog. It is particularly advantageous in that it is suitable for small populations, it can account for the regional/global nature of a crisis, while model complexity and realism can be naturally expanded in di¤erent directions, some of which will be discussed below. Figure 1 illustrates a potential con…guration of a crisis spread in the case of a small population of …ve countries denoted by {1,2,...,5}. The …ve countries are partitioned into two regions, represented by the two circles. Consider 1 as the country originally a¤ected by 5 The particular case where the infectious period is exponentially distributed renders the model Markov. As the population size increases, it can be shown (e.g. Ethier and Kurtz 1986) that the solution of this Markov process converges to that of the corresponding system of ODEs known as the deterministic general epidemic.
the crisis in question. The grey links denote contacts made locally between countries within a region. The black links correspond to global contacts. The solid directed links represent contacts that, resulted in infection, while the dashed links represent lack of contact in both directions. Thus, in this particular con…guration the crisis is transmitted from country 1 to countries 2 and 4. Figure 1: Example of a crisis spead over a small population of countries In the speci…cation described above the population of countries is assumed to represent a complete network i.e. any country can have contacts with any other locally and globally. This is not a restrictive assumption as epidemics upon random networks can be reparameterised to correspond to epidemics on complete graphs (e.g. Neal, 2006, Newman, 2010, and thus can be incorporated into the proposed framework. Furthermore, the population is assumed to be homogeneous, that is, all countries posses similar infectivity and susceptibility properties.
This assumption will be relaxed in Section 4.1.1.
Further detail can be added to the model by dissagregating the population according to individual attributes and/or relationship networks based, for example, on economic information. These details can be incorporated through the transmission rates leading to weighted networks. The study of a dynamic process on a weighted network is, essentially, equivalent to the inclusion of a covariate. This can be easily seen by considering the moment generating function of the transmission rate, say ( ), where ( ) = E(exp( I)). In the case of a constant infectious period this is simply exp( I), the probability of avoiding infection. When information about a particular variable, say X, becomes available, this can be incorporated using a Cox-type (log-linear) model: = 0 exp( X): Then ( ) becomes ( ) = exp[ I 0 exp( X)] = w exp( 0 I) = w ( 0 ). In other words, the inclusion of covariates using the proposed methodology is equivalent to the simultaneous estimation of the weights on our network. Dealing with multiple covariates (equivalently, weighting based on more than one variable) is straightforward as will be illustrated in Section 4.2.2. If the focus is, for example, on the contagious default of banks these covariates could represent balance sheet information and/or information on interbank relations. In the case of a currency crisis, they could represent trade and …nancial linkages between countries. Additional covariates accounting for macroeconomic conditions could also be included.

Threshold Parameter
An appealing feature of the proposed modelling framework is that it embodies a threshold parameter which can be utilised as a severity measure of the crisis, thus providing an inherent control mechanism. Stochastic models such as epidemic and branching processes typically generate bimodal realisations where an epidemic may or may not die out quickly, depending on the value of the threshold parameter R 0 , often referred to as the basic reproduction number. This is the most important parameter in epidemic theory (Dietz, 1993) and it is de…ned as the expected number of infections generated by a typical infective in an in…nite susceptible population. Generally, R 0 is calculated as the largest eigenvalue of the so called next generation matrix (Diekmann and Heesterbeek, 2000).
In the case of a homogeneously mixing stochastic epidemic, it holds that R 0 = E(I); where is the contact rate and I is the infectious period. R 0 may be interpreted as a threshold parameter since its value determines whether or not a major crisis can occur. In particular, if R 0 > 1 a positive proportion of the in…nite population will be a¤ected by the crisis with positive probability, while if R 0 1 only a …nite number of susceptibles will ever become infected and thus the crisis spread will swiftly die out. Hence, most control measures aim to reduce R 0 below unity. Ball and Donelly (1995) rigorously established the threshold behaviour of the general stochastic epidemic by coupling the early stages of the epidemic with a suitable branching process.
For the two-level mixing model the threshold parameter, denoted by R ; is de…ned in a similar way to R 0 . In this case, Ball et al. (1997) couple the epidemic with a branching process de…ned on groups. They show that where v( L ) is the average group …nal size if only local infections are permitted. Speci…cally, v( L ) = 1 g P S j=1 j j j ; where j is the …nal size within a group of size j, j = r j =r is the proportion of groups of size j and g is the mean group size. It should be noted that while R is linear in G , it is nonlinear in L but linear in v( L ), with the latter being an increasing function of L : Details of the calculation of v( L ) can be found in the appendix.
Most statistical analyses require the assumption of supercriticality, that is R > 1 so that a major crisis spread is possible (e.g. Rida, 1991;Demiris and O'Neill, 2005b). Since prophylactic measures aim to achieve R 1, assuming that R > 1 is not desirable, as it also results in underestimating the variability of the model parameters. The inference procedure we will employ does not condition upon R > 1.

Final Size Distribution
For a given crisis episode, when only information on the …nal infected number of countries is available, i.e. …nal outcome data, it is in principle possible to write down a system of recursive linear equations, the solution of which delivers the probability mass function required for the likelihood. However, solving such a set of equations can be numerically unstable even for small population sizes (see for example Andersson and Britton, 2000, p.18). This problem is greatly ampli…ed for more complex cases like the two level mixing model considered here.
The remainder of this section is concerned with the description of an inference procedure that surmounts this complication.

Data and Likelihood
For the two level mixing model, the data are of the form x = fx ij g where x ij denotes the number of regions containing j initially susceptible countries of which i ever su¤ered the crisis in question. We will describe a Bayesian inference procedure for the two infection rates L and G , given x. By Bayes'Theorem, the posterior density, ( L ; G j x), satis…es where (x j L ; G ) denotes the likelihood function and ( L ; G ) the joint prior of ( L ; G ). The numerical problems mentioned in Section (2.3.1) indicate that the likelihood is analytically and numerically intractable for all but a very small number of countries. We surpass this di¢ culty by following Demiris and O'Neill (2005a) in augmenting the parameter space using an appropriate random directed graph (digraph) as considered below. 6

Random Digraph
The characterisation of the …nal outcome of a stochastic epidemic in terms of random graphs is well known in epidemic theory and has been exploited by Ludwig (1975) and Barbour and Mollison (1990) among others. It has been considered for the purposes of statistical inference by Demiris and O'Neill (2005a); see also O'Neill (2009). In short, let each country correspond to a vertex in the random digraph, while a directed edge in the graph denotes a potential infection. The edges are drawn from vertex j with probability 1 exp( I j L ) (1 exp( I j G =N )) for local (global) links. It then holds that the distribution of the …nal outcome of the crisis is equivalent to the distribution of the 'giant component'of the graph, that is, the random set of vertices that are connected to the initially a¤ected country (or countries) through directed edges. Notice that additional edges may exist in the digraph, but only the routes emanating from the initially infected can correspond to actual 'infections'.
Moreover, ‡exible models for the infectious periods I j such as disjoint intervals in real time, representing for example stock market opening times in the case of a stock market crash, can be easily incorporated into this framework as they only appear through the edge probabilities.
To maximise computational e¢ ciency we only consider the graph on 'infected'vertices, while all other data contributions are accounted for via the likelihood.

Augmented Likelihood and Posterior
Suppose that the total number of countries that are ever a¤ected by a particular crisis is n = P i P j ix ij , labeled 1; : : : ; n, and de…ne G as the random digraph on these n vertices. For j = 1; : : : ; n let I j denote the infectious period corresponding to vertex j and I = (I 1 ; : : : ; I n ).
We assume that initially there is one known country in crisis, although it is trivial to consider 6 An alternative to the exact method considered here can be based on asymptotics about the …nal size of the epidemic. In particular, it is well known that the proportion, say , of countries ever a¤ected by the crisis, should a major crisis occur, follows asymptotically a Gaussian distribution, see for example Theorem 4.2 of Anderson and Britton (2000). Analogous results for the two-level-mixing model are given in Ball et al (1997), using the embedding representation of Scalia-Tomba (1985). Statistical inference using such asymptotics underlies the methodology presented in Demiris and O'Neill (2005b) and Ball and Lyne (2010). any number of initial infectives, possibly of unknown identity. In fact, it turns out that knowledge of the initial infective is not crucial in the applications to follow.
The augmented posterior density may be written as In (2), ( L ; G ) and (I) denote the priors while the …rst two terms e¤ectively represent the augmented likelihood, given by L(x j L ; G ; I; G). Provided that G is compatible with the data, L(x j L ; G ; I; G) is evaluated as the probability of the edges in G times the probability of no edges between the n vertices in G and the remaining N n vertices.
Otherwise, L(x j L ; G ; I; G) is set to zero.
Let`L j (`G j ) denote the number of local (global) links emanating from vertex j and N L j the number of countries in j's region. Further, let G x denote the event that G is compatible with the data. Then the augmented likelihood can be written as where 1 C denotes the indicator function which takes the value of one when the event C materialises, and zero otherwise. The MCMC algorithm used to sample from (2) is largely similar to that in Demiris and O'Neill (2005a) where additional details can be found. In brief, standard random walk Metropolis samplers are su¢ cient for updating the infection rates, while updating G requires some attention. Speci…cally, G is a discrete random object with an enormous number of possible con…gurations, the overwhelming majority of which have negligible posterior probability. Hence, simple strategies like adding and deleting one edge at a time are preferable, as samplers based on more complex proposals can exhibit poor convergence.

A Hidden Epidemic Model
Thus far, analysis of the proposed model has been discussed for the case where only …nal outcome data are available. Next we illustrate how one can obtain additional information about the propagation of a …nancial crisis, for example the times of entry to and/or exit from the crisis, by making use of temporal data. This way a more complete characterisation of the crisis can be obtained, including its duration for each country. Contrary to a communicable disease where it is common to observe the times at which individuals developed symptoms or recovered, this is not typically the case for a …nancial crisis. The use of temporal data in the current context necessitates the introduction of a novel hierarchical model that we call the Hidden Epidemic Model (HEM). The HEM embeds the stochastic …nancial epidemic as a latent process that governs the behaviour of the observed temporal variables. 7 One of the important advantages of inferring the transmission parameters using the hidden epidemic model is that it can be used for real-time analysis of a …nancial crisis spread and hence for the evaluation of prospective immunisation policies.

Model Structure
Consider the observed variable Y it for country i at time t where i = 1; : : : ; N and t = 1; : : : ; T .
Let S it denote the state of country i at time t; and E i and R i the times of entry to and recovery from the crisis. The state variable S it is de…ned as For any country i not a¤ected by the crisis E i = R i = 1. Hence, the total …nal size . The conditional distribution of Y it jS it is assumed to follow a Student's t distribution with degrees of freedom, with mean and variance that depend on S it in the following manner: We also make the following assumption which characterises the dependence structure of the model: Y 1t ; Y 2t ; : : : ; Y N t conditionally on S 1t ; S 2t ; : : : ; S N t are independent for any t, i.e.

Inference
Without loss of generality we assume that `= 0; for`= 1; 2; 3 as would be reasonable, for example, in the case of …nancial (log)return data. We are interested in inferring the parameters governing the crisis transmission, and as a by-product the volatilities = ( i`; i = 1; : : : ; N ;`= 1; 2; 3) and times of entry to and recovery from the crisis E = (E 1 ; : : : ; E N ) and R = (R 1 ; : : : ; R N ); respectively. 8 The choice of this distribution was based on preliminary results of the properties of the temporal variable used in the empirical application to follow. In principle it can be speci…ed as any distribution. 9 As in the standard Hidden Markov Models used in the literature to identify currency crises, see for example Martinez-Peria (2002) and Brunetti et al. (2008) among others, the above speci…cation can be extended to allow for an autoregressive structure in the mean of the observed series, as well as conditional heteroskedasticity. The latter can be accommodated by allowing the volatilities to follow, for example, a standard GARCH form. Such extensions will not be pursued here.

Augmented Likelihood
Let Y = (Y 11 ; : : : ; Y 1T ; Y 21 ; : : : ; Y 2T ; : : : ; Y N 1 ; : : : ; Y N T ): The likelihood of the observed data (Y) given the infection rates G and L and the volatilities ( ) can be expressed as If the times of entry to and recovery from the crisis for all the countries in the population were known, then parameter estimation would be straightforward. This information, however, is typically not directly observable. Due to the requirement of computing the high dimensional integral R S ( ); the likelihood given by (5) is analytically intractable. To surmount this problem we augment the parameter space with the sets E and R; and propose a Bayesian data-augmentation framework for estimation (see, for example, O'Neill and Roberts, 1999).
This approach will enable us to treat the times E i ; R i ; i = 1; : : : N as additional parameters to be estimated simultaneously with L , G and .

Posterior Distribution
The posterior distribution of the unknown parameters of interest given the observed data and assuming independent priors for L , G and , is expressed as (6) is the contribution from the epidemic model and following, for example, Jewell et al. (2009) is given by where M j denotes the (infectious) pressure that an infected country is subjected to just before it enters the crisis. Thus we have that M j = P i2C ij where ij is the instantaneous rate at which country i exerts (infectious) pressure on country j just before country j enters the crisis with ij = G N + L 1 (i;j in the same region) : The set C denotes the set of countries a¤ected by the crisis at time t. The country that …rst entered the crisis is labelled by k and T is the time at which the crisis is assumed to be over.
The term R in (7) denotes the contribution of the recovery process to the likelihood of the epidemic model. Assuming independent (random) infectious periods I i , i = 1; : : : ; n, where f I ( ) denotes the arbitrarily speci…ed distribution governing the infectious period. The infectious periods are assumed to be distributed according to a Gamma distribution with (hyper) parameters and (mean is = ), so then

Priors
The terms ( ), ( G ) and ( L ) denote the prior distributions assigned to the parameters , L and G respectively. Slowly varying exponential priors are assigned to L and G and Inverse-Gamma distributions are assigned to the volatilities. If the parameters associated with the infectious period distributions, i.e. and are assumed to be unknown then prior distributions need to also be assigned to these. An obvious choice for weakly informative priors would be to assume that both parameters are a-priori independent and follow exponential priors similar to L , G . As we do not make any assumption about which country entered the crisis …rst, we consider a joint prior distribution for k and E k as follows: where j j denotes the cardinality of a set and

Incorporating Additional Covariates
Explanatory variables are, in principle, straightforward to incorporate within a HEM through the transmission rates. In the most general case one can allow for di¤erent covariates a¤ecting local and global rates as follows: where L;ij is the local crisis trasmission rate from the infected country i to the susceptible country j, L;i0 is the local baseline transmission rate, X L;ij = (X L;ij1 ; :::; X L;ijK ) are the covariates of interest, and L = ( L1 ; :::; LK ) are the associated coe¢ cients; similarly for the global counterparts. An example of a covariate, X L;ijk (X G;ijk ) could be the exports from country i to country j, at the local (global) level or some proxy for …nancial linkages as will be considered in our empirical application. It is then of interest to infer the e¤ect of the di¤erent covariates on the transmission rates by estimating the parameters L and G .
This will allow to evaluate the importance of di¤erent channels in the propagation of a crisis across countries. Note that for L = G = 0; the baseline hidden epidemic model with two levels of mixing is recovered. The posterior distribution of interest then becomes We employ a Metropolis-within-Gibbs algorithm to draw samples from the posterior distribution of interest (8). Apart from the volatilities which are updated using a Gibbs sampler, all the other parameters in the model, including the times of entry to and exit from the crisis, are updated using a Metropolis-Hastings algorithm with Gaussian proposal distributions.
Remark 1 Unlike when only …nal size data are available where the SIR model is invariant to a latent period, this is not true for temporal data. A straightforward extension to consider in the latter case is a Susceptible-Exposed-Infected-Recovered (SEIR) model which assumes that once a country enters the crisis state, it can only trasmit the crisis (i.e. become infective) after a certain time period elapses.
Remark 2 In the case of real-time analysis, the methodology can be extended to conduct inference for the countries more likely to enter the crisis, given the current state of the process. For this purpose, a trans-dimensional MCMC algorithm (Green, 1995) is required which accounts for the variable dimension of the parameter space.
Remark 3 A threshold parameter similar to R ? (see Section 2.2) can also be de…ned for the hidden epidemic model, taking into account any additional covariate information. In this case, de…nitions of typical infective and susceptible countries are required for inclusion in the v( L ) term in (1).

Empirical Application
To illustrate the proposed methodology we analyse the contagious spead of …ve currency crisis episodes considered by Glick and Rose (1999), namely the breakdown of the Bretton Woods System, 1971, the collapse of the Smithsonian Agreement, 1973, the EMS Crisis, 1992, the Mexican meltdown and Tequila E¤ect, 1994, andthe Asian Flu, 1997. 10 The …nal outcome dataset is compiled from the cross-sectional binary data of Glick and Rose for 160 developed and developing countries, where a country that ultimately experienced the crisis in question takes the value of one, zero otherwise. These authors identify the binary crisis variable from journalistic and academic histories of the various crisis episodes. 11 Our choice to analyse currency crises was primarily driven by the evidence of contagion associated with these crises as reported in the literature.
We begin our analysis by dividing the countries into groups based on geographical location. A detailed list of the countries and the composition of regions, along with the countries a¤ected by each of the crisis episodes can be found in the appendix. 12 The regional decomposition is based on the United Nations classi…cation. Alternative population structures such as overlapping groups or networks based on the trade pattern, …nancial links or macroeconomic similarities between countries may also be considered. Linkages of this type will be incorporated here through covariates as shown in Section 3.3.

Final Size Data
In what follows we present posterior summary estimates of the local ( L ) and global ( G ) trasmission rates for each of the …ve currency crisis episodes. Since no information is available in …nal outcome data regarding the mean length of the period for which a country remains in crisis, we set the infectious period distribution in advance of the data analysis. This should be taken into account when interpreting L and G , while R will not be a¤ected as can be seen from equation (1). In the results that follow, without loss of generality the infectious period is set to unity. Slowly varying exponential distributions with rate 0.01 are used as priors.
The results, summarised in Table 1, give the mean posterior estimates and corresponding 95% credible intervals for the local and global contact rates, as well as the ratio of global (between region) to total (within region) per-country contact rate for each crisis episode. Since the infectious period is set to unity, this ratio also represents the ratio of between to within country-to-country infectious contacts. The results indicate an increase in the global trasmission rate over time across the di¤erent currency crises with a simultaneous decrease observed in the local rate. This is particularly apparent from the ratio G N L + G ; which is very small for the crises of the seventies and increases to almost a half in the case of the 1997 crisis, with the length of the corresponding intervals also increasing.
The shift from local to global spread over time potentially re ‡ects the signi…cant increase of global …nancial linkages across countries in recent decades. While empirical evidence in the literature suggests that currency crises tend to be mostly regional, only a model allowing for both local and global e¤ects can truly assess the relative importance of each of these dimensions in the transmission of crises. However, it must be pointed out that while the 1992 crisis was mainly con…ned to European countries, the results in Table 1 do not bring out such a feature. Indeed, a further re…nement of the analysis is required to shed light on the true nature of the EMS crisis episode. This will be undertaken in Section 4.1.1 where we consider including covariates in the analysis, re ‡ecting certain characteristics of the countries involved.  Foss and Konstantopoulos (2003).

Multitype Processes
Motivated by the evidence that crises in developing economies are of a di¤erent nature than those in developed ones (Kaminsky, 2006), we consider further partitioning our population of countries into developed and developing, based on the world factbook IMF classi…cation.
This distinction allows for the possibility of these two groupings having di¤erent local and/or global rates, rather than assuming equal susceptibility and infectivity rates across all countries. It therefore enables to distinguish whether a particular crisis episode a¤ected mostly developed and/or developing countries, avoiding potential misjudgement that may arise from overlooking the degree of economic development of the countries under study. In addition, an analysis that considers a population of multiple types can be useful in uncovering important transmission channels that may go unobserved in the context of a single type model, as will become clear in what follows. This kind of extension essentially involves introducing categorical covariates into our model speci…cation that can be handled using multitype epidemic models. Table 2 below gives the proportions of the a¤ected developed and developing countries across the di¤erent crisis episodes. For example, in the case of the 1992 EMS crisis, 10 out of 29 developed countries were a¤ected, while no developing country su¤ered the crisis in question. Moreover, all a¤ected countries were in Europe so we would expect a high local transmission rate among developed countries, which could not have been apparent from Table 1.
We consider a two type, two level mixing stochastic epidemic model to characterise the spread of crises among developed and developing countries. Multitype analysis involves a further decomposition of the local and global rates relative to the single type framework, re ‡ecting the data provided in Table 2. To see this let L = f ij;L g and G = f ij;G g, i; j = 1; 2; denote the 2 2 matrices of local and global infectious rates, respectively. Subscript 1 (2) refers to the developed (developing) countries, so that for example 12;L denotes the local rate at which the crisis a¤ecting a developed country is transmitted to a developing country. It is evident that the number of infection rates to be estimated has now increased considerably relative to the single type model. Certain modelling restrictions are therefore necessary for identi…ability, unavoidably for the G 's and possibly for the L 's depending on the dataset under consideration, see Britton (1998) and Britton and Becker (2000) for a detailed discussion.
We consider the following restriction: we allow for distinct local rates when the data contain su¢ ciently rich information for identi…cation purposes. This is not always the case.
Based on the data provided in Table 2, for the earlier crises of 1971, 1973 and 1992 no developing countries were a¤ected. Hence, the data contain no information with respect to the local and global transmission of these crises from one developing country to another, that is 22;L and 22;G ; respectively, and hence results will be largely informed by the prior. 13 In such cases, for the local rates we assume equal susceptibility and distinct infectivity, which implies 11;L = 21;L ; and 12;L = 22;L ; that is developed countries have di¤erent potential in transmitting the crisis compared to developing ones, while all countries are equally susceptible. Globally, it is well known (e.g. Ball et al., 2004) that at most two transmission rates are identi…able. Thus, in keeping with our local assumptions, we assume common global susceptibility to a crisis, but distinct global infectivity. We consider this choice to be reasonable within the present context. Scenarios with alternative susceptibility levels, potentially de…ned based on economic information, are also possible. In fact, within our Bayesian framework it is possible to consider any structure for L and G subject to the required identi…ability restrictions.
We begin by presenting in Table 3 the posterior means and standard deviations of the two type model when equal local and global vulnerability is considered for all crisis episodes.
For the earlier crises of 1971, 1973 and 1992, both local and global rates are smaller for the developing countries compared to the developed countries. The results are less homogeneous for the later crises and largely re ‡ect their relative severity, with the developing countries being generally more a¤ected, especially globally.    Table 2. A reasonably high local transmission rate is also observed between developed countries. Transmission rates at the global level are similar to those reported in Table 3.

Temporal Data
We follow the de…nition of a currency crisis by Frankel and Rose (1996), namely a successful speculative attack that manifests itself through a large nominal depreciation of the currency.
As such, we consider daily log changes in nominal exchange rates as our observed data, that can be used to estimate the entry to and exit from the crisis, in addition to the transmission rates and volatility parameter. To capture the well documented importance of trade and …nancial linkages in the spread of contagious currency crises, we include related variables as covariates in the hidden epidemic model. Since the relative importance of the trasmission rates has already been extensively discussed, our focus will be on assessing the signi…cance of these covariates.

Exchange Rates
We use daily log exchange rate returns for those countries a¤ected by the crisis, for each crisis episode. While in principle exchange rate data could be considered for all countries in the sample, for consistency with the analysis in Section 4.1 we proceed by making use of the knowledge of those countries that were a¤ected by the crisis. The Deutsche Mark is used as the reference currency for the 1992 episode, given that this was the anchor currency within the European Monetary System at the time, and the US dollar for the 1994 and 1997 crises. The returns were originally computed over a …ve year window, including two years preceding and two years following the crisis year. However, to avoid overlapping crises, the …nal estimation samples were chosen as, 01/01/1990-15/03/1994, 16/03/1994-31/12/1996, and 01/01/1997-13/03/1998 for the 1992, 1994, and 1997 crises, respectively. Further details regarding the data are available in the appendix. Among the infected countries for the 1994 and 1997 crises, Argentina and Hong Kong maintained an exchange rate peg and were therefore excluded from the sample for the purpose of the HEM analysis.

Covariates
Trade based on the average of import and export …gures. The latter allows to assess the importance of imports, which is ignored in the analysis of Glick and Rose (1999) as they admittedly point out.
Both trade covariates are based on annual …gures averaged across the three years typically immediately preceding each crisis episode. Further details are available in the appendix.
Countries where data for more than 20% of trading activity were not available were dropped from the sample for each crisis episode. 14 This resulted in sample sizes of 99, 107, 106 countries for the 1992, 1994 and 1997 crises, respectively, for exports only, and 124, 133 and 132, respectively, for imports and exports.
We model the instantaneous rate at which country i exerts (infectious) pressure on country j, just before country j enters the crisis as ij = G N + L 1 (i;j in the same region) e X ij ; where X ij denotes the acting trade covariate, that is the trade share matrix of the infected countries viz a viz all countries in the sample, is the corresponding covariate effect, and L , G denote the local and global transmission rates, respectively. Although in principle one could use a more general model and allow the covariate X ij to separately a¤ect the local and global rates, as discussed in Section 3.3, we opted for a simpler model in the interest of parsimony. We assign a Gaussian prior with large variance to the parameter , as for all covariate e¤ects in the illustrations that follow.
For a given infected country, the stronger its trade linkages with the remaining countries the higher the rate of transmitting the crisis to these countries, other things being equal.
This interpretation is di¤erent from that of Glick and Rose (1999) and other studies, who focus on the e¤ect of trade on the probability of a country becoming infected, rather than the probability of the infected country transmitting the crisis to other countries. In our context, the probability of a country becoming a¤ected by the crisis can be evaluated as a function of the transmission rates, and the infectious pressure exerted on that country. Table 5 (-38.48,5.10) Financial Covariates Financial covariates for the 1994 and 1997 crises are constructed based on two sets of bi-annual banking data from the Bank of International Settlements (BIS) beginning in 1988, namely international lending from the international consolidated statistics and international borrowing from the locational international banking statistics. As in the case of trade, we constructed three year averages based on those years typically immediately preceding the crisis date. This resulted in 124 and 136 countries for the 1994 and 1997 crisis, respectively. We employ three commonly used measures for …nancial linkages between the common lender and crisis countries (see Van Rijckeghem and Weder 2001, Caramazza et al., 2004, Dasgupta et al., 2011and Haile and Pozo, 2008. USA and Japan are the common lenders for the 1994 and 1997 crises, respectively. (i) A measure of the importance of the common lender to the crisis country, that is the proportion of borrowing from a common lender, given by F 1 i = b i;c =b i , where b i;c is total borrowing of country i from the common lender c and b i is total borrowing of country i.
(ii) A measure of the importance of an a¤ected country to a common lender, that is the proportion of borrowings of an a¤ected country in the lending portfolio of a common lender, expressed as F 2 i = l i;c =l c ;where l i;c is lending of a common lender to country i and l c is total lending of a common lender.
(iii) A measure of competition for funds, that is the extent to which country i competes for borrowings from the same common lender as the ground zero country, given by where 0 denotes the ground zero country, c is the common lender, x i;c is total lending from a country c to county i, and x i is total borrowings of country i: The higher the value of F C i , the greater the competition for funds between countries i and 0.
The transmission rate from an 'infectious' country i to a 'susceptible' country j, ij , is given by ij = G N + L 1 (i;j in the same region) e Z i ; where Z i denotes the acting …nancial covariate either F 1; F 2, or F C, and the associated coe¢ cient. Table 6 reports the mean, median and 90% credible interval for the posterior distribution of the coe¢ cient associated with the di¤erent …nancial covariates, for the 1994 and 1997 crises. These coe¢ cients appear to be largely negative as would be expected. For a given infected country, the greater the proportion of borrowing from a common lender (F 1) or in the lending portfolio of a common lender (F 2) the more 'protected'that country becomes and so the smaller the probability of transmitting the crisis to other countries. The results point to a signi…cant role for the common lender e¤ect in the 1994 crisis, when measured by the F1 covariate. Trade and Financial Covariates Next we consider including both trade and …nancial covariates together in the model so that we have ij = G N + L 1 (i;j in the same region) e 1 X ij + 2 Z i ; where X ij and Z i denote the acting trade and …nancial covariates de…ned as above, with 1 and 2 being the corresponding e¤ects.
When both trade and …nancial covariates are included in the model simultaneously, the posterior distributions are wider, as con…rmed by the posterior estimates and associated credible intervals presented in Table 7. This table shows

Policy Relevance
Understanding how …nancial crises spread, through models such as the one proposed here, can enhance in the design and evaluation of immunisation policies to reduce the risks and manage the impact of contagion. So far, at the domestic level, the need for policies aimed at reducing …nancial fragility has been emphasised; at the international level, the role of better …nancial standards and of the international lender of last resort has been discussed, see Chang and Majnoni (2001). The latter can provide liquidity to crisis countries to withstand pressures of contagion, as witnessed in the recent economic crises, in the form of rescue packages.
Among the questions increasingly raised on the policy front are how severe is a particular crisis and how to distribute the available resources to sustain countries that have experienced or may be experiencing negative outcomes (how many and which countries to support). The proposed approach can o¤er answers to such questions, as we illustrate below, by drawing on the past experience of the …ve currency crises episodes analysed earlier. Lessons from these episodes can o¤er valuable insight to policy makers for future di¢ culties.
A number of immunisation policies have been developed, mostly with reference to epidemics among humans or animals (Anderson and May, 1991), though examples exist in other …elds like computer science (Balthrop et al., 2004). The threshold theorem described in Section 2.2 provides a natural formulation for evaluating this kind of strategies. In particular, having obtained the parameter estimates of our model, that is the local and global transmission rates, we can compute the severity measure R , given by (1), for the individual crisis episodes. Recall that if R > 1 a large number of countries will su¤er from the crisis in question with positive probability, while if R 1 only a small number of susceptible countries will ever be a¤ected. Control measures, therefore, typically aim to reduce R below unity with high probability, which we set to 0.95 in the results that follow. The situation where a major 'outbreak'is unlikely to occur is often referred to as 'herd immunity'. Having computed R we can then sample from its posterior density, and estimate the percentage (or number) of countries to support, denoted by p v , in order to prevent a major crisis. In other words, we will estimate the smallest p v such that P (R < 1) = 0:95.
We will examine here a simple support strategy where the countries to be supported are chosen uniformly at random. Recall that the threshold parameter without support is given by R = G E(I) P j j j j . When a proportion p v of the countries receives support the threshold reduces to R (p v ) = G E(I) P j j j P z j r z j (1 p v ) j p z j v , since the number of countries prone to the crisis reduces. The percentage p v is computed as the solution to the equation R (p v ) = 1: Thus, p v (and R ) are non-linear functionals of the basic model parameters, at least when the population structure is non-random and known. Inference for this type of functionals has been considered for two level mixing models in Britton and Becker (2000) assuming for simplicity that the outcome within each region is independent of the fate of other regions. Ball et al. (2004) also consider estimating R and p v using asymptotic arguments and assuming R > 1. The methods considered in this paper are free from these assumptions. Moreover, assuming R > 1 is not particularly satisfactory in our examples, as will soon become apparent. Alternative support policies, like supporting whole regions chosen at random, are also possible, in which case p v = 1 1=R , see Ball and Lyne (2006) for a review. In the results that follow we assume that …nancial support to a country confers complete protection from the crisis, or at least it e¤ectively prevents a particular country from becoming a¤ected. Table 8 gives estimates of the posterior mean of R , P (R < 1) and p v . A graph of the posterior distribution of R for all crisis episodes can be found in the appendix. The mean posterior estimate for R is greater than one for all episodes. In particular, the posterior mean of the 1971 and 1973 crises is 2.19 and 2.95 respectively, while that of the nineties crises is around 1.2. These results corroborate our earlier empirical …ndings relating to the increasing importance of G ; which is now re ‡ected in the decreasing length of the 95% credible intervals for R . The corresponding probability of a crisis being subcritical ('minor'), given under the heading P (R < 1), is smaller for the earlier crises compared to the later. In accordance, the associated percentage, p v , of countries to support in order to avoid a major crisis with a 0.95 probability decreases over time as noted by the …gures in the last column.
The results suggest that the crises of the seventies were of greater severity compared to those of the nineties. The threshold parameter R and associated control measures are also available in the multitype context, though the calculations are somewhat more involving. In the two type case, R is de…ned as the largest eigenvalue of a matrix M = fm ij g; i; j = 1; 2; where, crudely speaking, m 12 describes the mean number of contacts from countries of type 1 (developed) to countries of type 2 (developing). More details regarding the computation of the m ij elements are given in the appendix.
In addition to the support policy considered above, alternative policies can be implemented that provide partial coverage to more countries as opposed to o¤ering complete protection to a smaller number. This approach is more involved and additional optimisation techniques are required. It should be noted that if the local transmission rate is small, as may be the case in a globalised economy, there will not be a signi…cant di¤erence between the various adopted policies, at least for homogeneous individuals. Britton and Becker (2000) consider immunisation strategies within a simpler model, however allowing the level of susceptibility to the crisis to vary among individuals. Such extensions can be naturally accommodated within the framework of multitype epidemics discussed earlier.
As demonstrated from the above analysis, the proposed methodology o¤ers a set of valuable control measures that can be used to analyse contagious …nancial crises. When

Discussion
Crises have been a recurrent feature of …nancial markets for a long time, though it was primarily the crises of the nineties that sparked increased interest in the study of their dynamics and propagation. The experience of the recent crises has rekindled such interest, emphasising the complexity of the …nancial system, and the need for a better understanding and monitoring of systemic risk and contagious e¤ects.
This paper proposed a modelling framework to analyse …nancial contagion based on a stochastic epidemic process. The proposed approach directly accounts for the inherent dependencies involved in the propagation of …nancial crises. In particular, it allows for local and global transmissions via direct and indirect links to the originally a¤ected country.
Perhaps more importantly, the framework provides an implicit control mechanism, which includes a canonical measure of the crisis severity along with an estimate of the number of countries to support, in order to prevent a major crisis.
The suggested framework is general in nature, in that it can be applied to any contagious …nancial crisis not only as a way to learn from past experiences, but also as the crisis unfolds, enabling the evaluation of prospective immunisation policies. At the same time the approach is ‡exible, as it allows to incorporate features that re ‡ect relevant theoretical and empirical evidence in the literature through the inclusion of appropriate covariates. Another notable characteristic is that it is simple enough to be amenable to model analysis and statistical inference procedures. 15 This is in contrast to more complex stochastic models which are typically explored through simulations. Relating the latter to real data is far from trivial, unless simplifying assumptions are considered. In addition, the suggested framework naturally caters for temporal data, through the use of the proposed novel hidden epidemic model, contrary to the percolation-based approach. From a methodological viewpoint, it also has several appealing features. It dispenses with approximations such as in…nite population, independent regions or supercriticality as is often assumed in epidemic modelling.
Moreover, the proposed approach enables to obtain additional information relating to the propagation of a crisis, not discussed thus far. This includes the set of potential infectors and their corresponding probabilities. The estimation of such crisis characteristics will be more precise in the case of temporal data. Inference about 'the most likely path'of the crisis spread can also be conducted, resulting in a set of the most probable pathways and their corresponding probabilities. Related work is presented in Shah and Zaman (2011). On the control side, an estimated cost can be assigned to each country and the total cost of the crisis in question can be calculated.
Further extensions can also be accommodated. The present set-up assumes a-priori independence of the recovery mechanism across countries, i.e. independent infectious periods.
This can be relaxed and alternative processes can be incorporated into the framework, tai-15 It should be recognised, however, that the assessment of epidemic model …t is not a trivial matter. This is partly due to the bimodal realisations of such model outcomes. In the preceding application, we performed an informal assessment by simulating 1000 epidemics from the estimated posterior predictive distribution of the stochastic epidemic two level mixing model for each crisis episode. The results showed larger outbreaks for the seventies and smaller epidemics for the nineties, indicating reasonable model …t.
lored to the application under consideration. A simple autoregressive structure could be a reasonable starting point to characterise the potential dependence of infectious periods.
More involved density-dependent processes, can also be considered. For example, the model could be combined with models for the spread of rumours. The latter are similar to epidemic models but the sti ‡ing (recovery) of an individual depends on the recovery of others.
In fact, within the economics literature, rumour models have proved useful in the study of the e¤ects of di¤usion of beliefs on market outcomes, see Banerjee (1993) andKosfeld (2005). However, the use of classical rumour models alone (for example the Daley-Kendall and Maki-Thompson models, see Daley and Gani, 2000 for a review) would be inappropriate in the current context, as they imply that a major crisis will always occur. An interesting combination of epidemic and rumour models is presented in Nekovee et al (2007) using interacting Markov chains. 16 In practice, an extension of this kind would only a¤ect the recovery component of the likelihood associated with the hidden epidemic model, while the infection mechanism and subsequently the control mechanism, would remain una¤ected. Mathematically this holds true since the spreading mechanism is of second order and its e¤ect on the initial stages of spreading is negligible. Allowing for time-varying intensities could also be of interest, which can be accommodated by replacing I i with R 1 0 i (t)dt for 'suitable' infectiousness functions i (t). Such extensions and variants thereof, are left for future work. 16 They show that in the case of inhomogeneous networks the threshold parameter should be multiplied by E(k 2 )=E(k) where k is the degree of connections and E denotes the expectation operator. For homogeneous networks they demonstrate that the phase transition of classical epidemics is su¢ cient in characterising their model behaviour. Notes: The regional decomposition is based on the United Nations classi…cation. y denotes countries classi…ed as developed based on the world factbook IMF classi…cation, while the rest of the countries belong to the developing group. and denote the countries that are not available in the BIS consolidated and locational banking statistics and the IMF Direction of Trade Statistics (DOTS) databases, respectively, used to demonstrate the introduction of covariates into the analysis. Guinea is also known as French Guinea. Guyana is also known as British Guiana. Zaire is what is currently known as the Democratic Republic of the Congo. Chinese Taipei is otherwise known as Taiwan. Yugoslavia is what used to be Yugoslavia SFR before its break up.

A.1 Exchange Rates
The dollar exchange rates were collected from Datastream. Exchange rates for the Brazilian Real for the 1994 crisis and the Vietnamese Dong for the 1997 crisis were available from Datastream only in British bounds and were converted to US dollars using the £ /$ exchange rate. The Deutsche Mark exchange rates were obtained from the Bundesbank. For Finland and Sweden these were not available and were thus obtained from Bloomberg and the Bank of Finland, respectively. There were a few countries in each crisis episode, for which large ‡uctuations in the exchange rates were observed prior and post the crisis date, brought about by domestic economic and political cirsumstances. For these countries, the exchange rate data corresponding to the sample for which these large ‡uctuactions were observed, was replaced by bootstrapped data from a subsample extending up to the crisis date. These include: for the 1992 crisis, Finland (01/01/1990-03/05/1992); for the 1994 crisis, Brazil (16/03/1994-19/10/1994), Hungary (16/03/1994-09/08/1994) and (20/11/1996-31/12/1996), and the Philippines (16/03/1994-14/11/1994; for the 1996 crisis Czech Republic (01/01/1997-02/06/1997), Hungary, Vietnam (01/01/1997-12/05/1997) and (16/02/1998-13/03/1998) and South Africa (01/01/1997-01/04/1997).

A.2 Trade Covariates
The trade covariates are based on annual …gures averaged across the three years immediately preceding each crisis episode. When data were available for only two years or one year over the three year window preceding the crisis, an average of the two was taken in the former case, or a single year was used in the latter. When no data were available over the immediate preceding three years, the three year window started from that corresponding to the …rst available preceding year most proximal to that of the crisis. Finally when no data whatsoever were available preceding the crisis and extending back to the beginning of the sample, 1980, the same rule as above was applied starting from the three years immediately following the crisis extending to 2007. We found this to be a reasonable compromise instead of dropping the countries from the sample given that the annual trade …gures were not very volatile. This rule was not applied in the case of …nancial variables due to the large di¤erence in the bi-annual …gures. Thus for the …nancial covariates, countries were dropped from the sample if no data were available extending back to the beginning of the period, 1988. After applying the above rule and dropping countries where data for more than 20% of trading activity were not available, missing values were still encountered for the trade data. These missing values only constituted a small fraction of the total data and were set to zero. Table A.4 provides a break-down of the percentages associated with the times that computation of the averages of the trade covariates was based on data preceding the crisis year, following the crisis year and the case where no data were available.  Here we provide the main elements for calculating ( L ) as described in Ball et al. (1997) where more details can be found. We use results from Addy et al. (1991) who derived recursive expressions for the distribution of the …nal size, extending Ball (1986) in the case of an epidemic in a homogeneous population, where individuals can be infected from outside with a …xed probability . Equivalently, the distribution of the …nal size can also be described in terms of Gontcharo¤ polynomials (cf. Lefevre and Picard, 1990). Let U = u 0 ; u 1 ; : : : be a given sequence of real numbers. Then the Gontcharo¤ polynomials attached to U; G 0 (x j U ); G 1 (x j U ); : : : ; are de…ned recursively by the triangular system of equations Suppose that for j = 1; 2; : : :, the proportion of groups of size j, r j =r, has limit j as the population size N ! 1, and let = P S j=1 j j be the mean region size, < 1. Then Ball et al. (1997) show that R = G E(I) ( L ) where ( L ) = 1 P S j=1 j j j is the mean crisis size in a region, started by a randomly chosen country in which only local transmission is permitted. We can calculate j = 1 + j 1;1 (1) from the equation where n is the group size, q i = ( L i), i = G i 1 (1 j V ), denotes the moment generating function of I and the sequence V is given by i = ( L (i + 1)) = q i+1 .

A.3 Posterior Probability Distributions
The case of a two type two level mixing model In the two type model R is de…ned as the largest eigenvalue of a matrix M = fm ij g for i; j = 1; 2. The full details of how to evaluate m ij are given in Ball et al. (2004). Brie ‡y, it holds that m ij = X n r i (n) 2 X k=1 n;i;k ( L )E(I k ); G kj i; j = 1; 2: (A.3) In (A.3), E(I k ) is the mean time that a country of type k remains in crisis, while G kj denotes the rate of global transmission from a country of type k to a country of type j. r i (n) = r i (n 1 ; n 2 ) is the probability that a country of type i chosen at random is located within a region that contains n i countries of type i. Suppose that the population contains r n such regions, r is the total number of regions and N i = P n n i r n is the total number of countries of type i. Then r i (n) = nirn Ni . The term n;i;k ( L ) denotes the mean number of type-j countries that will ultimately su¤er from a crisis within their region initiated by a type-i country. The details of calculating n;i;k ( L ) can be found in the appendix of Ball et al. (2004), being essentially the multitype extension of the n;a terms given in (A.2).