Ride the Wild Surf: An Investigation of the Drivers of Surges in Capital Inflows

Over the past 15 years, gross inflows to industrial and developing countries have enjoyed a wild ride. After reaching record highs in the run-up to the global financial crisis, they collapsed dramatically in 2008-09. As signs of global recovery reappeared, capital inflows resumed although at different speeds. The recovery in flows was faster and sharper in developing countries. This paper aims at understanding the (domestic and external) drivers of these surges in gross inflows using quarterly data for 67 countries from 1975 to 2010. It finds that domestic and external factors have significant explanatory power in driving surges of inflows. This finding holds for the sample of industrial countries whereas domestic factors play a significantly larger role in explaining surges to developing countries. Zooming into the findings shows that: (a) financial booms tend to attract massive capital inflows, (b) surges to either industrial or developing countries are driven by regional contagion, and (c) strong growth and natural resource abundance are keys to attract inflows of foreign capital into developing countries.


Policy Research Working Paper 6753
Over the past 15 years, gross inflows to industrial and developing countries have enjoyed a wild ride. After reaching record highs in the run-up to the global financial crisis, they collapsed dramatically in 2008-09. As signs of global recovery reappeared, capital inflows resumed although at different speeds. The recovery in flows was faster and sharper in developing countries. This paper aims at understanding the (domestic and external) drivers of these surges in gross inflows using quarterly data for 67 countries from 1975 to 2010. It finds that domestic and external factors have significant explanatory This paper is a product of the Office of the Chief Economist, Africa Region; and the Poverty and Economic Management Unit, Europe and Central Asia Region. It is part of a larger effort by the World Bank to provide open access to its research and make a contribution to development policy discussions around the world. Policy Research Working Papers are also posted on the Web at http://econ.worldbank.org. The authors may be contacted at ccalderon@worldbank.org and mkubota@worldbank.org. power in driving surges of inflows. This finding holds for the sample of industrial countries whereas domestic factors play a significantly larger role in explaining surges to developing countries. Zooming into the findings shows that: (a) financial booms tend to attract massive capital inflows, (b) surges to either industrial or developing countries are driven by regional contagion, and (c) strong growth and natural resource abundance are keys to attract inflows of foreign capital into developing countries.

Introduction
Global capital flows have been on a wild ride over the last 10-15 years. One of the salient features of financial globalization is the substantial increase of cross-border asset trade over the past 15 years. Figure 1 shows that gross capital inflows to both industrial and developing countries surged considerably during the pre-crisis period. Gross inflows to industrial countries went up from 9 percent of GDP in 2001 to 24 percent of GDP in 2007 while gross inflows to developing countries increased from 2 to 12 percent over the same period. In the wake of the global financial crisis, global capital flows retrenched dramatically and, as the world economy recovered, they regained momentum -especially in developing countries. 1 The motivation of our study is to understand the drivers of capital inflows. What drives the observed global trends in capital flows? Are these massive inflows of foreign capital being pulled by positive growth prospects and sound macroeconomic policy frameworks in the recipient countries? Are these massive flows being pushed by lower returns in advanced economies? Analyzing surges in gross inflows is important not only for their consequences on real economic activity but also for their impact on financial stability. Surges may have different effects on economic growth depending on the type of inflows. For instance, surges in portfolio equity or portfolio debt inflows have a negative impact (or, negligible, at best) on growth of the manufacturing sector value added. In contrast, surges in FDI inflows have a positive and significant impact on aggregate manufacturing growth -and, especially, for industries dependent on external financing (Aizenman and Sushko, 2011). Massive capital inflows will lead to credit build-up and asset price booms and, in some cases, may also end up in a systemic banking crisis (Tornell and Westermann, 2002;Barajas et al. 2009;Calderón and Servén, 2011;Calderón and Kubota, 2013).
Why is it important to assess the dynamics of gross inflows (vis-à-vis net inflows)? Gross financial asset and liability flows are rapidly moving across borders and are being intermediated by the global financial sector while net flows (and their counterpart in the current account) do not always capture those movements. Looking at net flows may not portray the entire story of a surge in foreign capital when the gross inflow position is sharply increasing. Therefore, it is important to manage gross flows for financial stability. The more globalized the financial markets, the larger gross financial flows have become compared with their corresponding current account balances. Examining gross flows identifies countries with greater intensity of crossborder asset trading and, hence, more susceptible of financial instability (Johnson, 2009). Rising gross flows may indeed reflect a more efficient diversification of risks across the globe, lower portfolio risk for a country's investors, and be a conduit for development opportunities. At the same time, increasing cross-border financial transactions tend to propagate interconnected counterparty risks across the system; thus, heightening systemic risks in times of turmoil (Cecchetti, 2011). 3 The rapid expansion of gross foreign debt assets and liabilities in advanced economies explain the greater intensity of financial transactions worldwide -specifically, the sharp increase in twoway trade of debt-type instruments. However, debt securities carry risks to financial stability for the countries involved regardless of their current account balance (Gourinchas, 2011). In the event of a negative shock to global liquidity, counterparty risk sharply increases and it potentially destabilizes the overall financial system. For instance, countries with greater proportion of short-term liabilities may have the risk to rollover their obligations. Liquidity problems can easily propagate and lead to insolvency of financial institution. The ensuing contagion can spread rapidly across national borders (Obstfeld, 2012).
Recent efforts in the literature have focused on the synchronization of real and financial cycles across economies (Claessens, Kose and Terrones, 2012). An expansion of credit in the domestic economy can lead to a stronger growth -typically, through higher TFP growth rather than robust investment (Levine, 2005). However, it can also lead to greater volatility and higher incidence of financial crises (Kaminsky and Reinhart, 1999;Gourinchas and Obstfeld, 2012). In turn, credit booms can be typically the outcome of surges in private capital inflows (Bruno and Shin, 2013;Calderón and Kubota, 2013), and the rapid increase in banking leverage has typically preceded periods of financial instability and crisis (Borio and Disyatat, 2011;Gourinchas and Obstfeld, 2012).
To the extent that surges of gross inflows statistically precede excessive monetary expansions, credit booms, asset price bubbles, overvalued currencies and raises the economy's vulnerability to currency and maturity mismatches, it is imperative for policy makers to understand fully the impact of inflow surges on financial markets -as captured by booms in credit (as well as asset prices). This has led to a renewed debate on the implementation of macro-prudential policies to manage systemic risks. The objective of macro-prudential policy tools is, for example, to contain systemic risks associated to excessive credit creation instead of eliminating the cycle of credit. Therefore, these tools are implemented to decouple or mitigate the relationship between surges in inflows and the incidence of credit booms. In this context, a mixed policy toolkit (with monetary and macro-prudential policy tools as long as they are complement each other), along with a sound regulatory framework, is required to manage large capital inflows (Balakrishnan et al., 2012). In spite of the prescription of a mixed policy toolkit, it is still recommended the use of conventional macroeconomic instruments as the first line of defense against large-scale capital flows (Chowdhury and Keller, 2012).
Our goal is to examine whether pull and/or push factors drive surges in gross capital inflows. We conduct Probit and Complementary log-log panel regression analysis for a sample of 67 countries using quarterly data from 1975 to 2010. The rapid financial globalization and increasing two-way capital flows have led to sharper gross capital movements (in and out of the domestic economy) that do not necessarily show up in movements of net inflows. Consequently, these net inflow movements cannot always explain these developments. We test the hypothesis by comparing the ability of pull and push factors in driving surges in gross inflows relative to surges in net inflows. In general, our findings support the fact that both pull and push factors would help explain the massive flow of funds from foreign investors. Our findings, for instance, show that financial factors at home (as proxied by the leverage of the domestic financial sector) and abroad (as measured by the leverage of U.S. brokers and dealers) play a greater role in explaining surges in gross inflows rather than surges in net inflows. This finding is consistent with the greater two-way capital flows experienced by countries across the world because surges in gross inflows are mainly driven by surges in debt flows (which are mainly associated to financial developments) while equity inflows play a greater role in driving surges in net flows (and this has a higher correlation with real sector developments).
An empirical characterization of the main features of surges in gross inflows shows that their duration is homogenous across countries. Their amplitude, on the other hand, has increased in the recent decade. Hence, the volatility of upswings in gross financial inflows has increased markedly in the 2000s. This greater amplitude of inflow surges has come along with an uptick in the volatility of financial cycles. Gross inflow surges are more than likely to coincide or precede financial booms. For instance, we find that surges in gross inflows with lending booms on average between 16 and 40 percent of the time -depending on the criteria 2 used to define lending boom. We should note that the synchronicity between surges in gross inflows and lending booms has increased among industrial countries while it has slightly declined among developing countries. Finally, we find that over the past three decades, surges in gross inflows tend to be followed by a sudden stop in nearly half of the cases for developing countries and only in a third of the episodes among industrial countries.
The main message of this paper is that both domestic and external factors drive surges in gross and net capital inflows. Our evidence from the pull factors shows that current account developments are a robust predictor of surges in net inflows, therefore, higher current account deficits bring about a greater amount of foreign financing. On the other hand, growth in domestic credit plays a greater role in explaining surges in gross flows. In our results of the push factors, the increased leverage of US brokers and dealers (a proxy of the leverage of US funding markets) robustly predict subsequent surges in both net and gross inflows from the external economy to the domestic economy. This is consistent with the findings of Bruno and Shin (2013) where highly leverage financial systems in the United States have helped explain the massive inflow of capital worldwide. Domestic factors are the major driving force of surges in the developing countries while domestic and external factors induce surges in the industrial countries. Financial booms tend to attract massive capital inflows. Regional contagion also drives the higher incidence of surges. Strong economic growth and natural resource abundance attract foreign investors to pull massive capital flows into developing countries.
Our empirical results robustly support both pull and push factors help explain surge episodes in gross capital inflows regardless any criteria, any sample of countries and both overall and private flows. More specifically, we find that pull factors such as domestic economic growth, current account, exchange rate regime, natural resource abundance and debt-led gross inflows significantly contribute to explaining surges of inflows. Among the significant push drivers we have the leverage of U.S. funding markets, global policy uncertainty, S&P 500 returns and volatility and regional contagion.
When controlling only for the domestic drivers of capital inflows ("pull" factors), on the one hand, positive economic growth leads to surges of gross inflows in the domestic economy. The incidence of surge episodes is reduced in countries with more flexible exchange rate regimes and/or when current account deficit widens. Surges in gross inflows are more likely to take place whenever there is a build-up in domestic credit, buoyant asset prices and greater trade and financial openness. On the other hand, when controlling only for the external drivers of inflow surges ("push" factors), foreign growth and contagion coefficients create surge episodes. Surges inflows in the domestic are significantly more likely to take place when external growth increases, and if a massive surge is flowing within the region where the domestic country is located. Lower returns to foreign assets and lower global risk aversion would encourage foreign investors to shift their portfolios out of their own countries. An analogous result is obtained for the index of policy uncertainty as surges are less likely to take place when global policy uncertainty is heightened. Finally, we test the ability of the US financial markets to drive surges in capital inflows. Following Bruno and Shin (2013) we use the leverage ratio of US brokers and dealers and then we find that this variable has a robust predictive power.
Accounting both pull and push factors, growth in the domestic economy would increase the likelihood of subsequent surges in capital inflows regardless of whether: (a) we compute the surges with overall or private inflows or (b) we normalize flows by real output or not. Accordingly, current growth developments in the domestic economy are a robust predictor of the behavior of foreign investors. On the one hand, surges in inflows are more likely to take place in countries with smaller current account surpluses or running deficits. Countries running current account deficits are going to need larges inflows of foreign finance to prevent imbalances in the balance of payments. Surges in inflows are less likely to happen in countries with flexible exchange rate arrangements and, remarkably, in countries with low and stable inflation. Surges in overall inflows show negative insignificance while surges in private inflows indicate positive significance. The coefficient estimate of the exchange rate regime is not robust to changes in the definition of inflows.
Financial cycles are characterized, among other factors, by expansions of credit in domestic markets and a sharp real overvaluation. Consequently, our findings show that financial booms drive surges in gross inflows. Our findings robustly explain the incidence of future surges in gross inflows. This mostly holds regarding our definition of gross inflows.

