An Anatomy of the Spanish Current Account Adjustment: The Role of Permanent and Transitory Factors

This paper aims to identify how much of the recent current account adjustment in Spain can be explained by cyclical factors. For this purpose, we consider the cross-country regressions in the IMF’s External Balance Assessment (EBA) methodology but allowing for country-specific slopes and intercepts. The good fit of these regressions implies negligible residuals for most countries, and, as a result, the positive analysis of current account decompositions provides a more informative assessment of the external balance drivers. According to our findings, around 60% of the 12 pp. adjustment of the Spanish external imbalance over the 2008-2015 period can be explained by transitory factors such as the output gap, the oil balance, and the financial cycle. The remaining 40% is explained by factors such as the cyclically-adjusted fiscal consolidation, population aging, lower growth expectations, or competitiveness gains, which can all be considered as more permanent phenomena.

The Working Paper Series seeks to disseminate original research in economics and fi nance. All papers have been anonymously refereed. By publishing these papers, the Banco de España aims to contribute to economic analysis and, in particular, to knowledge of the Spanish economy and its international environment.
The opinions and analyses in the Working Paper Series are the responsibility of the authors and, therefore, do not necessarily coincide with those of the Banco de España or the Eurosystem.
The Banco de España disseminates its main reports and most of its publications via the Internet at the following website: http://www.bde.es.