6
Surges robustly tend to happen in countries with natural resource abundance. Primary commodity exporters may be attractive to foreign investors that may be related to the evolution of commodity prices such as fuel, mineral ores and metals. Surges are more likely to occur in countries with greater financial openness and that these episodes are mostly driven by surges in debt rather than in equity inflows. This paper consists of 5 sections. After the introduction in Section 1, Section 2 reviews the literature on the surges in capital inflows while Section 3 describes the data and methodology. Section 4 briefly reviews the econometric methodology and presents the empirical evidence with limited dependent variable techniques while Section 5 concludes.

Literature Review
This section reviews three different strands of the literature on the drivers of capital inflows. First, we look at the empirical evidence on the 'pull' and 'push' factors that determine capital flows. Second, we review the evidence on the relationship between productivity differentials and the direction of foreign capital inflows. The third strand of the literature examines the drivers and consequences of extreme movement in capital flows by, more specifically, focusing on empirical studies about surges in capital inflows. Therefore, we review the research on the drivers and consequences of massive inflows of foreign capital -labeled as either capital flow bonanzas, capital flow booms or surges in capital inflows. Most of these studies look at entry of net inflows whereas most recent studies analyze surges of gross inflows.
The first strand of the empirical literature that we review in this Section focuses on the internal and external drivers of capital inflows into developing countries -this is what Fernandez-Arias (1996) defines as 'pull' and 'push' factors, respectively. Push factors, on the one hand, comprise indicators such as growth in major trading partners, the world real interest rates, return and volatility of global stock markets, global risk aversion and indicators of global policy uncertainty, among others. Pull factors, on the other hand, include growth in domestic economic activity, the soundness of the macroeconomic policy framework, and the quality of institutions, among others. Overall, he finds that push factors play a large role in driving capital inflows, consequently, developing countries are vulnerable capital inflow reversals -as the latter are mainly driven by exogenous external shocks. In this research he uses quarterly data for 13 middle-income countries (MICs) from 1989q1 through 1993q2to examine whether portfolio (equity and debt) inflows to MICs are driven by pull or push factors. He finds that surges to MICs are explained by improvements in country creditworthiness while developing country creditworthiness is largely driven by external factors, especially, the world interest rates. Therefore, surges in inflows in MICs are largely pushed by low returns in developed countries rather than pulled by country-specific factors.
Fratzscher (2012) evaluates the drivers of capital flows during the 2007-8 global and the postfinancial crisis recovery using mutual funds data across 50 countries. His data set comprises 7 weekly information of portfolio investment flows with worldwide coverage for more than 14,000 equity funds and 7000 bond funds. 3 He finds that 'push' factors -as captured by indicators of global liquidity and risk-are the main drivers of capital inflows during crisis and recovery periods. He also shows that 'pull' factors (as captured by quality of institutions and macroeconomic fundamentals) help explain inflow of capital in emerging markets during the post-crisis recovery period. His estimates explains that there is cross-country heterogeneity in the impact of push factors on capital inflows, and this heterogeneity is mainly driven by differences in the quality of domestic institutions, country risk and the strength of domestic macroeconomic fundamentals.
The second strand of the literature investigates the theoretical prediction of the neoclassical theory -that is, foreign capital would flow from rich to poor countries due to diminishing returns to capital. In a seminal paper, Lucas (1990) found that the data failed to confirm this theoretical prediction, and this empirical regularity was called the "Lucas paradox." Alfaro, Kalemli-Ozcan and Volosovych (2008) conduct a comprehensive test of the "Lucas paradox" using annual data on net inflows for 81 countries over the period 1970-2000. 4 They examine two different groups of explanations that may reverse the Lucas paradox: a) differences in fundamentals affecting the economy's structure of production (say, technological differences, missing inputs, institutional structure and quality of government policies), and b) international capital market imperfections (say, sovereign risk and asymmetric information). They robustly find that institutional quality is the driving force that resolves the Lucas paradox. Their estimates show, for example, that improving Peru's quality of institutions to that of Australia will quadruple the amount of foreign investment.
Franken and van Wijnbergen (2010) investigate the drivers of capital flows to resolve the "Lucas paradox" for low income countries (LICs). They use annual data on net inflows (overall and by type) from 1981 to 2006. LICs are among the group of countries where the share of FDI in total gross inflows is the largest. They show that (net) private capital -and, more specifically, net FDI-will flow to poorer countries if they are integrated to international trade, they have natural resources and experience debt relief episodes.
The third strand of the empirical literature reviews the determinants of massive inflows of capital. In a seminal paper, Reinhart and Reinhart (2009) conduct a comprehensive study of capital flow bonanzas using annual information of net capital inflows for 181 countries from 1980 to 2007. They find that bonanzas are more frequent as countries have lifted restrictions on international capital flows. These episodes are also persistent and may typically end up in an abrupt reversal (i.e. "sudden stop"). 5 Their characterization of capital inflow bonanzas shows that these episodes are highly likely to be related to banking, currency and inflation crisis in developing countries and hence, they systematically precede sovereign default episodes (Reinhart and Rogoff, 2008). Cardarelli, Elekdag, and Kose (2010) extend the Reinhart and Reinhart (2009) study and examine the experience of massive capital inflows to industrial economies and emerging markets. They identify 109 episodes of large net private capital inflows in 52 countries over 1987-2007 -of which 87 episodes were completed by 2006. These episodes of massive (net) inflows were associated with an acceleration of economic growth (although a transitory one), and they are likely to end up with a sudden stop or a currency crisis. 6 As a result, the surge in capital inflows is also associated to deterioration in the current account and a real effective exchange rate appreciation.
Forbes and Warnock (2012a) undertake one of the first comprehensive studies that examine extreme movements in gross capital flows. They identify episodes where domestic and foreign investors increase or decrease significantly their flow of capital into or out of the domestic economy (i.e. surges, stops, flights, and retrenchment episodes) 7 . They use gross inflows and outflows from 1980 to 2009 for more than 50 emerging and developed economies-thus, differentiating between changes in the portfolio of domestic vis-à-vis foreign investors-but also quarterly data on gross capital flows -which better captures the movements of capital along the cycle. They show that surges are mainly driven by global factors (say, push factors): lower global risk (driven by decreased economic uncertainty and changes in risk appetite) and sustained global growth will increase the probability that countries will experience surges. They also find that a loose monetary policy stance in the advanced world will increase the probability of surges of inflows in middle-income countries. On the other hand, economic growth is the sole domestic driver of surges with significant explanatory power. Robust growth is associated with a higher probability of inflow surges. Remarkably, they fail to find any explanatory power for the depth of the country's financial system.
Forbes and Warnock (2012b), in turn, examine the extent to which extreme movements in gross flows (i.e. surges, stops, flights and retrenchments) are drive by different types of capital flows. They divide them into debt-and equity-led episodes. For instance, if gross inflow increases are mainly attributed to debt-type flows (say, bonds and banking flows), they identify this episode as debt-led surge. If driven by equity inflows (say, FDI and portfolio equity), it is an equity-led surge. They find, on the one hand, that equity-led surges do not have a systematic association with either pull or push factors -therefore, they are more likely to be idiosyncratic. On the other 5 Agosín and Huaita (2011,2012) show that capital flow bonanzas -measured by sharp increases in (net) capital inflows-sow the seeds of sudden stops in emerging market economies. 6 Empirical evidence shows that nearly 40 percent of complete episodes of massive capital inflows (34 out of 87) are followed by an abrupt reversal of inflows, and only 15 percent end up in a full-blown currency crisis (Cardarelli et al. 2010). 7 Along the lines of this research, Calderón and Kubota (2012) show that foreign and domestic investors' decisions are driven by different factors and have dissimilar responses to shocks and policies. 9 hand, debt-led surges are more likely to take place when risk aversion is low and if there is regional contagion. On the domestic front, economic growth tends to precede debt-led surges. As a result, surges episodes are mainly led by an increase in debt-type inflows and are associated with both pull and push factors. Zooming into regional developments on gross inflows, Powell and Tavella (2012) find that surges of gross inflows into Latin America are likely to be followed by recessions, financial crisis 8 , or both -with financial instability and, therefore, macroeconomic instability probably being preceded by excessive capital inflows. Their criteria of gross inflows includes FDI, portfolio investment liabilities, other investment liabilities, and the credit items of the capital account for 44 emerging economy from 1980 to 2005, and they define surges following the criterion in Cardarelli et al. (2010). Their findings support that the composition of capital inflows explains the likelihood of surges that end up in banking crises: an increasing amount of both portfolio inflows and banking inflows will raise the probability of crisis. The extent of financial reform, the quality of financial supervision, credit expansion and reserve accumulation also play a role in explaining surges ending in financial crises. In this context, reserve accumulation and financial oversight may help mitigate the likelihood of surges ending up in flow reversals.
Unlike Forbes and Warnock (2012a b), Ghosh, Kim, Qureshi and Zalduendo (2012) study the behavior of net inflows (rather than gross) and examine the determinants of (net) flights and (net) retrenchments 9 with annual net capital inflows for 56 emerging market economies from 1980 to 2009. They test whether these massive flows correspond to either changes in the country's foreign asset position or changes in their liability position. Then, they systematically relate the incidence and magnitude of surges with macroeconomic and structural features of the domestic economy, the return differentials and indicators of risk in global markets, among others. Their findings show that global factors -as captured by lower US interest rates and lower global risk aversion-play a major role in explaining the likelihood of inflow surges. Domestic fundamentals (say, growth, flexibility of exchange rates, quality of institutions and financial openness) can predict the likelihood of future surges as well as their magnitude. Sula (2010) examines whether surges in capital inflows tend to precede sudden stops during crisis episodes for 38 emerging market economies over 1990-2003 with annual data on net non-FDI inflows. He finds that sudden stops are more likely to take place if preceded by a massive surge in capital inflows -and this probability is even higher if the surge comes along with widened current account deficits and overvalued real exchange rates. His findings also support that the composition of the surge matters to predict sudden stops: debt-led surges are more likely to precede capital inflow reversals.