Introduction
In the years that preceded the outburst of the global crisis the Spanish current account balance experienced a strong deterioration, reaching its historical minimum in 2007 (see Figure 1). The correction that followed, from -10% of GDP in 2007 to +2% in 2015, represented an unprecedented adjustment over the last 150 years. while gross external debt amounted to 167,5% of GDP. In this context any deterioration in the conditions of access to external financing could affect financial stability, despite the recent shift in the composition of Spanish external liabilities towards longer maturities. There is quite a strong consensus that mitigating these risks will most likely require the Spanish economy to maintain sustained current account surpluses in the next years.
In light of these issues, one important concern is whether current external surpluses are likely to revert in the medium term. This could happen if the current account adjustment observed in the post-crisis years was mostly driven by cyclical factors, whose dynamics could change in the next years. For instance, the negative output gap of the post-crisis period, having contracted Spanish domestic demand and imports, has likely contributed to the reduction of the external deficit. By the same token, exceptionally low oil prices might have contributed to improve the energy balance, with a positive effect on the current account. To the extent that this oil price trend will reverse and as the output gap will close, in the medium term, a part of the adjustment observed in the Spanish current account after the crisis might well unravel, and the ability to generate sustained external surpluses in the future might be reduced.
The question we address in this paper is precisely how much of the observed adjustment in the Spanish current account was due to cyclical factors, such as the output gap and oil price dynamics, and which part should be related instead to determinants that could be of a more permanent nature.
In the spirit of the External Balance Assessment (EBA) methodology, used by the IMF to investigate the drivers of countries' current account balances and to assess the desirability of their external positions (IMF, 2013), we regress countries' current accounts on a wide set of possible drivers, including cyclical factors (such as the output gap) and more structural determinants (such as demographics).
The estimated coefficients can then be used to compute the contribution of each driver to the current account dynamics of each country. In contrast to the homogeneity assumption in original EBA-type regressions, we allow for country-specific slopes and intercepts. This permits, on the one hand, to reduce the large residuals that EBA regressions generally deliver and to lower the unexplained share of current account fluctuations. On the other hand, country-specific slopes allow us to fully account for cross-country heterogeneity in the response of external balances to their drivers -heterogeneity that, as documented by the literature and as we confirm in the empirical section of this paper, seems to be validated by the data. Indeed, several contributions have shown that the impact of current account drivers on external balances may differ across countries. For instance, macroeconomic uncertainty increases more precautionary savings in low and medium-income economies, whose safety nets are less developed. Fiscal shocks have a stronger impact on the current account of developing countries, as less developed internal financial markets and a higher share of hand-to-mouth consumers are likely to make Ricardian equivalence less likely to hold. Demographic factors related to aging have been shown to have a significant effect only on economies whose population is aging fast enough. 1 Also cyclical factors, such as the output gap and oil prices, can have a different impact on external balances depending on the structural characteristics of the economy. For instance, a cyclical increase in relative income, as captured by the output gap, should raise domestic consumption expenditure depending on agents' marginal propensity to consume, which can differ among countries. Also, how much a rise in expenditure affects imports and, ultimately, external balances, is likely to depend on the structural characteristics of the economies, such as the propensity to orient expenditure towards domestically-produced goods (home bias in consumption) or the trade elasticity -features that, as several empirical works show, are rather persistent and might display relevant difference across countries. 2 As concerns the impact of oil price fluctuations on external balances, relevant differences may exist across countries depending on their production structure and their degree of dependency on external energy sources. More generally, Desborder et al. (2017) show that EBA coefficients tend to be different in OECD and non-OECD economies, so that the two groups of countries cannot be pooled together. Our approach, which consists in estimating EBA-type regressions with country-specific coefficients, allows to take fully into account all these sources of cross-country heterogeneity.
According to our findings, most of the external deficit accumulated over the expansionary years 2000-2007 (around 80%) can be attributed to cyclical factors, namely, the positive output gap, increasing oil prices and the lax conditions in global financial markets. This share is much lower when we look at the contractionary post-crisis phase. Indeed, around 60% of the 12 pp. adjustment of the Spanish current account balance between 2008 and 2015 can be explained by cyclical drivers, such as the negative output gap and the low price of oil. The remaining 40% of the correction is explained by factors of a more structural nature. Among these, the strong reduction in the deficit of the public sector observed in the post-crisis years, which, in the absence of an opposite adjustment of the private sector, contributed strongly to the correction of the external deficit. Also a decrease, relative to other countries, in the share of the population older than 65 tended to raise, in relative terms, external savings. A similar effect had the increase in long-term interest rates with respect to other countries, which had a contractionary effect on the economy. Lower growth expectations also led to lower investment and contributed to reducing external borrowing. This paper is related to the vast literature that studies the dynamics of national current account balances, especially those of Sourthern European debtor economies, in the recent years in order to determine the factors behind their deterioration in the period that led to the crisis and the determinants that contributed instead to the subsequent marked correction. Among these works, the econometric analysis of Atoyan et al. (2013) found that fiscal consolidation was one of the elements that explained the post-crisis external adjustment in Southern European debtor economies, in line with our findings. Cheung et al. (2010) panel analysis -using data up to 2008 and assuming homogenous coefficients-finds that in the first phase of the crisis a large share of current account adjustment was due to cyclical factors, at least for the main economies. Ollivaud and Schwellnus (2013) run panel current account regressions allowing for area-specific coefficients. According to their results, the business and housing cycles account for around a half of the decline in external 2 Balta and Delgado (2009) find that the degree of home bias in consumption differs significantly among EU countries, and that it has not changed much following the creation of the EMU. Mika (2017) shows that relevant differences exist in the trade home bias of European economies. Noton (2015) reaches similar conclusions for the car market.
imbalances in Eurozone debtor countries between 2008 and 2012. Tressel and Wang (2014) use, similarly to us, a regression approach based on the EBA method. They find that both cyclical and structural factors contributed to the adjustment of Southern European countries. In particular, for Spain they estimate that only 27% of the adjustment between 2007 and 2012 was cyclical. A similar result was obtained by the study of the European Commission (2014). According to ECB (2014), less than a half of the adjustment of the Spanish current account up to 2012 was due to the negative output gap. With respect to these studies, in our analysis we exploit data up to 2015, which permits evaluating how external consolidations procedeed after the first phase of the crisis and to study the impact of the fiscal consolidation on the Spanish economy, which started to deliver its effect in 2013.
We also document that the assumption of slope homogeneity used in most of these analyses seems not to be supported by the data. Allowing for full heterogeneity between countries in the response of the current account to its drivers generally leads us to estimate a higher responsiveness of the Spanish current account to temporary factors, especially to the output gap.
The next section describes the cross-country regressions considered by the EBA methodology and investigates whether the assumption of slope homogeneity implicit in these regressions is supported by the data. Section 3 describes the dataset. Section 4 identifies how much of the recent current account dynamics of the Spanish economy can be attributed to cyclical and structural factors. Section 5 carries out a similar analysis on the main sub-balances, namely the trade and the investment income balance. We draw some conclusions in Section 6.