Defining Surges in Capital Flows
This section describes the methodology used to identify episodes of surges in gross capital inflows using quarterly data information for 71 countries (23 industrial economies and 48 developing countries) from 1975 to 2010. We then describe the sources of data used to obtain our data on capital flows. Finally, we count the number of surge episodes using alternative criteria for these massive inflows and two different measurements: the first measure uses the overall amount of gross inflows whereas the second one considers only the private component of gross inflows. The identification criteria follows in this paper is: (a) CDMN criterion adapted from Cowan, De Gregorio, Micco and Neilson (2008), and (b) FW criterion as implemented in Forbes and Warnock (2012a, b).

Methodology
We first describe the procedure to identify episodes of surges in gross inflows. Our first criterion to identify surge episodes in gross inflows mainly follows the methodology implemented by Forbes and Warnock (2012a, b) -which we denote as the FW criterion. According to this criterion, we first compute the cumulative sum of gross inflows over the last four quarters (i.e. cumulative annual inflows in period t). We denote , as the sum of quarterly gross capital inflows (GIF) over the last four quarters. In addition, we define ∆ as the year-over-year changes in . We can express these variables as follows: where: ∆ = − −4 , = 5,6, … , Next, we calculate the rolling mean and standard deviation of ∆ for each country. Surges in gross inflows are defined as periods when ∆ increases more than one standard of deviations above its rolling mean. Consequently, the end of surge periods indicates that ∆ drops below one standard of deviation above its rolling mean. Therefore, surges in gross capital inflows are captured by a dummy variable that takes the value of one whenever the conditions stated above hold, and zero otherwise.
We apply similar criteria as stated above to gross inflows as a ratio to GDP. This is in line with our second identification criterion -which follows the strategy outlined in Cowan, De Gregorio, Micco and Neilson (2008). We use gross overall inflows and we divide them by GDP. The identification of surges in gross capital inflows normalized by GDP is denoted as the CDMN-11 criterion to define inflow surges. We divide the amount of gross inflows by the amount of real GDP. More specifically, we take the one-year (4-quarter) lagged value of real GDP. 10 Finally, we identify surges in gross inflows for both overall amount of inflows and private capital inflows. 11 Private inflows are computed as the overall inflows minus its public sector component -that is, gross other investment (OI) inflows associated to OI general government and monetary authority inflows. 12