The country-specific EBA methodology
The External Balance Assessment (EBA) methodology is a widely used tool for assessing the importance of different current account determinants in shaping external imbalances across countries (see IMF, 2013). Despite the EBA approach consider different tools for assessing the external position of different countries, we focus here on the current account regressions that can be used to assess which part of a country's external balance is explained by structural determinants (such as demographic factors) and temporary factors (such as the output gap) in a multilateral context. The regressions of the current account balance on a multitude of explanatory factors in a panel of countries provides coefficients for determinants, which in turn allow for computing their contribution to the current account balance of a particular country. Such regressions consider both the trade perspective (through factors such as competitiveness) and the savings-investment perspective since the current account balance equals the difference between aggregate saving and investment (through the the drivers of net saving such as demographics). positive analysis allows identifying the main drivers of current account developments; on the other hand, the normative arm estimates the so-called current account norms, which are interpreted by the IMF as the desirable levels of external imbalance for each country. The normative component requires strong judgment on certain policy aspects such as the desirable fiscal deficit in a given country when determining the so-called policy benchmarks. Moreover, in order to ensure multilateral consistency, it requires the use of panel approaches fully ignoring country-specific heterogeneity. As a result, the general feature of such panel regressions is that they leave a substantial part of current account balances unexplained, i.e. the residuals of such regressions are typically large. These residuals can be attributed to factors that have not yet been accounted for, which may be permanent or transitory.
Our analysis here is based on the positive side of the EBA methodology so that we fully abstract from normative considerations. In particular, we aim to decompose current accounts into permanent and transitory factors without judgments about the equilibrium or norms for external imbalances.
Along these lines, the inclusion of country-specific effects represents a natural extension as they can be considered as permanent by definition. Also, its inclusion in the panel regressions improves the estimated elasticities of fundamental factors by removing omitted variable bias.
More formally, we estimate the following empirical model: where CA it refers to the current account balance of country i in year t. x it,S is a vector of structural or permanent factors (e.g. demographic indicators, institutional quality, growth expectations) while x it,C includes the set of cyclical factors (e.g. output gap or oil prices). η i refers to country-specific heterogeneity that is permanent and unobserved. Finally, the right-hand-side variables are included in deviations from the GDP-weighted world average in a given year. 3 Crucially, the estimated elasticities are also allowed to vary across countries (β i,S and β i,C ) as it is apparent from equation (1). Panel 1 of Figure 1 plots the estimated elasticity of the current account to the output gap for each country in our sample. The graph illustrates how these elasticities widely differ across countries, ranging from -1.42 for Switzerland to 0.43 for Canada. As a result, Panel 2 of In order to formally test the validity of the slope homogeneity assumption we use the test proposed by Pesaran and Yamagata (2008), which is based on a version of the Swamy (1970) F-test adjusted to provide valid inference when both N and T are large. 4 Table 1 reports the Pesaran and Yamagata 3 This treatment does not apply to two regressors without cross-country variation in the same year, namely, oil prices and the VIX index. 4 Note that Hausman-type tests of slope homogeneity lack power under these circumstances (see Pesaran and To be more concrete, the EBA approach is used for two different purposes: on the one hand, the Yamagata, 2008). Note also that the Pesaran and Yamagata (2008) test is designed for the case of stationary panels with strictly exogenous regressors. (2008) homogeneity test for a panel regression of the current account on the following factors: output gap, private credit, old age dependency ratio, expected GDP growth, long-run interest rate, unit labor costs, structural fiscal deficit, exhaustible resources of oil and natural gas, oil prices, financial cycle, and institutional environment (see below for details on the selection of variables). The verdict of this test corroborates the intuition from Figure 2, i.e., the null hypothesis of slope homogeneity is sharply at odds with the data. Therefore, the homogeneity assumption implicitly made by the original EBA regressions appears to be rejected by the data.
The Mean Group estimator by Pesaran and Smith (1995) allows the inclusion of time-invariant unobserved heterogeneity at the country level as well as country-specific slopes. Mean Group type estimators allow for heterogeneity by running country-specific regressions and then averaging the coefficients across the panel. This provides the researcher with well-behaved slopes as long as both N and T are moderate. Moreover, the residuals can be estimated using the country-specific slopes  (1). In each column, the test is performed under two alternative approaches to compute the variance-covariance matrix (see Pesaran and Yamagata, 2008). In both cases, the test fails to reject the null of parameter homogeneity.
and intercepts so that they are negligible in most cases. In other words, country-specific regressions provide a much better fit of the data than panel-wide alternatives and thus allow for a more informative decomposition of current accounts between permanent and transitory factors.
The consideration of this class of estimators precludes the inclusion of all the factors included in the original EBA regression. First, those variables presenting unit roots cannot be included in the model to avoid spurious regression in country-specific regressions. Second, since full slope heterogeneity across countries is allowed by construction, it is not necessary to include interaction terms. Third, regressors without time variation cannot be considered because identification relies on within country variation. In light of these considerations, we now turn to the discussion of the final set of variables included in our analysis.