Data and Episode Counting
Our database comprises quarterly information on net and gross capital inflows for 71 countries (23 industrial economies and 48 developing countries) from 1975q1 to 2010q4. We have collected data on the overall amount of both net and gross capital inflows as well as its different components -foreign direct investment (FDI), portfolio investment (PI) (in equity and debt securities), and other investment. The database also includes the components of gross OI inflows -such as OI monetary authority, OI government, OI bank, and OI other sector inflows.
Based on the different components of the overall net and gross inflows, we distinguish between equity-based vis-à-vis debt-based gross capital inflows. Equity-based inflows are defined as the sum of FDI inflows and portfolio inflows in equity securities. Debt-based gross inflows, on the other hand, are the sum of portfolio inflows in debt securities and other investment (OI) inflows. The data on capital flows is collected from the IMF's Balance of Payments Statistics. We normalize gross capital flows by the permanent component of GDP (in US dollars at current prices). The GDP data is gathered from the World Bank's World Development Indicators (WDI) and the permanent component of GDP is then computed with the Hodrick-Prescott filter (HP filter).

Episode Count
We first identify the number of episodes of surges in capital inflows from our quarterly database on gross capital inflows for 71 countries from 1975q1 to 2010q4. Table 1 enumerates the number of these episodes for: (a) different groups of countries, (b) different definitions of gross inflows -say, overall vs. private gross inflows, and debt-vs. equity-based inflows, and (c) different criteria (CDMN vis-à-vis FW).
The CDMN-definition identifies overall 259 surge episodes in gross inflows -of which 75 episodes take place in industrial economies and 184 in developing countries. Approximately, 80 percent of overall surge episodes (208) are debt-driven while only 51 surge episodes (19.7 %) are equity-driven surges in gross inflows. When we look at the FW-defined episodes, 77.3 percent of surges in overall inflows are debt-driven (157) while 22.7 percent of episodes are equity-driven (46). Our identification of surges in capital inflows shows that regardless of the definition or group of countries, surges are mainly driven by surges in debt-based gross inflows. Figure 2 summarizes the information of different country groups presented above by depicting the percentage of debt-driven vis-à-vis equity-driven inflow surges. Regardless of the definition of inflow surges, we find that about 77-80 percent of overall surge episodes are debt-driven while approximately 20-23 percent is equity-driven. Figure 3 shows that developing countries hold more debt-driven inflow surges (78 percent) than ones in industrial countries. Among developing countries 2/3 of inflow surges are debt-driven compared to 4/5 of debt-driven inflow surges in EMEs.
Our results of surges in net inflows show that there are fewer episodes of surges in net inflows than surges in gross inflows. For instance, we identify 259 episodes of surges in gross inflows using the CDMN criteria vis-à-vis 203 episodes of surges in net inflows. Consequently, this finding is driven by the greater amount of episodes of surges in gross inflows relative to net inflows found in emerging markets. Since the 2000s more intense two-way capital flows in these countries could identify surges in gross rather than net inflows. Most of the episodes of surges in gross inflows are driven by surges in debt rather than equity inflows -as we shown above. However, equity inflows play a larger in driving surges in net inflows. Equity-driven inflows explain 44 percent of the surges in net inflows for all countries. This share is even larger for the sample of development countries -approximately 61 percent (75 out of 123 episodes).When looking at surges in gross private inflows, on the one hand, the CDMN criterion finds 248 episodes -of which 71 episodes take place in industrial economies and 177 in developing countries. This implies that 73 percent of surge episodes in gross private inflows are debt-driven while 27 percent of episodes are equity-driven. Zooming into the different country groups, 4 in 5 surge episodes are driven by debt-type inflows among industrial countries whereas 2 out of 3 are explained by debt inflows among developing countries. For surges in net inflows we find that almost half of all surges episodes for all countries are driven by increases in equity inflows (97 out of 201 episodes).
On the other hand, the FW-definition identifies 198 surge episodes in gross private inflows for all countries (of which 54 episodes are for industrial countries and of which 146 episodes are for developing counties). Approximately, 68 percent of the total surges are driven by debt-type inflows while the remaining 32 percent is driven by equity-type inflows. Regardless of any definition of inflow surges about 68-73 percent of episode in gross private inflows are debtdriven while about 27-32 percent of surge episodes are equity-driven. We also find 169 episodes of surges in net inflows using the FW criterion -with 90 of these episodes being driven by 13 equity surges (53 percent). Accordingly, the share of equity-driven surges in net inflows is greater than or equal to 50 percent for both industrial and developing countries.
Finally, Figure 4 depicts the evolution of gross surges from 1970-99 to 2000-11. Figure 4.1 shows that gross surges have increased sharply over the last decade: 30 percent of the episodes took place in 1970-99 whereas the remaining 70 percent occurred in the last decade. Figure 4.2 also shows that the share of episodes taking place among industrial countries as a share of the total has increased over the last decade -from nearly 20 to 30 percent of total episodes. On the other hand, there is a greater frequency of equity-driven surges as this proportion has increased from 10% in 1970-99 to almost 20% in 2000-11. Table 2 presents the average duration and median amplitude of the episodes of surges in gross inflows -based on the CDMN definition. We present these statistics for the full sample of countries as well as for those of industrial and developing economies. The duration of surges in gross inflows is similar across country groups over time. Comparing the period 1970-99 with 2000-11, the differences are negligible. For instance, the duration of surges decreased from an average of 3.7 quarters in 1970-99 to 3.6 quarters in the period 2000-11. Over the period 1970-2011, surges tend to last 3.5 quarters among industrial countries while the average duration of surges for developing countries is 3.6 quarters.

Duration and amplitude of surges in gross capital inflows
Next, we compute the median amplitude of surges in gross inflows, as well as selected percentiles of the distribution of surges -specifically, the 25 th and 75 th percentile (that is, bottom and top quartile). The amplitude of those surges for the representative country over the period 1970-2011 is nearly 1.3 times as much as its standard deviation while the range of fluctuation of the depth of surges is the 25 th and 75 th percentiles of the amplitude of the surge are 1.1 and 1.5 times as much as their standard deviation, respectively. On the other hand, the median amplitude of the surges in gross inflows among industrial countries is 1.3 times as much as its standard deviation while that of developing countries is 1.2 times. In both country groups, we find that the amplitude of the surge has somewhat increased. For instance, it grew from 1.2 to 1.3 times as much as the standard deviation for developing countries from 1970-99 to 2000-11. Table 3 shows the percentage of gross inflow surges that coincide with lending booms. Although there is no single method to identify lending booms, we use the criteria of both Mendoza andTerrones (2008, 2012) and Gourinchas, Valdes and Landarretche (2001), which we now call MT-booms and GVL-booms respectively. As inflows of foreign capital can help predict the likelihood of credit booms (see Calderón and Kubota, 2012), we find that on average 16 percent of gross surges tend to coincide with the MT-lending boom. However, that share in terms of the likelihood to the total episodes increases sharply to approximately 40 percent when using the GVL-booms. Our findings based on the GVL definition of booms find that the percentage of surges coinciding with lending booms is greater among developing countries. For instance, one out of every two surges in gross inflows is accompanied by a lending boom while one out of every three for industrial countries. Finally, we find that the probabilities to coincide gross surges with GVL-lending booms has increased from 1975-99 to 2000-11 among industrial countries while it has declined for developing countries after 2000.

Surges in gross inflows and boom-bust financial cycles
The last two columns of Table 3 show the percentage of surges in gross inflows that are followed by either a sudden stop or a banking crisis. Consequently, those columns show the proportion of gross inflows that are followed either by turmoil or a soft landing. Over the period 1970-2011, we find that one in two surges in gross inflows (52.5 percent) end up in a sudden stop among developing countries. On the other hand, the share of gross surges that are followed by a sudden stop is smaller among industrial countries, as one in three surges (34.1 percent) end up in a sudden stop although the likelihood of gross inflow surges followed by a sudden stop has declined over the last decade.
Finally, we compute the percentage of likelihood of gross inflow surges that precede a systemic banking crisis. For the full sample of countries, we find that 20.5 percent of gross surges tend to precede a full-blown banking crisis over the period 1970-2011 (roughly one of every five episodes). However, the share of episodes ending up in crisis has declined over the last decade for developing countries (from 38 percent in 1970-99 to 10 percent in 2000-11) while it has increased for industrial countries (from 9 to 27 percent over the same periods).

Regression analysis
This section reviews the econometric methodology implemented to assess the drivers of surges in gross capital inflows. More specifically, it discusses the limited dependent variable techniques applied in our empirical analysis such as the linear probabilistic model (Probit) and the complementary log-log model (cloglog). Then, we describe the definition and sources of data of the different drivers of surges in gross inflows, including push vis-à-vis pull factors. Finally, it presents a detailed analysis of the empirical results.