Data
The majority of our data are taken from the IMF EBA dataset, which provides a wide set of potential current account determinants for 49 advanced and emerging market economies for the period 1986-2015. In particular the dataset includes fundamental non-policy-related determinants (such as productivity, expected GDP growth, demographic factors), financial determinants (countries' reserve currency status, global financial market conditions), cyclical factors (such as the output gap) and policy-related variables (like the cyclically-adjusted fiscal balance and the level of public expenditure in health). Our specification for current account regressions starts from the EBA baseline. Yet, as mentioned above, since we consider country-specific slopes and intercepts, in our baseline specification we drop interacted variables as well as dummies with no within-country variation. We also drop variables for which we detect unit roots. We then include additional variables in order to account for the features that characterize the Spanish experience over the last years: low oil prices in an economy depending on oil imports as well as competitiveness gains. As a result, our baseline specification for current account regressions includes the following variables: • oil and natural gas balance: net exports of oil and gas as a share of GDP. Enters only when the balance is positive and is adjusted for a measure of temporariness to take into account whether the resource is expected to be exhausted soon; • oil price: U.S. Energy Information Administration, Crude Oil Prices taken from FRED economic data; • VIX index: CBOE Volatility Index, reflects implicit volatility of S&P 500 index options, calculated and published by the Chicago Board Options Exchange (CBOE). Is interpreted as a measure of global risk aversion; • unit labor costs: labor income share multiplied by GDP deflator. Sources: Penn World Tables   and IMF WEO; • interest rates: real long-term interest rates. Source: IMF IFS; • expected GDP growth: WEO projections of real GDP growth 5 years ahead; • old-age dependency ratio: population aged over 65 divided by population between 30 and 64 years old; • fiscal balance: cyclically-adjusted fiscal balance computed based on IMF country team estimates. Due to potential endogeneity issues, the EBA dataset provides the instrumented value of this variable. See IMF (2031) for the list of instruments used.
• private credit as a share of GDP: credit provided to the non-financial private sector by domestic financial institutions. Demeaned; • risks associated with the institutional environment. average of 5 indicators from the International Country Risk Guide dataset. Higher values signal lower risk.
All variables except oil prices and the VIX index are expressed relative to a GDP-weighted world aggregate. The source is the EBA dataset, unless otherwise specified.

Current account determinants: cyclical vs. structural
The purpose of this section is to estimate a decomposition of current account balances into a transitory/cyclical component and a permanent/structural component. Labeling as permanent or transitory the contributions of the determinants included in our analysis poses a challenge. In particular, our baseline decomposition considers as cyclical the contribution of output gaps, financial cycle and • output gap, based on estimates from IMF country teams or on HP filtered estimates; oil prices and balance. The remaining factors are labeled as more permanent or structural, namely, private credit -driven by growth expectations-, old age dependency ratio, expected GDP growth, long-run interest rate, unit labor costs, structural fiscal deficit, and institutional environment.  (1) shows the average estimates across all the countries in the sample, our decompositions will be based on country-specific estimates for Spain reported in column (2) that better capture the contribution of each factor to current account developments as illustrated in Figure 2. Indeed, residuals are almost negligible in most countries when using the country-specific estimates as illustrated by the high R-squared.
Estimates for Spain in column (2) (2), the contractionary effect appears to dominate in Spain as the coefficient is positive and significant.
As expected from economic theory, the impact of the old-age dependency ratio on the current account balance is estimated to be negative and significant because retirees typically draw down their savings. The relative fiscal balance presents the expected positive coefficient as the savinginvestment decisions of the public sector are also reflected in the overall economy given the many factors that can induce a departure from Ricardian Equivalence (see Lane and Milesi-Ferretti, 2002).
Countries with high expected GDP growth may attract international capital flows reducing their current accounts because they are expected to produce higher rates of return; the negative and significant effect of this factor confirms the role of expectations of future growth as a major driver of current account behaviour in the case of Spain.
Weak institutions lower the risk-adjusted return to capital and thus generate a disincentive to investment and possibly an incentive to save more (Alfaro et al., 2005); this channel is reflected in the negative and significant coefficient of our institutional environment variable (higher values signify less risk). Private credit/GDP is considered as an indirect indicator of policies to contain financial excesses. Improved financial deepening may result in lower saving rates and higher investment; however, financial development may also encourage savings by lowering transaction costs and facilitating risk management, implying a positive influence on the current account (see Cheung et al., 2010). The latter effect appears to dominate in Spain given the positive and significant coefficient associated to private credit in column (2) despite the negative average effect in column (1).
In columns (3)- (6) of Table 2, we report several robustness checks. In column (3)  Overall, the main conclusions from column (2) remain robust when model uncertainty is taken into account.
In order to gauge the magnitude of the contributions of each factor to current account fluctuations, column (6) of Table 2 reports the coefficients from a regression of current account on the standarized regressors (zero mean and unit variance). The reported estimates can thus be interpreted as the  (4) and (5) show model averaged estimates that account for model uncertainty (see main text for more details); finally, column (6) reports OLS estimates with standardized regressors to facilitate the comparison of the effects. current account effect of an increase of one SD in each of the covariates. The largest effects correspond to the output gap and the oil and gas balance, both considered as transitory. In particular, a one SD increase in the output gap is associated to a reduction of 0.57 SDs in the current account. The fiscal balance and ULCs also present large effects on the current account.

Current account decompositions
In this subsection, we consider the following decomposition of the current account: whereβ i,C x it,C is the so-called cyclical or transitory component of the current account andβ i,S x it,S +η i refers to the permanent or structural component. To be more concrete, the cyclical factors included in x it,C are the output gap, the oil and gas balance, oil prices and the VIX index. On the other hand, in addition to the country-specific interceptη i , the structural factors are those included in the vector x it,S , namely, the institutional environment, private credit, the fiscal balance, the dependency ratio, expected growth, the interest rate and ULCs. Finally, the estimated residualsˆ it as well as the country-specific slopesβ i,S andβ i,C are taken from column (2) in Table 2 for Spain.  the 2008-2015 period, we consider the same type of decomposition but in accumulated changes rather than levels.Δ In order to better gauge the contribution of each factor to the current account adjustment over whereΔ refers to the operator that accumulates changes between 2008 and t.
As illustrated in the left panel of Figure 4, around 60% of the overall correction of the Spanish external deficit can be explained by transitory factors (e.g. output gap, oil balance). According to the economic theory, retirees typically draw down their savings so that higher oldage dependency ratios are typically associated with more negative current accounts. However, the Spanish dependency ratio relative to other countries has decreased by 2 pp from 2008 to 2015, which explains the positive contribution to the current account adjustment.
The effect of long-term interest rates is ambiguous ex-ante. On the one hand, lower interest rates can reduce financing costs and thus allow companies to compete internationally in better conditions and gain share in export markets; on the other hand, the expansionary effect of lower interest rates can contribute to a deterioration of the current account. According to our estimates, the evolution of interest rates has contributed positively to the external deficit adjustment via the contractionary effect of the relative increase of the Spanish relative interest rates from 2008 to 2015.
Likewise, lower expectations of future growth lead to lower investment rates (due to the lower expected returns) and more positive current accounts. The expected GDP growth of the Spanish economy relative to the rest of the world has been revised downwards by around 1 pp from 2008 to 2015, which has contributed to the improvement of the current account balance.

Delving deeper into current account components: the trade and the investment income balance
Having studied the adjustment of the overall current account balance in the previous section, we next decompose its evolution into the main sub-balances in order to delve deeper into the drivers of the adjustment. Figure 5 shows the decomposition of the Spanish current account balance, as a share of GDP, into the balance of trade (recording net exports of goods and services), the investment income balance (capturing the income received by Spanish residents on their foreign assets minus the payments made on their stock of external liabilities), and the residual balance (reflecting net labour income received from abroad). Notes. This plot shows the decomposition of the Spanish current account balance into the balance of trade (recording net exports of goods and services), the investment income balance (capturing the income received by Spanish residents on their foreign assets minus the payments made on their stock of external liabilities), and the residual balance (reflecting net labour income received from abroad).
Changes in both the trade and the investment income balance contributed significantly to the deterioration and the subsequent adjustment of the Spanish current account, while fluctuations in net labour income as reflected in the residual balance played a negligible role. In particular, out of the 11.6 pp. improvement in the Spanish current account between 2007 and 2016, 8.9 pp. were due to a consolidation in the trade balance and 2.5 pp. were explained by the improvement in the investment income balance, while only 0.2 pp. can be related to the residual balance.
In order to investigate further the factors that lead to the consolidation of the main sub-balances, in this section we carry out regressions of the Spanish trade and investment income balance on their fundamental determinants, with the aim of isolating the contribution of cyclical and more structural factors to the overall consolidation.

The trade balance
Our analysis of the trade balance makes use of the same regression specification employed for the current account in section 4, as we found that that empirical model approximates well the dynamics of the trade balance. Regression results, shown in Table A.1 in the Appendix, are also similar to those obtained for current account regressions, with all the coefficients exhibiting the expected sign.
Among the main differences with respect to current account regressions are the lower contribution of expected growth and the lack of significance of ULC and political risk. Moreover, the credit-to-GDP share was found not to be a significant determinant of the trade balance and the coefficient of the VIX was estimated to be very close to zero, which confirms that the impact on the current account of these financial factors is mostly going through the investment income balance, as the analysis carried out in the next section confirms. All in all, the factors that were responsible for the post-crisis adjustment of the Spanish trade balance were those that also explained most of the overall current account consolidation: among cyclical factors, the negative output gap and the fall in oil prices, and, among more structural determinants, the fiscal consolidation and demographic shifts.

The investment income balance
Our analysis of the investment income balance started, as for the other regressions, from the EBA current account specification. Yet we found that many of the regressors included in that empirical model do not work well to explain the behavior of investment income alone, as this is more likely influenced by financial and other specific factors, which may play a secondary role in explaining the evolution of the aggregate current account balance. 7 For this reason, among the cyclical regressors 7 For instance, variables such as the fiscal balance, unit labor costs and institutional quality turn out not to be significant determinants of the investment income balance. used in the EBA specification, we kept those defining the real and financial cycle, namely the output gap and the VIX, the latter expressed as deviations from its historical average, and dropped the oil balance, which, according to economic theory, should be more related to the trade component of the current account. As concerns more structural determinants, we kept those that were found to be significant, namely private credit to GDP and the dependency ratio. We also tried to select additional structural factors based on a preliminary accounting decomposition of the financial flows that determine the investment income balance. The left panel of Figure 6   Notes. The left panel shows changes in the investment balance distinguishing by net payments received on the stock of equity (FDI and portfolio equity) and net payments received on debt assets. The right panel further decomposes payments into those made to international investors and those received from abroad.
These findings indicate that, among structural factors, those that mostly influenced the dynamics of investment income were those linked to the evolution of the Spanish stock of external debt and its rate of return. In this sense, private credit, which in the Spanish case ended up being converted in debt instruments, might have likely been a relevant determinant of the stock of external debt. Other factors that might have affected the profitability of the stock of external debt of the Spanish economy are variations in the short-term nominal interest rate (which we include in the regressions expressed relative to an aggregate of Spain's main debtor countries) and the share of external debt that is held by the public sector, which, being considered a safer counterpart with respect to the private sector, may lower the implicit rentability of external debt. We complement the specification with two standard determinants of the investment income balance, the lagged stock of net foreign assets as a share of GDP, and fluctuations in the nominal exchange rate with respect to the dollar, interacted with an index of financial liberalization. The time span is 1993-2015 due to data availability. 8 Table   3 shows the results. As for current account regressions, our baseline estimation features OLS with robust standard errors. As shown in the second column, all results are robust to GLS estimation.
Taking into account model uncertainty does not qualitatively affect the main results.
All coefficients display the expected sign. Among cyclical factors, a positive output gap with respect to the rest of the world increases the dividends payed to foreign investors by Spanish firms, with a negative impact on investment income. Consistently with the results of current account regressions, the investment income balance tends to improve in periods of global financial turmoil.
This could be due either to a reduction in the availability of financing from abroad in period of crisis or to the role of safe-haven currency of the euro, which tends to reduce the rentability of external debt in periods of global turmoil. As concerns more structural factors, an increase in private credit tends to lead to an accumulation of external debt, which, in turn, worsens the investment income balance. A higher dependency ratio has the same effect as older cohorts tend to reduce their savings.
A higher share of external debt held by the public administration, which tends to be regarded as a safer counterpart with respect to the private sector, reduces its implicit rentability implying lower payments to foreign investors with a positive impact on the investment income balance. Increases in the Spanish nominal short-term interest rate, on the other hand, raise the return of external debt and the payments made to foreign investors, thereby reducing net investment income. Finally, the impact of net foreign assets and nominal exchange rate fluctuations is found not to be significant, but we keep these variables as controls as they exhibit the expected sign. Overall, the regression leave only a negligible part of fluctuations in the investment income balance unexplained, which allows a meaningful decomposition of the adjustment into cyclical and more structural factors. 8 Short-term nominal interest rates are from the IMF IFS. The Spanish interest rate is expressed relative to a simple average of Spain's main debtors (France, Germany, Italy, Netherlands, UK, US) based on total portfolio investment debt assets from the IMF Coordinated Portfolio Investment Survey. Data on external debt held by the public sector are from the Bank of Spain. NFA/GDP and the Chinn and Ito index of financial globalization are from the EBA dataset, while the nominal exchange rate vis-á-vis the US dollar are from the IMF IFS.   Notes. This figure plots the cyclical (proxied by the output gap -economic-and the VIX indexfinancial-) and structural components of the Spanish investment income balance together with the residual term identified from estimates in Table 3. The accumulated income balance correction that started after the crisis was due more to cyclical factors (28%), especially to the negative output gap (34%). Still, in the most recent years structural determinants gained importance and ended up explaining a considerable part (almost 60%) of the accumulated correction in 2015. Two of them played a particularly important role. The share of external debt issued by the public administration increased, which lowered the implicit rentability of Spanish external liabilities. Moreover, the gradual contraction of private credit tended to reduce the stock of external debt, thereby diminishing payments to foreign investors.

Concluding remarks
The current account balance of the Spanish economy improved by 11.6 pp. since the onset of the crisis, from a deficit of -10% of GDP at the end of 2007 to a surplus of +2% in 2015. In this paper, we assess to what extent this adjustment was due to cyclical factors (e.g. output gap) or more structural determinants (e.g. demographics). For that purpose, we consider EBA-inspired panel regressions in which country-specific slopes and intercepts are allowed.
Our empirical results indicate that around half of the current account adjustment can be explained by the economic cycle and the fall in oil prices. Other factors contributing to the correction of the external balance include most notably the adjustment in public finances, population aging, lower growth expectations and the gains in competitiveness of recent years, which can all be considered as more structural determinants. Turning to the investment income balance, the greater share of government debt and the correction in the credit-to-GDP ratio have contributed to its structural adjustment.
[24] Tressel, T. and S. Wang (2014) "Rebalancing in the Euro Area and cyclicality of current account adjustment," IMF WP 14/130. Notes. Sample covers a maximum of 35 years (from 1980 to 2015) and 30 countries. Column (1) refers to the Mean Group estimator resulting from averaging across country-specific estimates; column (2) refers to the OLS regression for Spain which is used to construct the MG estimates in column (1); column (3) reports GLS estimates for Spain with a AR(1) correction in the disturbances to account for autocorrelation; columns (4) and (5) show model averaged estimates that account for model uncertainty (see main text for more details); finally, column (6) reports OLS estimates with standardized regressors to facilitate the comparison of the effects.