Econometric Methodology
Our main goal is to evaluate the determinants of surges in gross capital inflows by estimating panel Probit and complementary log-log (or cloglog) models. The distinction between the Probit and cloglog models is not trivial. Complementary log-log models are typically used when the probability of an event is very small or very large. In contrast to logit and probit, the cloglog function is asymmetric (or, more specifically, not symmetric around zero). When compared to logit and probit models, clolog assumes that the cumulative distribution function is asymmetric -i.e. approaching to 0 slowly but approaching 1 faster. The Probit model assumes that observations are temporally independent while time series and cross section data with a binary dependent variable is identical to grouped duration data that could be temporally dependent. The cloglog model is the exact grouped or interval-censored duration analogue of the Cox proportional hazard model (Jenkins, 2008). The cloglog model can fall directly out of the continuous time Cox model (Beck, Katz and Tucker, 1998;Jenkins, 2008) while the Cox proportional hazard is commonly used. On the other hand, the advantage of the Probit (or logit) modeling is their flexibility to extend the various ways to allow the model to deal with cross sectional dependence, and to combine and derive the logistic analogue of cloglog (Beck, Katz and Tucker, 1998;Williams, 2009).
Our binary dependent variable, Surge, takes the value of 1 whenever there are surges in gross inflows (as identified by the criteria specified above) and 0, otherwise. This model captures the likelihood of surges taking place in a country i at a specific time period t. The matrix of explanatory variables X comprises forcing variables that influence the outcome variable, Surge.
Therefore, our probabilistic model (Probit) takes the form P(Surge=1 / X) = Φ(X' β), where the left-hand side of the equation represents the probability P of a surge taking place given the set of forcing variables X, and Φ is the Probit function. In contrast, the specification P(Surge =1 / X) = 1 − − ′ models the probability P of a surge taking place given the set of forcing variables X, The goal of our empirical assessment is to estimate the vector β of parameters by maximum likelihood. We first specify our panel Probit model as a latent variable model and assume that there is a random variable Surge* such that Surge* = X'β + ξ, where ξ represents the error term, and Sur* indicates whether this latent variable is non-zero (i.e. Surge is equal to one if there is a credit boom, and 0 otherwise).
Our first specification -the Probit regression equation-takes the following form: where X is the matrix of explanatory variables -which comprises our set of pull and push factors that drive gross capital inflows. In addition, µ i captures the country-specific effect, and ξ it is the error term. The matrix of parameters b captures the coefficient estimates of the drivers of gross inflows. Note that all control variables are lagged so as to avoid likely reverse causality issues.
Our second specification -the complementary log-log or cloglog model, is: where ω i captures country-specific effects, and ν it is the error term while the matrix c contains the coefficients of the determinants of capital inflows (summarized in the matrix X). 13

Sources of Data for the Regression Analysis
Our set of explanatory variables is divided in two groups: pull vs. push factors. The criteria to define surges in inflows are described in subsection 3.1 and the sources of the data on capital inflows are described in subsection 3.2. It has been argued that foreign capital may increasingly flow into the domestic economy as long as the country exhibits attractive domestic conditions. Capital inflows will be "pulled" by profitable investment opportunities in the domestic economy and better country creditworthiness. Sustained gross inflows are attributed to good economic fundamentals and sound domestic policies (Fernandez-Arias, 1996). In contrast, others have argued that inflows are mostly "pushed" by external factors -and, particularly, monetary and fiscal policies in industrial countries (Elekdag and Wu, 2011;Fratzscher, 2012). In this case, surges in inflows to the domestic economy are partly influenced by lower interest rates in industrial countries (Calvo, Leiderman, and Reinhart, 1993).
Pull Factors. This set of control variables comprises domestic factors that make the recipient economy attractive to foreign investors. It includes outcome and policy variables that capture macroeconomic performance (growth in real GDP, inflation, exchange rate flexibility, and the current account balance), developments in the domestic financial sector (as captured by the evolution of the domestic credit and the exchange rate), international integration (i.e. trade and financial), among others.
Macroeconomic performance is captured by a multiple set of indicators. A barometer of the performance in real economic activity is the growth rate of real GDP. The data on quarterly GDP (in local currency at constant prices) is collected from various sources -DataStream, Haver Analytics and national statistical institutions and central banks. We use the seasonally adjusted data on quarterly GDP -and, more specifically, the annual growth rate in real GDP. 14 We next include some indicators of the macroeconomic policy framework. The inflation rate -as proxy of monetary stability-is measured by the (year-over-year) percentage change of the consumer price index (CPI) where the data is from the IMF's International Financial Statistics (IFS). The flexibility of the exchange rate arrangements, on the other hand, is proxied by the coarse classification of exchange rate regimes developed by Reinhart and Rogoff (2004) and updated by Ilzetzki, Reinhart and Rogoff (2009). This coarse indicator goes from 1 to 6, and higher values indicate a more flexible exchange rate arrangement (with 1 signaling hard pegs and 6 pure floats). We also include the current account balance -as a proxy for external imbalances. It is measured as the ratio of the current account of the balance of payments to GDP which data comes from the IFS.
In this paper we capture developments in domestic financial markets by the formation of booms in credit and asset prices because we argue that these markets may play a role in driving the likelihood of surging foreign capital inflows. In credit markets, we compute the growth rate of the credit to GDP ratio -which takes positive value whenever credit growth exceeds the growth in real economic activity. The data is collected from WDI. Overvalued asset prices are captured by the degree of real exchange rate overvaluation -which is roughly measured as the deviation of the REER index from its (HP-filtered) trend. The index of the real exchange rate comes from IFS and higher (lower) values for this index indicate a real appreciation (depreciation) of the currency.
Countries with greater linkages to the world goods and asset markets are arguably more prone to surges in inflows. Trade openness is measured as the ratio of export and import to GDP as collected from WDI. Financial openness, on the other hand, is computed as the ratio of gross inflows and gross outflows to GDP -with IFS data. We also argue that the likelihood of surges is not only determined by the extent of international integration but also the mode of integration. On the trade side, it is important to include an indicator of commodity trade. We measure natural resource abundance as the trade balance per capita of primary exports (that is, agricultural raw materials, food, fuel and mineral ores and metals). Regarding financial openness, we distinguish between equity-driven gross inflows and debt-driven gross inflows that are expressed as a ratio to GDP.
Push Factors. This group of determinants are external factors -more specifically, indicators capture trade-related external factors (say, growth in external demand), finance-related external factors (say, international interest rate and global risk aversion), and financial contagion.
Trade-related external shocks are proxied by the growth rate of the foreign country. These are computed by the weighted average of the GDP growth of the main trading partners of the corresponding country. The weights are estimated using the bilateral trade between the corresponding country and each partner.
Finance-related external shocks are proxied by indicators of performance and volatility in financial markets in advanced countries. The world real interest rate is proxied by the money market rate of the monetary anchor country -as suggested by Di Giovanni and Shambaugh (2008), and the data is gathered from IFS. Global risk aversion is proxied by the VXO indexas a measure of implied volatility computed using 30-day S&P 100 index at the money options. Higher values of the VXO indicate rising global risk aversion. Performance in stock markets of advanced economies is proxied by (average annual) returns to the US S&P 500 index while their volatility is computed as standard deviation of (annual) returns. Note that these two indicators are computed using monthly information of the S&P 500 index. We also include the leverage of US security brokers and dealers -as suggested by Bruno and Shin (2013). This leverage ratio is defined as the ratio of equity and total liabilities to equity, using the information from the U.S. flow of funds.
Policy uncertainty in the advanced world will also affect the behavior of foreign investors and, hence, the likelihood of surges. Baker, Bloom and Davis (2013) build an index of U.S. economic policy uncertainty by combining three groups of measures: (i) newspaper coverage of policyrelated economic uncertainty (from the 10 major US newspapers), (ii) number and size of federal tax code provisions set to expire in subsequent years, and (iii) disagreement among economic forecasters in the Philadelphia Federal Reserve's Survey of Professional Forecasters. 15 Finally, another index of global uncertainty is used in our analysis. It focuses on common movements in stock market volatility for major advanced economies. Specifically, stock market volatility is measured as the monthly standard deviation of daily stock returns in each advanced economy, and our index is the common factor in stock market volatility of the United States, Japan, Italy, France, the United Kingdom, and Germany. The data was obtained from Bloom, Kose and Terrones (2013). Finally, foreign investors can be driven not only by the fundamentals of the domestic country but also by the regional contagion -this implies favorable economic prospects of other countries in the same region. We create a regional contagion dummy that takes the value of 1 for the domestic country in period t is another country in the same region experienced a surge over the past two years.

Empirical Analysis
In this section we assess the factors that drive the likelihood of surges in net and gross capital inflows. We argue that both pull and push factors can help explain the massive flow of funds from foreign investors. Therefore, we test whether some determinants help explain surges in net inflows and/or gross inflows. We conduct Probit and Complementary log-log panel regression analysis for a sample of 67 countries using quarterly data from 1975 to 2010. Table 4 reports our first empirical estimates 9 for the incidence of surges in net and gross inflows. It shows the role of pull factors only in our regression analysis. When controlling for domestic drivers of capital inflows only ("pull" factors), our findings show that current account movements appear to matter most for surges in net rather than surges in gross inflows. Consequently, current account deficits tend to trigger surges in net inflows (and this is partly motivated by the need to finance external imbalances). The exchange rate regime does not play a significant role in inducing a surge in net flows. Equity inflows tend to mitigate the likelihood of surges in net inflows while debt inflows increase that likelihood.

Panel Probit Analysis
When controlling only for the domestic drivers of capital inflows ("pull" factors), we find that growth in domestic economic activity is significantly positive; therefore, surges of gross inflows are preceded by positive economic growth in the domestic economy. Movements in the leverage of the domestic financial system (as proxied by growth in credit to GDP) are more important for predicting the likelihood of surges in gross rather than net inflows. Combined with the results from Calderón and Kubota (2013), we can say that during booms, there is a two-way causality between credit and gross inflows.
The exchange rate regime has a negative and significant impact on the likelihood of surges with the CDMN criterion. Consequently, the incidence of surge episodes is reduced in countries with more flexible exchange rate regimes. Current account balance has a negative impact regardless of the criteria used and it is significant only when we use the CDMN criterion. Therefore, surge episodes are less likely to happen when current account deficit widens although the sign of the coefficient is not robust. The domestic financial sector, trade openness and financial openness have positive and mostly significant coefficient estimates. This implies that surges in gross inflows are more likely to take place whenever there is a build-up in domestic credit, buoyant asset prices (as captured by higher overvaluation in domestic currencies), and greater trade and financial openness. Note that the impact of openness in our analysis is more nuanced. The incidence of gross inflow surges is higher in countries that specialize in the export of natural resources (i.e. countries that are more natural resource abundant) and/or in countries where financial openness is led by debt-driven flows. Both equity and debt inflows seem to have a positive effect -although not always robust for equity.  Table 5 we control only for the external drivers of inflow surges ("push" factors). Either S&P 500 volatility or foreign growth does not encourage surges in net flows. Our regression analysis for gross inflows yields the following results: first, foreign growth and contagion coefficients have a positive significance. The leverage of US brokers and dealers is a robust predictor of the subsequent occurrence of surges in both net and gross inflows. This is consistent with Bruno and Shin (2013) who argue that the greater leverage of US financial institutions has led to a massive increase of capital inflows in the global economy. Higher returns in S&P 500 may lead to a reduced likelihood of surges in net inflows whereas the volatility of S&P 500 returns explains a reduced likelihood of surges in gross inflows.
The world interest rate and the volatility of S&P 500 returns have a significant negative impact. Therefore, surges of inflows in the domestic are significantly more likely to take place when external growth increases, and if a massive surge is flowing within the region where the domestic country is located. The incidence of massive inflows of foreign capital is greater if the world interest rate is lower and the volatility of S&P 500 returns is reduced. As a consequence, lower returns to foreign assets and lower global risk aversi9on (as captured by lower volatility of S&P 500 returns) would encourage foreign investors to shift their portfolios out of their own 20 countries. An analogous result is obtained for the index of policy uncertainty as surges are less likely to take place when global policy uncertainty is heightened. When controlling for both push and pull factors, we find that an increase in the growth rate of credit to GDP is more important for predicting the likelihood of surges in gross rather than net inflows. On the other hand, real overvaluation helps robustly predict both surges in net and gross inflows. Foreign growth help explain better surges in gross inflows. Shifts in world interest rates help explain both surges in net and gross, although it seems more robust in the case of net inflows. Policy uncertainty in the global economy also appears to explain more surges in gross rather than net inflows. This effect might be driven by the 2000-11 period. For gross inflows we robustly find that growth in the domestic economy would increase the likelihood of subsequent surges in capital inflows. This finding holds regardless of whether: (a) we compute the surges with overall or private inflows or (b) we normalize flows by real output or not. Accordingly, current growth developments in the domestic economy are a robust predictor of the behavior of foreign investors.
On the one hand, surges in inflows are more likely to take place in countries with smaller current account surpluses or running deficits. Countries running current account deficits need large inflows of foreign finance to prevent imbalances in the balance of payments. Ideally, if large inflows are driven by equity-related capital flows rather than loan-related flows, therefore, a country can prevent sudden reversals during downturns. On the other hand, CPI inflation and the flexibility of exchange rate regime do not have a robust relationship with the incidence of surges in inflows. If we focus on surges in the ratio of gross inflows to GDP -columns [5] and [6]inflation has a positive coefficient while the exchange rate flexibility has a negative and significant coefficient. These results indicate that surges in inflows are less likely to happen in countries with flexible exchange rate arrangements and, remarkably, in countries with low and stable inflation. When looking at the incidence of sur9ges as measured by the overall amount of gross inflows (see columns [7] and [8]), the coefficient of inflation is not robust. The coefficient estimate of the exchange rate regime is not also robust to changes in the definition of inflows. Financial cycles are characterized by an expansion of credit in domestic markets and a sharp real overvaluation. Consequently, our findings show that financial booms drive surges in gross inflows. Our findings robustly explain the incidence of future surges in gross inflows. This mostly holds regarding our definition of gross inflows.
The extent of integration of the domestic economy to the world markets of goods and assets may explain the higher proneness of the country to inflow surges. In Table 6 we test the significance of trade and financial openness -as well as their composition-in driving these surges. Regarding international trade integration, we find that trade openness (as proxied by the value of exports and imports as a ratio to GDP) has a positive coefficient and it is significant only with inflow surges except normalized to GDP. Therefore, surges are more likely to happen in countries with greater trade integration -although the impact is not as robust. However, when we look at the composition of trade, our findings are robust that countries with natural resource abundance tend to be more prone to surges in capital flows. The fact that primary commodity exporters may be attractive to foreign investors may be related to the evolution of commodity prices -specially, fuel, mineral ores and metals. Finally, we find that surges are more likely to occur in countries with greater financial openness and that these episodes are mostly driven by surges in debt rather than in equity inflows.
Accounting for pull factors, our findings show that some push factors will also determine the behavior of foreign investors in pouring their capital into the domestic economy. Higher world growth (or, more specifically, higher growth in the trading partners) would raise the likelihood of foreign investors to invest abroad by diversifying their portfolio internationally and, therefore, that would raise the probability of inflow surges to the domestic economy. On the other hand, greater returns in stock markets of advanced countries (as proxied by the returns to the U.S. S&P 500) would reduce the likelihood of surges to the domestic economy as foreign investors would shift their portfolios to these stock markets (i.e. greater portfolio home bias for advanced economies' investors).
Risk aversion in the world markets is captured in this regression analysis by either the VXO index or the volatility of returns to the S&P 500. Although the coefficient of the VXO implied volatility index is not robust, it has the correct negative sign in columns [7] and [8] -being significant (at the 10% level) in the former and insignificant in the latter. On the other hand, the volatility of S&P 500 returns has a negative coefficient but only significant in columns [7] and [8]. This finding implies that surges of inflows would be less likely to take place in an environment with heightened global risk aversion.
Our regression analysis also includes the impact of economic policy uncertainty in advanced economies (and, more specifically, in the U.S.) on the incidence of surges in gross inflows. Our prior is that greater uncertainty in economic policy in the advanced may deter investors from those countries to invest either at home or abroad. Our results show that the coefficient estimate for policy uncertainty is negative and significant regardless of the definition of our dependent variable. Consequently, greater uncertainty among economic policymakers in the advanced countries would reduce the likelihood of inflow surges. We include a variable of regional contagion in inflow surges and we find that the coefficient is robustly positive. Thus, inflow surges in regional neighboring countries would increase the likelihood of subsequent inflow surges in the domestic economy. Finally, we find that higher leverage of U.S. brokers and dealers -which captures an increase in their balance sheets-helps explain the greater likelihood of surges in both gross and net inflows. Table 7 estimates our full specification (pull and push factors) for surges in net and gross inflows for the sample of industrial and developing countries -the first eight columns present the estimates for industrial countries whereas the latter columns show the estimates for developing countries. Our discussion of the econometric analysis would compare the differences between industrial and developing countries.

Robustness to changes in the sample of countries: industrial vs. developing countries
The current account balance is a more robust predictor of surges in net inflows for developing countries. Higher current account deficits (that is, lower and/or more negative current account balances) will increase the likelihood of surges in net inflows. Therefore, domestic current account balance conditions would pull surges in both net and gross for industrial economies while these may matter for developing countries with only net figures. This finding is not robust for surges in gross inflows. Global risk aversion plays a greater role in explaining surges in gross inflows rather than those in net inflows.
For developing countries, domestic economic growth is likely to pull surges in both net and gross figures while CPI inflation may play a role in industrial countries. According to the definition of surges using the FW criterion, the ER regime is positively correlated with the incidence of surges in both net and gross for developing countries. Credit growth may matter for developing countries while it does not explain surges for industrial countries. If there is a greater extent of RER overvaluation, it will increase the proneness of both net and gross in developing countries, and induce surges of gross inflows in industrial countries. Foreign trade is a significant pull factor for surges in gross inflows in developing economies while it might play a role in driving surges in gross inflows in industrial countries. Natural resource abundant countries are more likely to experience surges of both net and gross flows in industrial countries while this characteristic plays a role only in surges of gross inflows among developing countries. Overall financial openness may matter more in industrial countries than in developing countries while both equity flows and debt flows matter in developing countries.
Higher economic growth is more likely to increase the probability of surges in gross inflows in developing countries than industrial ones. On the other hand, CPI inflation in industrial countries (that historically has remained at low levels) has a positive coefficient whereas the link is not robust for developing countries. For the latter sample, it is negative and significant only when defining overall surges using the FW criterion. Therefore, higher inflation would deter foreign investors to shift their portfolios to the domestic country.
The probability of surges taking place in industrial countries is more likely to happen in countries with less flexible exchange rate arrangements; however, the results are reverse with the FW criterion inflow surges. As a consequence, developing countries with more flexible exchange rate arrangements are more likely to experience inflow surges because floating rates typically accompany sound monetary policy frameworks. Regarding current accounts, we find that widening deficits in industrial countries tend to explain a lower likelihood of surges while the impact is not robust for developing countries. On the other hand, the expansion of credit does not precede subsequent inflow surges in industrial countries whereas lending booms do have information to predict future overall surges in developing countries. Asset price booms -as proxied by real overvaluation of the domestic currency-explain a higher incidence of massive gross inflows in both industrial and developing countries.
The results for openness to foreign trade are mixed: surges in overall gross inflows are more likely to increase in developing countries that are more open to foreign trade. Remarkably, this likelihood of surges is higher in industrial countries that are more natural resource abundant. Trade in commodities plays a role in explaining surges in developing countries with the CDMNcriterion. Episodes of massive flows of capital into industrial countries are more likely to happen if they are more financially open although the composition of gross inflows does not provide additional information to explain surges in these countries. For developing countries, on the other hand, the likelihood of surges is significantly more sensitive to movements in equity-type inflows than in debt-type inflows. This finding maybe due to equity-type inflows (say, FDI and portfolio equity inflows) represent the largest share in overall (and/or private) gross inflows.
The evidence shows that push factors are more likely to have a significant effect on surges for industrial countries rather than developing countries. For instance, higher global growth, lower world interest rates, lower global policy uncertainty and lower global stock market return volatility will explain a greater incidence of surges in capital inflows for industrial economies. In contrast, surges in developing countries are robustly more likely to take place when other neighboring countries have experienced a surge in inflows in the previous period(s). With the FW criterion, lower world interest rates, lower global risk aversion and lower returns to the world stock markets will help explain subsequent inflow surges in developing countries.

Complementary Log-Log Analysis
We now present our analysis of the drivers of the likelihood of surges in gross capital inflows using the complementary log-log model (cloglog). Forbes and Warnock (2012a, b) use this methodology to assess the determinants of capital flow waves into and out of the domestic economy (that is, surges, stops, flights and retrenchments).
In an analogous fashion to our Probit analysis, Net Inflows. The likelihood of surges in net inflows increases whenever real economic activity increases, and/or if the domestic economy is running a current account deficit. Growth in credit to GDP is not necessarily a robust driver to induce surges, but real overvaluation of the domestic currency helps explain a higher likelihood of a sharp increase in net inflows. A surge in net flows is, indeed, pulled by a greater extent of openness -and, especially, if they are natural-resource abundant. Greater financial openness increases the proneness to surges in net inflows -and, especially, if driven by net debt inflows.
Push factors have an important role in increasing the probability of surges in net inflows. Higher growth in main trading partners encourages a more likely occurrence of a surge in net inflows. A greater real world interest rate, on the country, would mitigate that probability. Policy uncertainty in the advanced world is somewhat positively associated to a greater likelihood of sharp increases in net inflows -and this might be associated to developments in developing countries. On the other hand, greater return and volatility of the U.S. stock market (S&P 500) is negatively associated with the proneness of surges in net inflows.

Gross inflows.
Our results from the pull drivers of inflow surges show that outstanding economic performance would help predict future massive inflows of capital regardless of any criteria used for their definition. In most regressions, current account balance has a negative and significant coefficient. Therefore, the larger the deficits in current account the more likely foreign capital will flow to the domestic economy (most notably, to finance these imbalances). On the other hand, surges in inflows will be less likely in countries with more rigid exchange rate regimes with using the CDMN criterion.
On the financial sector front, we robustly find that rapid expansion of credit and real appreciation of the domestic currency (beyond their equilibrium levels) help predict the occurrence of surges in capital inflows. Greater trade openness also lead to greater likelihood of inflows of capitalwith natural resource abundant countries experience a higher probability of surges taking place. Finally, countries with greater international financial integration are more likely to experience surges in inflows. The composition of gross capital inflows plays a role in predicting these episodes: debt-type inflows are robustly more likely to precede them.
Push factors also have a significant contribution to the likelihood of inflow surges. Greater external growth and lower world interest rates help predict future surges. Lower returns and lower volatility return in global stock markets (as signal of lower return and risk aversion in world financial markets) may encourage foreign investors to shift their portfolios outside of their own country. Finally, surges in neighboring countries tend to anticipate the massive inflows into the domestic economy. Table 9 shows our cloglog estimates of inflow surges on both pull and push factors -for both surges in net and gross inflows.
Net inflows. Real economic performance in the domestic economy helps drive a greater likelihood of surges in net inflows. An analogous statistical result is obtained with greater current account deficits. Our cloglog regressions suggest that the current account balance is a more robust predictor of surges in net inflows. Therefore, the direction of this relationship shows that higher current account deficits (that is, lower and/or more negative current account balances) will increase the likelihood of surges in net inflows.
The leverage of the domestic financial system (as proxied by the growth in the credit to GDP ratio) is not robust whereas the real overvaluation of the domestic currency tends to increase the proneness to surges in net inflows. Surges in net inflows are more likely to occur in natural resource abundant countries. Moreover, countries with greater equity inflows tend to mitigate the likelihood of surges in net inflows while those with greater debt inflows are more likely to experience surges in net inflows.
Regarding push factors, higher world real interest rates reduce the likelihood of surges -as they typically attract more flows to advanced countries. Policy uncertainty and volatility in US stock markets also contribute to reduce the likelihood of surges in net inflows. Finally, contagion in capital flows leads to a higher probability of surges.
Gross inflows. Our findings support that growth in the domestic economy is a robust predictor of surges in gross inflows. CPI inflation has a weak relationship with the incidence of surges and, in cases where it is statistically significant, it deters foreign investors from bringing their capital. Analogously, exchange rate flexibility has no robust relationship. In columns [7] and [8], our cloglog estimates show a positive and significant relationship, therefore, countries with more flexible arrangements are more prone to inflow surges. When a country holds external savings (i.e. current account surpluses), their investors are more likely to either invest at home or shift their portfolios abroad. Foreign investors do not necessary finance external imbalances. As a result, likelihood of inflow surges is less likely although the effect is not robust. Remarkably, overvalued exchange rates tend to robustly precede inflow surges. Growing leverage in domestic credit markets (as imperfectly captured by an expansion of credit beyond real economic activity) also has a positive effect but significantly only for surges in overall inflows rather than private inflows -see columns [5] and [7].
Trade openness, according to our cloglog estimates, has a positive and significant coefficient as well as in most of the cases the coefficient of natural resource abundance. Therefore, countries with greater openness to trade are more prone to subsequent inflow surges, especially for countries that have a net trade surplus in commodities. In contrast to our Probit, the coefficient of financial openness is not significant in most of the cases. Although the overall amount of inflows and outflows does not have a robust relationship, this composition of inflows has a significant impact. Both equity and debt gross inflows have a positive and robust relationship with the likelihood of subsequent inflow surges.
Push factors do not seem to have the same significant role in driving inflow surges from our Probit regressions. Our findings show that regional contagion of surges is the only robust determinants of future inflows of capital. Other significant results (although weaker in significance) show that surges in gross inflows are more likely to occur if: (a) the world growth increases, (b) the world interest rates decline, (c) the risk aversion is lower. Table 10 shows the results from the complementary log-log regressions that include pull and push factors for the samples of industrial and developing countries.

Robustness to changes in the sample of countries: industrial vs. developing countries
Net inflows. Real growth helps pull surges in net inflows in developing countries, but that is not the case for industrial countries. A greater likelihood of surges in net inflows is experienced by industrial and developing countries with greater current account deficits (where more financial inflows are needed to finance external imbalances). On the other hand, we find that financial 26 openness (as measured by higher equity or debt inflows) helps increase the greater likelihood of surges in net inflows for developing countries. Contagion appears to be a robust push factor of surges in net inflows for both industrial and developing countries. Shifts in world real interest rates, on the other hand, are a more powerful driving force of surges among industrial countries than among developing ones.
Gross inflows. The performance of the domestic economy is a robust predictor of the probability of inflow surges for developing countries -while the effect is negligible among industrial countries. On the other hand, widening current account deficits -in need of greater foreign financing-may explain a greater likelihood of surges for industrial economies. The result is less robust for developing countries. Exchange rate regime flexibility foster the incidence of surges for developing countries (when using the FW criterion), while it discourages surges for industrial countries (when using the CDMN criterion).
Lending booms robustly precede the likelihood of overall (rather than private) surges in inflows among developing countries while their impact is not significant for industrial countries. Overvalued local currencies, on robustly explain massive inflows of foreign capital. Greater openness in foreign trade -and, especially, more intense trade linkages for natural resource abundant countries-helps explain the likelihood of massive inflows of capital to the domestic economy. On the other hand, surges in gross inflows are more recurrent in industrial countries with greater international financial integration while the effect of overall financial openness is not robust for developing countries. However, when looking at the composition of gross inflows, our findings support that equity-and debt-type inflows explain the incidence of surges with the proneness to surges being more sensitive to massive inflow of equity-type inflows.
Push factors tend to drive future surges in inflows among industrial countries. The incidence of massive inflows of capital is greater in the event of favorable foreign growth, lower world interest rates lower global policy uncertainty, and lower stock return volatility. Lower risk aversion and lower foreign interest rates may raise the likelihood of surges in developing countries although these findings are not robust. Finally, our findings also show that regional contagion has a positive and significant coefficient; consequently, surges are more likely to take place in the domestic economy when massive capital flows into its geographical region in previous period(s). Table 11 reports the marginal effects that pull and push factors have on the likelihood of surges in gross (overall and private) capital inflows. We compute the marginal effects for selected specifications in Tables 3 and 4 for the sample of all countries and developing countries, respectively. By focusing on the overall contribution of push factors to the likelihood of overall inflow surges with the CDMN-defined surges in inflows, the relative contribution of pull factors (vis-à-vis push factors) is greater while we explain the likelihood of surges in private inflows as opposed to those of surges in gross inflows.

Conclusions
This paper aims to examine the drivers of surges in net and gross capital inflows for a sample of 67 countries using quarterly data from 1975 to 2010. We conduct Probit and complementary loglog panel regression analysis. Our findings show that domestic and external factors (pull and push factors, respectively) drive surges in both net and gross capital inflows. While both types of drivers significantly contribute to a higher incidence of surges in industrial countries, domestic factors represent the major driving force of surges in developing countries.
We also provide a characterization of surges in gross inflows for the period 1970-2011. The duration of surges in gross inflows is almost even across countries while we find a recent increase in the amplitude of these surges. This finding implies that surges in gross inflows have become more volatile -especially after 2000-and it is correlated to the fact that financial cycles have also amplified. In fact, gross surges are highly likely to accompany lending booms -with the degree of coincidence varying with the definition of lending boom (approximately, 16 percent for MT-lending booms and almost 40 percent for GVL-booms). In addition, the degree of synchronization between inflow surges and GVL-lending booms have recently increased in industrial countries and decreased in developing countries. Finally, over the past three decades, surges end up in a sudden stop in half of gross inflow episodes for developing countries and in one third for industrial countries.
Our empirical analysis highlights the following results: • Pull and push drivers help explain the likelihood of episodes of surge in both net and gross inflows regardless of any criteria to define these surges, any sample of countries and whether we use overall or private inflows. • Pull factors -including, domestic growth, current accounts, exchange rate flexibility, natural resource abundance, and debt-led gross inflows-contribute significantly to explain surges of inflows. • Current account developments tend to play a larger role explaining surges in net inflows.
Our estimates suggest that a greater current account deficit would help trigger a surge in net inflows -as flows of foreign capital come to the domestic economy to finance the external imbalance. • Financial booms -as captured in this paper by an excessive expansion of credit and overvalued currencies-tend to attract massive capital inflows. The rapid increase in the leverage of the domestic financial economy tends to explain a greater likelihood of surges in gross inflows while the evidence is not as robust for surges in net inflows. • Push factors -including global policy uncertainty, S&P 500 returns and volatility-play an important role in driving surges of inflows -and, especially, for industrial countries. • The greater leverage of US brokers and dealers -which measures the expanded balance sheets of US financial institutions-helps explain both surges in net and gross inflows. This is consistent with recent evidence that shows US financial institutions having excess liquidity, searching for yields and shifting their portfolio abroad. • A massive inflow of capital in one country tends to propagate into similar (neighboring) countries. Regional contagion is a robust predictor of inflow surges in a country.
Our discussion in this paper contends that understanding the drivers of surges in inflows is of importance due to their long-term effects on growth and, more importantly, their destabilizing effects on domestic financial markets. As credit booms-and, especially, those that end up in financial crises-are preceded by surges in gross inflows (and, more specifically, surges in crossborder banking inflows), implementing policies that decouple capital inflows and credit expansions will help manage systemic risks (Calderón and Kubota, 2013).  NET Inflows  201  78  123  169  72  97  200  77  123  Debt-driven  97  42  55  90  40  50  95  39  56  Equity-driven  104  36  68  79  32  47  105  38  67   GROSS Inflows  248  71  177  198  52  146  247  76  171  Debt-driven  181  56  125  134  42  92  177  60  117  Equity-driven  67  15  52  64  10  54  70  16  54 Note: Surges in gross inflows are defined as periods when the annual variation in gross inflows is greater than one standard deviation above its rolling mean. Surge episodes will end when that annual variation in gross inflows drops below that threshold. Table 2 Characterization of episodes of surges in gross inflows: Duration and Amplitude Sample: 71 countries, 1970Sample: 71 countries, -2011  Note: Surges in gross inflows are defined as periods when the annual variation in gross inflows is greater than one standard deviation above its rolling mean. Surge episodes will end when that annual variation in gross inflows drops below that threshold. We use the CDMN definition in panel I of Table 1. We report the average duration (in quarters) and the median amplitude -as well as selected percentiles in the distribution.  Guidotti, Sturzenegger and Villar (2004) and implemented for quarterly data in Calderon and Kubota (2013) while the dating of banking crises is obtained from Laeven andValencia (2010, 2012).