Secciones
Referencias
Resumen
Servicios
Buscar
Fuente


The Evolution of External Shocks and Macrofiscal Outcomes in the Andes
La evolución de los shocks externos y los resultados macrofiscales en los Andes
Económica, vol. 71, 2025
Universidad Nacional de La Plata

Artículo científico

Económica
Universidad Nacional de La Plata, Argentina
ISSN: 0013-0419
ISSN-e: 1852-1649
Periodicity: Frecuencia continua
vol. 71, 2025

Received: 19 January 2024

Accepted: 21 January 2025

Published: 14 March 2025


This work is licensed under Creative Commons Attribution-NonCommercial-NoDerivs 4.0 International.

Abstract: Abundant natural resources often destabilize macroeconomic performance. Effective management of extractive industry resources, supported by sound economic institutions, is crucial to sustaining macroeconomic stability and fostering long-term growth. This paper examines the impact of terms-of-trade shocks on fiscal outcomes and economic growth in the Andean region. Employing a time-varying structural vector autoregression (TV-SVAR) model, we estimate the magnitude of these shocks and the sensitivity of fiscal and macroeconomic variables. Our results reveal significant time-varying effects and heterogeneity across countries, which reflects varying levels of institutional development. The findings highlight the importance of strong economic frameworks to mitigate the adverse effects of terms-of-trade volatility.

Keywords: Fiscal policy, natural resource management, time-varying bayesian SVAR.

Resumen: La abundancia de recursos naturales a menudo desestabiliza los resultados macroeconómicos. La gestión eficaz de los recursos de las industrias extractivas, respaldada por instituciones económicas sólidas, es crucial para mantener la estabilidad macroeconómica y fomentar el crecimiento a largo plazo. Este documento examina el impacto de las perturbaciones en los términos de intercambio sobre los resultados fiscales y el crecimiento económico en la Región Andina. Utilizando un modelo estructural de vector autorregresivo de tiempo variable (TV-SVAR), estimamos la magnitud de estas perturbaciones y la sensibilidad de las variables fiscales y macroeconómicas. Nuestros resultados revelan efectos significativos y variables en el tiempo, así como heterogeneidad entre países, reflejando distintos niveles de desarrollo institucional. Las conclusiones destacan la importancia de contar con marcos económicos sólidos para mitigar los efectos adversos de la volatilidad en los términos de intercambio.

Palabras clave: política fiscal, gestión de recursos naturales, SVAR bayesiano de tiempo variable.

1 - Intro and Motivation

The abundance of natural resources often presents significant challenges to macroeconomic stability, a phenomenon commonly referred to as the “natural resource curse”. Countries rich in resources face unique risks, including increased volatility due to fluctuating commodity prices, reduced incentives for economic diversification, and the proliferation of weak institutions, which can lead to social conflict and corruption (Frankel, 2010). For countries heavily reliant on extractive industries, such as those in the Andean region, effective management of these resources is critical to maintaining economic stability and fostering long-term growth.

This paper evaluates the impact of terms-of-trade shocks on fiscal performance and economic growth in the Andean region over a 20-period horizon using a VAR model that includes variables such as economic growth, primary balance, and real exchange rate. By analyzing annual data, it explores the main transmission channels of these shocks and provides historical context on the economic crises and the fiscal and monetary policies adopted by Bolivia, Colombia, Ecuador, and Peru. The paper highlights the implementation of fiscal rules and efforts to improve fiscal responsibility and transparency, emphasizing the importance of robust fiscal institutions in mitigating external impacts and promoting long-term growth.

Concerning macroeconomic stability, terms-of-trade volatility has been found to be an important source of macroeconomic fluctuations (Kose , 2002; Mendoza, 1995), particularly in resource-rich countries. Negative terms-of-trade shocks, for instance, can generate larger current account deficits and significant exchange rate variability (Harberger, 1950; Laursen and Metzler, 1950; Ostry and Reinhart, 1992). In emerging markets, terms-of-trade shocks are an essential source of cyclical fluctuations. Fernández et al. (2018) find that fluctuations in commodity prices explain an important part of the business cycle behavior in emerging countries. In terms of economic growth, Fernández et al. (2020) report that global shocks affecting commodity prices are a relevant (although not dominant) source of variation in the economic growth of countries worldwide, and Céspedes and Velasco (2012) show that commodity price shocks have a significant impact on the dynamics of production and investment.

Despite abundant evidence on the effects of commodity price volatility in the economic activity of commodity-rich countries, the discussion about the evolution of its magnitude and transmission channels is far from being settled, particularly in a global and changing environment, where the sources of commodity price volatility are multiple. In this paper, we focus on studying the time-varying transmission of commodity price shocks to economic activity through the fiscal channel1 , paying special attention to the procyclicality bias of fiscal policy found in commodity-dependent economies.

A countercyclical fiscal policy involves reducing government spending and increasing tax rates during good times and increasing government spending and lowering tax rates during bad times. This policy is termed countercyclical because it aims to stabilize the business cycle, making fiscal policy contractionary during economic booms and expansionary during recessions. This contrasts with a procyclical fiscal policy, where the behavior of tax revenues and the primary balance as a proportion of GDP can be ambiguous due to the varying tax rates and tax base throughout the economic cycle (Kaminsky et al., 2004).

Standard economic theory predicts that fiscal policy should be countercyclical. The neo classical tax smoothing model of Barro (1979) says that because taxes are distorting to economic activity, the optimal fiscal response by economic authorities would be to smooth public spending and taxes throughout the economic cycle, generating budget surpluses in good times and temporary deficits in bad times. A similar result occurs in the standard neo- Keynesian framework (Mankiw and Romer, 1991). In this case, the reasons are related to market failures that can spur a recession, which in turn pushes a government to run budget deficits during such times in order to return the economy to a path of growth.

In practice, however, the empirical literature has found that countries present persistent deficits throughout the economic cycle. Such procyclicality is most evident in Latin America (Ilzetzki and Vegh, 2008) and in countries whose public finances rely significantly on revenues (taxes, royalties, profits, and credit) coming from the exploitation of natural resources (Alberola and Sousa, 2017). In developing countries, fiscal procyclicality primarily manifests through increased spending during periods of economic expansion and decreased spending during recessions. Fiscal revenues, which are endogenous to the economic cycle, tend to rise during boom periods, leading governments to increase spending proportionally or even more than proportionally due to temptation or political pressure. Empirical evidence shows that developing countries generally exhibit procyclical government spending, indicating that spending directly responds to the economic cycle, regardless of the fiscal deficit (Frankel et al., 2013).

One of the reasons why such procyclicality occurs is credit constraints. The implication of high commodity price volatility is that, when international prices of natural resources are low, governments in resource-rich nations are credit constrained, and when these prices are high, governments are credit relaxed. This condition, imposed by commodity price volatility, results in a procyclical bias on fiscal policy. Thus, the loss (or the lack) of access to financial markets during economic downturns may make it impossible for countries to follow a countercyclical policy (Caballero and Krishnamurthy, 2004; Gavin and Perotti, 1997). This effect can be reinforced by incomplete financial markets, which affect the financing options available (Riascos and Vegh, 2003).

When international conditions deteriorate, such as during a global financial crisis, investors often perceive an increased risk in lending to sovereign borrowers. This heightened risk perception can lead to higher sovereign bond spreads, as investors demand greater compensation for the risk of default, making it more expensive or difficult for countries to access credit. Additionally, an unsustainable rise in public debt can raise concerns about a country’s ability to service its obligations, prompting investors to either refuse to lend or demand higher interest rates (Petrova et al., 2010). As a result, countries face credit constraints, limiting their ability to secure financing at reasonable terms and restricting funding for public services or investments.

Nevertheless, as Céspedes and Velasco (2014) claim, the fact that a government can borrow during a commodity-price boom does not mean that it will find it desirable to borrow (or increase spending) in such a period. Thus, credit restrictions that change according to the economic cycle do not fully explain the fiscal procyclicality in countries rich in natural resources. For this reason, additional explanations of the procyclicality of fiscal policy have come from the field of political economy.

Based on the observation that, during booms, government expenditures increase more proportionally than revenues, some political economy theories have been proposed under different political arrangements and institutional settings. One, the “voracity effect” (Lane and Tornell, 1996; Tornell and Velasco, 1992; Tornell and Lane, 1999), posits that in political systems in which power is diffused among several agents (each of them pushing for their share of the windfall), fiscal policy will be more procyclical, relative to a more centralized system.

Another theory focuses on the interaction of political agency and information asymmetries (Alesina et al., 2008). The setting is straightforward: while voters observe the state of the economy during a boom (and therefore demand higher utility for themselves), they cannot observe government behavior; thus, they end up facing corrupt governments that appropriate a portion of tax revenues for unproductive public consumption or rent-seeking, which results in a procyclical bias in fiscal policy. Moreover, when voters are not well informed and there exists a high degree of polarization, politicians may have incentives to accumulate public debt and pursue a procyclical fiscal policy (Aguiar and Amador, 2011; Ilzetzky, 2011).

The undesired economic and social outcomes of fiscal procyclicality are multiple. Among them are an unsustainable level of public debt, regressive and intergenerational distributional impacts, and the occurrence of sovereign debt defaults and other economic crises, with the consequential increases in poverty, inequality, migration, social conflict, and political turmoil.

Given the importance of resources derived from commodity exports in the Andean region and the heterogeneous development of fiscal institutions in some of the region’s countries in recent years (Kehoe & Nicolini, 2022), this paper studies the time-varying impact of terms-of- trade shocks on economic growth and fiscal performance in Bolivia, Colombia, Ecuador, and Peru. To accurately capture the variation on both, (i) the magnitude of shocks and (ii) the response of economic and fiscal variables to them, this paper makes use of a TV-SVAR model (Primiceri, 2005). This methodology allows us to evaluate whether improvements in economic (fiscal) institutions generated a lower sensitivity to terms-of-trade fluctuations during the recent decades and what the fiscal and economy-wide time varying responses to these types of shocks have been.

The results found in this paper show a time-varying dynamic for both terms-of-trade shocks and the sensitivity of the Andean region’s economies to these shocks. In addition, the results reveal heterogeneity in the impacts of terms-of-trade shocks in the different countries. Thus, countries such as Bolivia and Ecuador exhibit a marked procyclical effect in their fiscal policy, while Peru and Colombia stand out for having a more countercyclical stance. This heterogeneity coincides with the uneven institutional development in the countries of the region. These results highlight the importance of developing adequate economic policy frameworks to mitigate the volatility of the terms-of-trade in the region. The remainder of the paper is structured as follows: Section 2 includes a short literature review. Section 3 introduces the empirical methodology. Section 4 describes the data and our main results. Section 5 offers some concluding remarks

2 - Literature review

Different studies have shown that variations in the terms-of-trade can generate significant impacts on the main macroeconomic variables, especially in the case of emerging countries that are highly dependent on the exportation of natural resources. Employing a general equilibrium model developed for 23 developing countries, Mendoza (1995) finds that variations in the terms-of-trade explain approximately half of the variation observed in GDP in the countries evaluated. These results are supported by the findings of Kose (2002) who constructs a more detailed production structure than the original framework developed by Mendoza (1995). In the case of Latin America and the Caribbean (LAC), Izquierdo et al. (2008) show that economic growth in industrialized countries, U.S. high-yield-bond spreads, and terms-of-trade are the external factors that most affect the economic dynamics of LAC countries. In addition, these authors argue that growth in the terms-of-trade is associated with long-term growth in the GDPs of the countries in the region.

Concerning the influence of the terms-of-trade on fiscal variables, Villafuerte and Lopez- Murphy (2009) analyze the fiscal responses of oil-producing countries from 2003 to 2008, finding that the countries present deterioration in their non-oil primary balances that is explained by an increase in primary expenditure. In addition, the authors find that most of the countries in their sample presented a procyclical fiscal policy and a deterioration in the long-term fiscal position. In the same vein, Erbil (2011) studies the cyclical behavior of fiscal policy in 28 oil-producing developing countries from 1990 to 2009, finding a high procyclicality of different fiscal variables. At the same time, this author presents evidence of heterogeneous effects across countries according to different income levels, with spending being procyclical in low- and middle-income countries and countercyclical in high-income countries.

Different studies have found procyclical behavior in LAC (Gavin et al., 1996; Gavin and Perotti, 1997; Stein et al., 1999); Camacho and Perez-Quiros (2014) analyze the behavior of output in Argentina, Brazil, Chile, Colombia, Mexico, Peru, and Venezuela in the face of changes in commodity prices. The authors report that each country’s response to commodity price shocks depends on the moment in time, the magnitude of the shock, and whether the shock represents a reduction or an increase in prices. Melo-Becerra et al. (2020) find that the effects of changes in the price of oil on the Colombian economy have changed over time and depend on the direction of the variation in the commodity’s price. In this sense, significant increases in the price of oil did not seem to affect public debt, while reductions in oil prices increased the level of indebtedness.

The literature has highlighted the development of adequate fiscal institutions as one of the factors that contributes to the reduction of fiscal policy procyclicality. Medina (2016) studies the effects of commodity price shocks on fiscal revenues and expenditures in LAC countries in the period 2005—2013, finding that fiscal aggregates respond to commodity price shocks, although with heterogeneities across countries: Medina (2016) finds that Venezuela has the highest fiscal sensitivity to commodity price shocks, whereas Chile’s fiscal sensitivity is low. This result may be linked to the establishment of fiscal rules that reduce the sensitivity of fiscal variables to fluctuations in international prices.

Céspedes and Velasco (2012) argue that the implementation of credible fiscal rules can reduce the impact of external shocks on output and reduce the sensitivity of the exchange rate. Additionally, the type of monetary regime and the existence of stable political systems can reduce the sensitivity of macroeconomic variables to commodity price shocks. Frankel et al. (2013) find that many developing countries have managed to escape fiscal procyclicality in recent years and have even implemented countercyclical fiscal policies as developed countries do. According to these authors, a key driver of this effect is the development of effective institutions in economic, legal, and political terms. Similar results are found by Céspedes and Velasco (2014) and Cespedes et al. (2014). However, recent works such as Bjørnland and Thorsrud (2019) have found that even in countries such as Norway, the establishment of fiscal rules may not have contributed much to the reduction of the procyclicality of fiscal policy. These authors highlight that the time-varying dynamics of shocks are crucial elements to consider in order to accurately model shocks generated by changes in international commodity prices.

The countries of the Andean region have made heterogeneous progress in recent years in terms of the development of fiscal institutions (Andrian et al. (2022)). Colombia, Ecuador, and Peru have instituted fiscal rules during the last 20 years. Colombia and Peru are the only countries with independent fiscal councils and moreover Peru has a solid medium-term fiscal framework in place. Meanwhile, as part of the fiscal institutional framework defined in Colombia, the Ministry of Finance and Public Credit (MHCP) publishes an annual Medium- Term Fiscal Framework (MFMP), which presents the results and sets forth the purposes of fiscal policy. In addition to an MFMP, Colombia has a Medium-Term Expenditure Frame- work (MGMP). Although Ecuador does not have a MFMP, the country has multiannual budgetary programming. Finally, Bolivia has not shown any significant development in its fiscal institutions in recent years compared to the rest of the countries in the region.

3 - Methodology

3.1 - Time-Varying VAR

There could be at least two sources of variation in the relationship between external shocks and macroeconomic and fiscal outcomes through time. The first is related to changes in the heteroskedasticity of the shocks, which are, if anything, volatile. The second are changes in the transmission mechanism, that is, how macroeconomic and fiscal variables respond to shocks. If shocks vary over time, this could directly impact their transmission mechanism and, if agents are rational and forward-looking, the fiscal policy response to those changes will be incorporated into their economic decisions, introducing additional modifications to the transmission mechanism. This is key for the Andean region where, due to both shocks and policies, agent responses have varied significantly over time. For an econometric model to capture these dynamics, it must have two features: (1) a multiple equation model, in order to capture how changes in fiscal policy affect the rest of the economy, and (2) time- varying parameters, in order to measure and understand how volatility and policy changes affect agents’ behavior. Therefore, to estimate changes in macrofiscal outcomes through time, as in Primiceri (2005), Nakajima et al. (2011), Del Negro and Primiceri (2013), and Melo-Becerra et al. (2020), we use the following time-varying structural vector autoregressive model with stochastic volatility:

[1]

where y t is a n × 1 vector of observed endogenous variables; c t is a n × 1 vector of time-varying coefficients that multiply constant terms; B i , t , i = 1 , . . . , k , are n × n matrices of time-varying coefficients; and u t are heteroskedastic unobservable shocks with variance-covariance matrix Ω t . For simplicity, consider the triangular decomposition of Ω t :

[2]

where A t is the lower triangular matrix:

and t is the diagonal matrix:

This implies that

[3]

The modeling strategy consists of estimating the coefficient processes in equation (3). This model has two sets of time-varying coefficients, B t and a i j , t , and a stochastic volatility modelfor the diagonal elements, σ i , t . The dynamics of the model’s time-varying parameters are specified as follows:

[4]

[5]

[6]

where the elements of the vector B t are modeled as random walks as well as the free elements of the matrix A t . The standard deviations ( σ t ) are assumed to evolve as geometric random walks, which belong to the class of models known as stochastic volatility (see Blake and Mumtaz (2017)). All of the model’s innovations are assumed to be jointly normally distributed with the following assumptions on the variance covariance matrix:

[7]

where I n is a n-dimensional identity matrix and Q , S and W are positive definite matrices. Primiceri (2005) states these assumptions are justified, for at least two reasons: (1) the high number of parameters in the model (adding all the off-diagonal elements of V would require the specification of a sensible prior that is able to prevent cases of ill-determined parameters), and (2) allowing for a completely generic correlation structure among different sources of uncertainty would preclude any structural interpretation of the innovations.

Finally, S is assumed to be block diagonal, with the blocks corresponding to parameters belonging to separate equations. The intuition is that the contemporaneous relationship among variables are assumed to evolve independently in each equation. More formally, from equations (2) and (3), consider the following relationship:

[8]

In the case of a three-variable VAR, this relationship implies the following set of equations:

[9]

which can be rearranged and translated into the following equation forms:

where V ε t = t and

[10]

[11]

Therefore, the a i j , t are time-varying coefficients on regressions involving the VAR residuals.

3.1.1 - Estimation procedure

Because the model includes a number of parameters that change over time, the econometric procedure for estimating the model is the Bayesian approach. In these types of models, parameters are considered latent variables so that they can be estimated with state-space models. The unobservable states correspond to the history of coefficients ( β T , A T ) and the history of volatilities ( t ). A Bayesian approach reduces uncertainty about the parameters and evaluates their posterior distribution and that of the hyperparameters ( V ).

Gibbs sampling, a Monte Carlo with Markov Chains (MCMC) simulation method, is used for the posterior numerical evaluation of the parameters of interest. This procedure sets the prior joint distribution of the parameters function and then updates it with the data likelihood function, which generates the posterior probability function of the parameters. Because this function is analytically intractable, Gibbs sampling generates samples of the parameters from their full conditional distributions, which are smaller than their joint distribution. It is an iterative algorithm that builds sequence-dependent values of the parameters with distributions converging toward their posteriors after a number of iterations.

Priors. Following Blake and Mumtaz (2017), the priors for the initial states of the time- varying coefficients, simultaneous relations, and log standard errors , p β 0 , p a 0 and p ( l n σ 0 ) are assumed to be normally distributed. These assumptions together with the autoregressive nature of time-varying parameters imply Gaussian priors on the entire sequences of the β ’s, a ’s, and l n σ ’s (conditional on Q , W , and S ). The priors for the distributions of the hyperparameter Q is assumed to be distributed as inverse Wishart, because the parameter W is inverse gamma and the blocks of S are inverse gamma for S 1 and inverse Wishart for S 2 . More formally, these prior distributions have the following form:

The joint distribution of β T , A T , T , and V is given by

where the rectangular parenthesis is interpreted as the probability distribution and the symbol expresses proportionality.

Simulation method. A detailed explanation of the Gibbs sampling methods used to estimate the model is provided in section A.1.3 of the appendix. A summary is provided here. Following Del Negro and Primiceri (2013) and Blake and Mumtaz (2017) the Gibbs sampling algorithm is used to generate a sample from the joint posterior of ( β T , A T , T , and V ). The algorithm is carried out in four steps, drawing (1) time-varying coefficients ( β ^ T ), (2) simultaneous relations ( A ^ T ), (3) volatilities ( T ), and (4) hyperparameters ( V ), conditional on the observed data, y t , and the rest of the parameters.

Conditional on A T and T , the state-space form given by equations (3) and (4) is linear and Gaussian. Therefore, the conditional posterior of β T is a product of Gaussian densities and can be drawn using the Carter and Kohn (1994) algorithm. By the same logic, the posterior of A T conditional on β T and T is also a product of normal distributions and A T can thus be drawn in the same way. Drawing T instead is more complicated; this can be done using the independence Metropolis-Hastings algorithm, as presented by Blake and Mumtaz (2017). Simulating the conditional posterior of V is standard because it is the product of independent inverse Wishart distributions.

Identification. As long as an exact identification scheme —like the triangular matrix de- scribed above— for the additive shock is available, a structural vector autoregression (VAR) can be easily estimated in two steps. Consider the following structural VAR:

[12]

where Ξ T , t = 1 , . . . , T , are n × n matrices2 and for any t , Ξ _ t contains at least n ( n 1 ) 2 restrictions that guarantee identification. The first step consists of estimating the reduced form VAR, following the methodology illustrated in the previous sections. This first step delivers the posterior of the β ’s and the Ω ’s at every point in time. The second step is to obtain the numerical evaluation of the posterior of the Ξ ′s; it suffices to solve the system of equations given by

[13]

for every draw of Ω t . If the identification is based on a triangular scheme, the solution to (12) is given simply by Ξ t = A t - 1 Σ t , the same as in equation (3).

Sign restrictions. In order to assess the time change in the degree of procyclicality of fiscal policy to terms-of-trade shocks, we identify the shock by assuming that a positive shock has the following contemporaneous macrofiscal effects:

The second, third, and fourth rows of this matrix correspond to the contemporaneous response of the real exchange rate ( r e r ), the primary balance ( p b ), and real GDP ( r g d p t ), respectively, to a terms-of-trade shock. Restricting these contemporaneous responses the following way a 1 2 , t < 0 (Real Exchange Rate [RER] appreciation); a 1 3 , t < 0 , a 2 3 , t < 0 ; and a 1 4 , t > 0 , a 2 4 , t > 0 , a 2 3 , t > 0 implies that a contemporaneous shock ϵ t o t t leads to (1) a contemporaneous RER appreciation, (2) a fall in p b t (e.g., an increase in primary expenditures that is not proportional to the increase in revenues) and (3) a contemporaneous increase in r g d p t (e.g., as higher oil income increases domestic demand, both public and private).

To answer the question of whether there is an increase in fiscal procyclicality over time, one has to compare the dynamic behavior of the contemporaneous fiscal response to oil price impulses. Accordingly, we compare the contemporaneous response of the primary balance, a 1 3 , t , over time. If a 1 3 , t < a 1 3 , t s (where t > s ) during the period considered, fiscal procyclicality deteriorates. Conversely, if a 1 3 , t > a 1 3 , t s , fiscal procyclicality improves.

The same criterion is applied to assess the direct multiplier effect of terms-of-trade shocks on the economy as well as their indirect multiplier effect (through fiscal policy). If a 1 4 , t > a 1 4 , t s and a 3 4 , t > a 3 4 , t s , then terms-of-trade shocks have a higher multiplier effect on the economy, whereas if a 1 4 , t < a 1 4 , t s and a 3 4 , t < a 3 4 , t s the opposite occurs: the multiplier effect of terms-of-trade shocks on the economy is lower. The procedure to drawing matrix A 0 , t is detailed in Appendix B.

4 - Data and stylized facts

This section provides a general overview of macroeconomic performance and the fiscal framework to elucidate the evolution of these countries over the past decades and an overview of the data used. This paper evaluates the impact of terms-of-trade shocks on fiscal performance and economic growth in the countries of the Andean region. In addition to a variable that captures the terms-of-trade dynamics, the VAR model for each country includes the following variables: Economic Growth, Primary Balance (Fiscal Measure), and Real Exchange Rate (Monetary Measure). This framework enables the capture of the main transmission channels, which is necessary to explain the impacts generated by terms-of-trade shocks. The data’s periodicity is annual and the length of the periodicity depends on the availability of data for each country. Table 1 outlines the variables and sources by country, while Figures 1, 2, 3, and 4 illustrate the evolution of the series over their respective periods.

Each country in the Andean region has experienced significant economic crises that have shaped their economic and fiscal policies. Bolivia experienced a debt crisis and hyperinflation from 1977 to 1986, followed by a financial crisis from 1998 to 2002. Despite these challenges, Bolivia maintained consistent GDP growth from the late 1980s until 2019, with only brief periods of negative growth, notably in the mid-1980s and during the COVID-19 pandemic in 2020 (Kehoe et al., 2022). Colombia faced high inflation and fiscal deficits between 1971 and 1990, culminating in a severe economic recession in 1999. The COVID-19 pandemic also caused a significant GDP contraction in 2020. Throughout these periods, Colombia’s fiscal and monetary policies evolved, with significant reforms introduced following the 1991 constitution (Perez-Reyna & Osorio-Rodriguez, 2021). Ecuador’s economic history is marked by the discovery of oil reserves in the late 1960s and dollarization in 2000. The country experienced a severe economic crisis in 1999 due to political instability and central banking reforms, with GDP growth rebounding post-dollarization and another significant decline during the COVID-19 pandemic (Cueva & Díaz, 2021). Peru faced accelerating inflation and hyperinflation during the 1970s and 1980s, followed by a stabilization program in the early 1990s that led to more sustainable economic growth. Despite this, Peru experienced periods of negative growth, particularly at the end of the commodities supercycle and during the COVID-19 pandemic (Martinelli & Vega, 2021).

The fiscal performance of these countries has been influenced by their responses to eco- nomic crises and their implementation of fiscal rules. Each country has adopted various measures to improve fiscal stability and manage public finances more effectively. Bolivia has not implemented a formal fiscal rule for executing the public budget, which has led to fluctuations in the primary balance, particularly during economic downturns such as the COVID-19 pandemic (Kehoe et al., 2022). Colombia introduced significant fiscal reforms with the 1991 constitution, including the independence of the central bank and new fiscal rules in 2011. These rules target structural balance and allow for countercyclical spending, contributing to fiscal stability despite economic shocks (Perez-Reyna & Osorio-Rodriguez, 2021; Barreix & Corrales, 2019). Ecuador has implemented various fiscal rules, including spending, balance, and debt rules, to improve fiscal performance. The 2018 fiscal responsibility framework limits spending growth and restricts the deficit, aiming to maintain the debt burden below 40 percent of GDP in the medium to long term (Arenas de Mesa & Mosqueira, 2021; Barreix & Corrales, 2019). Peru’s fiscal institutional framework has undergone significant changes since the early 1990s. The Law of Fiscal Prudence and Transparency, enacted in 1999, and subsequent fiscal rules have contributed to improved fiscal performance. The 2013 Law for the Strengthening of Fiscal Responsibility and Transparency established new fiscal rules and created an independent fiscal council and a Fiscal Stabilization Fund (Martinelli & Vega, 2021; Arenas de Mesa & Mosqueira, 2021; Barreix & Corrales, 2019). The Andean Region countries have faced significant economic challenges, prompting re- forms in fiscal policies and institutional frameworks to enhance fiscal stability and economic growth. While each country has unique experiences, common themes include responses to economic crises, implementation of fiscal rules, and efforts to improve fiscal responsibility and transparency. These efforts to address fiscal imbalances and enhance economic resilience illustrate the importance of robust fiscal institutions and policies in mitigating the impacts of external shocks and promoting long-term growth.

5 - Results

5.1 - Bolivia

Figure 5 depicts the stochastic volatility of structural shocks for the four variables considered in the TV-SVAR, including the confidence interval computed for the shock’s 16th and 84th percentiles of the standard deviation. In the case of Bolivia, the shocks studied do not show high variability in the period considered, a behavior that contrasts with the results obtained for the other countries in the region. This result may reflect the lower development of public economic institutions in Bolivia in comparison with such institutions in the other countries in the Andean region and a lower degree of integration with the global economy. It should be noted that the limited historical availability of information only allows us to estimate the behavior of these shocks from 2005 onward.

Figure 6 shows the impulse response functions of the variables considered in relation to terms-of-trade shocks over time (identified by sign restrictions). The years considered in the study are shown along the x-axis, the magnitude of the shock. along the y-axis, and the behavior of the impulse response function each year (for the periods 1 to 15) along the z-axis. In line with Bolivia’s commodity-exporting position, positive terms-of-trade shocks are associated with an appreciation of the country’s exchange rate in the initial period, followed by a depreciation, the effect of which dissolves over time. However, this effect is not pronounced, due to the country’s fixed exchange rate system. Regarding the fiscal effect of the terms-of-trade, the results show a procyclical behavior. Thus, positive shocks are associated with a more significant increase in public spending than in income during the period considered. This effect tends to be greater around 2013. Along these lines, output dynamics reflect the positive effect of terms-of-trade shocks on Bolivian economic growth. This effect may be associated with higher public spending and its economic multiplier effect.

5.2 - Colombia

In the case of Colombia, the results reveal different volatility levels among the variables’ shocks over time. Concerning the terms-of-trade, the results show a sustained increase in the volatility of the shocks during the period 2008—2014. This behavior reflect a greater dependence on oil in the country’s export basket and therefore reflect greater sensitivity of the terms-of-trade to the international price of oil and the so-called “commodity super cycle”. The results show a peak of uncertainty in 2014 associated with the fall in the international price of oil.

The volatility of shocks related to the RER showed a downward trend during the period considered, although with some volatility peaks before the year 2000. This behavior can be attributed to the country’s institutional development in economic terms, which contributed to a gradual reduction in inflation and better monetary policy management. Thus, although the country’s exchange rate continued to act as an automatic stabilizer of external shocks, the improved institutional development in monetary terms made it possible to reduce the relative size of these shocks, making for a “stable” fluctuation of the exchange rate.

On the other hand, in terms of the primary balance shocks present relatively constant volatility during the period of analysis. However, there are peaks of uncertainty related to periods of global economic recession (2000, 2008, and 2020).

Finally, in terms of economic growth, the shocks show a slight negative trend, which is in line with the relative macroeconomic stability of the country and the proper functioning of the economic institutions implemented over the last few years.

The impulse response functions reveal important changes in the magnitude of the shocks over time for the different variables. In terms of the behavior of the RER, terms-of-trade shocks had an initial appreciation effect on the rate (-0.6 p.p. to -0.8 p.p.), followed by a slight depreciation effect in subsequent periods. This behavior is present during all the years considered. The impact on initial appreciation became much stronger during the 2008—2015 period, which coincides with one of the periods of the country’s most significant oil and coal production and high international prices of these commodities. As a result of the end of the commodity super cycle, the impact of terms-of-trade shocks on the RER returned to levels similar to those evidenced before the mining-energy boom. This high exchange rate sensitivity to external shocks reflects the country’s inflation target regime, which allows the exchange rate to act as an automatic stabilizer in the face of external shocks.

Concerning the primary balance, terms-of-trade shocks show a procyclical behavior throughout the years. In this sense, improvements in the terms-of-trade generate a deterioration in the country’s fiscal position, which may be associated with a much more pronounced in- crease in spending than in income generated by better terms-of-trade. However, since 2010 there was a slight reduction in fiscal procyclicality, which coincided with a period of greater exploitation of natural resources in the country. This improvement could be related to the establishment of a fiscal rule and the development of fiscal institutions in the country in order to make good use of resources derived from extractive industries. Despite this progress, there was a tendency toward greater procyclicality in the last few years of the period under study.

Finally, terms-of-trade shocks show a positive effect on economic growth. The most significant impact of these shocks (0.15 p.p) was felt from 2010 to 2015, coinciding with the commodity cycle and the country’s mining-energy boom.

5.3 - Ecuador

In the case of Ecuador, the behavior related to the volatility of the different shocks remained relatively constant over time (Figure 9). In terms of impulse response functions, except for the RER behavior, the different variables show a changing reaction over time. The dollarization of the economy explains the low effect of terms-of-trade shocks on the RER. However, due to the crisis generated by the pandemic and the local and foreign price differentials, the RER showed a differential impact during 2020. Regarding fiscal variables, positive terms-of-trade shocks generate a higher deficit, in line with a procyclical behavior of fiscal policy. The procyclicality of spending presented a greater magnitude between 2010 and 2013, coinciding with the commodity super cycle. In terms of economic growth, due to the country’s commodity-exporting position favorable terms-of-trade shocks are positively related to higher economic growth, especially in the 2000—2003 and 2010—2013 periods.

5.4 - Peru

In Peru, the behavior of the volatility of shocks shows high variability, especially in the case of terms-of-trade and RER shocks (Figure 11). The terms-of-trade volatility shows a peak of uncertainty in the period corresponding to the 2008 global financial crisis and the sharp fall in international copper prices that occurred. From this point on, the magnitude of the shocks shows a considerable decrease with some minor peaks in 2014, coinciding with the end of the commodity super cycle. When examining the behavior of the RER, the shocks present high volatility with a significant peak of uncertainty around the year 2003, which coincides with a period of appreciation of the local currency. Finally, the volatility of fiscal and economic growth shocks shows less variation, although with a marked negative trend, mainly in the case of GDP performance. This result may be associated with more economic stability in Peru due to the strengthening of its fiscal institutions in recent years.

When examining the behavior of the terms-of-trade shocks in the variables considered, we observe in all cases a response that varies significantly according to the years considered (Figure 11). In the case of the response in the RER, the exchange rate appreciation effect that occurs after a positive terms-of-trade shock is of a greater magnitude in the period close to the year 2000 (-2.0 p.p.). A trend of greater sensitivity of the RER is also observed as of 2015, although at much lower levels (-1.5 p.p.) than those recorded in 2000. This result may be related to changes in the Peruvian monetary authorities’ exchange rate intervention policy to maintain price stability per the established policy objectives.

Regarding the primary balance, terms-of-trade shocks show a differentiated effect depending on the years considered. From 1990 to 1997, trade shocks were associated with a negative response of the primary balance (higher deficit). However, from 2000 on (except for a few years, notably 2005 and 2010) terms-of-trade shocks resulted in an improvement of the primary balance. This may be because of improved fiscal institutions that allowed the country to implement a countercyclical fiscal policy. In terms of GDP performance, the response of economic growth to terms-of-trade shocks was similar to that of the primary balance. From 2000 on, positive terms-of-trade shocks were associated with positive economic activity.

5.5 - Responses to a Terms-of-Trade Shock for Selected Periods

Figures 13 and 14 show the responses of the primary balance and of economic growth, respectively, to terms-of-trade shocks at different points in time. The periods of interest in which the impulse response functions (IRFs) are calculated respond both to periods of global shocks (international financial crisis, commodity super cycle) and periods in which significant changes occurred in the countries’ fiscal institutions (fiscal rules going into effect or new institutional arrangements).

Figure 13 reveals that, with the exception of Peru, the countries of the Andean region show an increase in their deficit as a consequence of a positive terms-of-trade shock. In other words, the fiscal balance reflects a procyclical behavior in public finances. Bolivia is the country that shows the greatest sensitivity to the shocks considered, with 2014 being the year with the most pronounced response in its primary balance (-0.66 p.p.) and 2008 the year with the lowest response (-0.6). For this country, no significant heterogeneity is observed between the different time periods considered. In the case of Colombia, the country’s primary balance shows a much smaller reaction than that of the other countries considered, with the year 2000 seeing the greatest impact (-0.06 p.p.), which makes sense given the 1999 Colombian economic crisis. The 2014 shock is associated with a lower impact (-0.05). In Ecuador, the response to shocks varies over the period of study. Thus, the largest (negative) impact on the primary balance was felt in 2012, when there was a significant increase in the international price of oil. As mentioned above, this behavior responds to a procyclical policy by the economic authorities. In contrast, in 2018 the impact on the deficit was much lower (- 0.27), a result that may be correlated with the development of better fiscal institutions in Ecuador during the last few years of the period under study. Finally, Peru is the country in the region that shows the most variable responses to terms-of-trade shocks. The largest shock for Peru occurred in 2011, with a deficit shock of -3.0 p.p. that also showed high persistence. This strong shock may capture the decline in copper prices as a consequence of the international financial crisis and the other effects of the global economic recession on the local economy. On the other hand, Peru saw an improvement in its primary balance in the face of terms-of-trade shocks in 2000, 2015, and 2018. This result may be associated with the strengthening of Peruvian economic institutions in recent years. In this sense, our results demonstrate significant differences between the effects that terms-of-trade shocks generate in the countries of the region and the heterogeneity of each country’s response during the period of study.

In terms of the impact on growth of terms-of-trade shocks, Figure 14 presents behaviors in line with the fiscal policies carried out by the countries. Positive terms-of-trade shocks generate higher economic growth in all countries, with the exception of some years in the case of Peru (2011, 2012, 2014). This behavior correlates with the higher public spending and infrastructure investment programs undertaken by the countries in the region made possible by mining and energy tax revenues and their multiplier effect on the economy. Ecuador and Peru show the greatest impact on economic growth derived from positive terms-of-trade shocks, while Colombia shows the least sensitivity.

6 - Concluding Remarks

This paper examines the impact of terms-of-trade shocks on fiscal performance and eco- nomic growth in the Andean region, employing a Time-Varying Structural Vector Autoregression (TV-SVAR) model, following the methodology proposed by Primiceri (2005), to capture the dynamic responses of key macroeconomic variables over time. The results re- veal significant heterogeneity across Bolivia, Colombia, Ecuador, and Peru, both within and between countries, in terms of the volatility and transmission of external shocks, reflecting differences in institutional quality and fiscal policy frameworks.

The study shows that, within countries, terms-of-trade shocks exhibit significant time- varying behavior, with more pronounced effects during the commodity super cycle period. Positive terms-of-trade shocks, such as increases in commodity prices, are generally associated with higher public spending and economic growth, indicating procyclical fiscal behavior. However, countercyclical responses are observed in certain years, particularly in Peru, where more robust fiscal frameworks have been developed. Bolivia and Ecuador exhibit the most pronounced procyclical fiscal responses, with government spending sharply increasing during periods of favorable external conditions. This behavior has led to substantial fiscal imbalances during downturns, underscoring the need for stronger fiscal institutions in these countries.

In contrast, Colombia and Peru have demonstrated greater resilience to external shocks due to the implementation of fiscal rules and stabilization mechanisms that have enabled them to moderate the impact of terms-of-trade volatility on public finances, resulting in more stable macroeconomic outcomes. The analysis emphasizes the importance of fiscal institutions, such as fiscal rules and councils, in shaping countries’ ability to manage revenue from extractive industries and implement countercyclical policies. Countries with more developed fiscal frameworks, like Colombia and Peru, are better able to smooth public spending and ensure fiscal stability, while those with weaker institutions, like Bolivia and Ecuador, remain vulnerable to the boom-bust cycles associated with commodity price fluctuations.

These findings carry significant policy implications for resource-dependent economies. Policymakers should consider the magnitude of shocks and the nonrenewable nature of resource revenues when designing fiscal policies. Public spending should align with intertemporal smoothing strategies to avoid excessive spending during boom periods, which could undermine long-term fiscal stability. Furthermore, institutional development, particularly the establishment of sound fiscal frameworks, should be a priority for countries like Bolivia and Ecuador to enhance their resilience to external shocks.

In the context of the global energy transition, the development of proper fiscal institutions becomes even more critical. The Andean countries must prepare for potential shifts in global demand for commodities and avoid significant macroeconomic instability. Economic diversification should be a key goal for the region to mitigate the risks associated with dependency on commodity exports.

Future research could explore how further institutional reforms and improvements can strengthen the resilience of these economies to external volatility. The Andean region pro- vides valuable insights into the complex interplay between external shocks, fiscal policy, and institutional capacity, offering important lessons for other commodity-exporting countries facing similar challenges.

Figures and Tables

Table 1
Data by country and source

Figure 1
Bolivia Data Series

Figure 2
Colombia Data Series

Figure 3
Ecuador Data Series

Figure 4
Peru Data Series

Figure 5
Posterior Estimates for Stochastic Volatility of Structural Shocks, Bolivia

Figure 6
Impulse Response Functions, Bolivia

Figure 7
Posterior Estimates for Stochastic Volatility of Structural Shocks, Colombia

Figure 8
Impulse Response Functions, Colombia

Figure 9
Posterior Estimates for Stochastic Volatility of Structural Shocks, Ecuador

Figure 10
Impulse Response Functions, Ecuador

Figure 11
Posterior Estimates for Stochastic Volatility of Structural Shocks, Ecuador

Figure 12
Impulse Response Functions, Ecuador

Figure 13
Response of the Primary Balance to a Terms-of-Trade Shock

Figure 14
Response of the GDP to a Terms-of-Trade Shock

Contribución de los/as autores/as




1. Administración del proyecto, 2. Adquisición de fondos, 3. Análisis formal, 4. Conceptualización, 5. Curaduría de datos, 6. Escritura - borrador original, 7. Escritura - revisión y edición, 8. Investigación, 9. Metodología, 10. Recursos, 11. Software, 12. Supervisión, 13. Validación, 14. Visualización.

References

Aguiar, M. y Amador, M. (2011). Growth in the shadow of expropriation. The Quarterly Journal of Economics, 126(2), 651-697.

Alberola, E. y Sousa, R. (2017). Assessing fiscal policy through the lens of the financial and the commodity price cycles (Working Paper 638). Bank for International Settlements.

Alesina, A., Campante, F. y Tabellini, G. (2008). Why is fiscal policy often procyclical? Journal of the European Economic Association, 6(5), 1006-1036. https://doi.org/10.1162/JEEA.2008.6.5.1006

Andrian, L. G., Hirs, J. y Valencia, O. (2023). Instituciones fiscales en los países de la Región Andina y retos derivados del proceso de descarbonización (Nota técnica 2820). Banco Interamericano de Desarrollo. https://doi.org/10.18235/0005253

Arenas de Mesa, A. y Mosqueira, E. (2021). La transformación y el fortalecimiento institucional de los Ministerios de Hacienda en América Latina: del control al uso estratégico de los recursos públicos para el desarrollo (Documentos de Proyectos LC/TS.2021/23). Comisión Económica para América Latina y el Caribe (CEPAL)/Banco Interamericano de Desarrollo (BID).

Barreix, A. D. y Corrales, L. F. (Eds.) (2019). Reglas fiscales resilientes en América Latina (Vol. 767). Inter-American Development Bank.

Barro, R. (1979). On the determination of the public debt. Journal of Political Economy, 87(5), 940-971.

Bauwens, L., Lubrano, M. y Richard, J. (1999). Bayesian inference in dynamic econometric models. Oxford University Press.

Benati, L. y Mumtaz, H. (2007). US evolving macroeconomic dynamics: A structural investigation (Working Paper Series No. 746). European Central Bank.

Bjørnland, H. C. y Thorsrud, L. A. (2019). Commodity prices and fiscal policy design: Procyclical despite a rule. Journal of Applied Econometrics, 34(2), 161-180. https://doi.org/10.1002/jae.2669

Blake, A. y Mumtaz, H. (2017). Applied Bayesian econometrics for central bankers. Centre for Central Banking Studies, Bank of England.

Caballero, R. J. y Krishnamurthy, A. (2004). Fiscal Policy and Financial Depth (Working Paper 10532). National Bureau of Economic Research.

Camacho, M. y Perez-Quiros, G. (2014). Commodity prices and the business cycle in Latin America: Living and dying by commodities? Emerging Markets Finance and Trade, 50(2), 110—137.

Carter, C. y Kohn, R. (1994). On Gibbs sampling for state space models. Biometrika, 81(3), 541-553. https://doi.org/10.2307/2337125

Casella, G. y George, E. (1992). Explaining the Gibbs Sampler. The American Statistician, 46(3), 167-174. https://doi.org/10.1080/00031305.1992.10475878

Céspedes, L. F., Parrado, E. y Velasco, A. (2014). Fiscal rules and the management of natural resource revenues: The case of Chile. Annual Review of Resource Economics, 6(1), 105-132. https://doi.org/10.1146/annurev-resource-100913-012856

Céspedes, L. F. y Velasco, A. (2012). Macroeconomic performance during commodity price booms and busts. IMF Economic Review, 60(4), 570-599.

Céspedes, L. F. y Velasco, A. (2014). Was this time different? Fiscal policy in commodity republics. Journal of Development Economics, 106(C), 92-106.

Cueva, S. y Díaz, J. P. (2021). The history of Ecuador. En T. J. Kehoe y J. P. Nicolini (Eds.), A monetary and fiscal history of Latin America, 1960–2017 (pp. 277—319). University of Minnesota Press.

Del Negro, M. y Primiceri, G. E. (2013). Time-varying structural vector autoregressions and monetary policy: A corrigendum (Staff Report 619). Federal Reserve Board of New York.

Erbil, N. (2011). Is fiscal policy procyclical in developing oil-producing countries? (Working Paper 171). International Monetary Fund. https://www.imf.org/en/Publications/WP/Issues/2016/12/31/Is-Fiscal-Policy-Procyclical-in-Developing-Oil-Producing-Countries-25063

Fernández, A., González, A. y Rodriguez, D. (2018). Sharing a ride on the commodities roller coaster: Common factors in business cycles of emerging economies. Journal of International Economics, 111, 99-121. https://doi.org/10.1016/j.jinteco.2017.11.008

Fernández, A., Schmitt-Grohé, S. y Uribe, M. (2020). Does the commodity super cycle matter? (Working Paper 27589). National Bureau of Economic Research. https://doi.org/10.3386/w27589

Frankel, J. A. (2010). The natural resource curse: A survey (Working Paper 15836). National Bureau of Economic Research. https://doi.org/10.3386/w15836

Frankel, J., Vegh, C. y Vuletin, G. (2013). On graduation from fiscal procyclicality. Journal of Development Economics, 100, 32-47.

Gavin, M., Hausmann, R., Perotti, R., & Talvi, E. (1996). Managing fiscal policy in Latin America and the Caribbean: Volatility, procyclicality and limited creditworthiness. Inter-American Development Bank. http://dx.doi.org/10.18235/0011562

Gavin, M. y Perotti, R. (1997). Fiscal policy in Latin America. En B. S. Bernanke y J. J. Rotemberg (Eds.), NBER Macroeconomics Annual 1997 (vol.12, pp. 11—70). MIT Press.

Harberger, A. C. (1950). Currency depreciation, income, and the balance of trade. Journal of Political Economy, 58(1), 47-60. https://doi.org/10.1086/256897

Ilzetzki, E. (2011). Rent-seeking distortions and fiscal procyclicality. Journal of Development Economics, 96(1), 30-46. https://doi.org/10.1016/j.jdeveco.2010.07.006

Ilzetzki, E. y Vegh, C. (2008). Procyclical fiscal policy in developing countries: Truth or fiction? (Working Paper 14191). National Bureau of Economic Research. https://doi.org/10.3386/w14191

Izquierdo, A., Romero, R. y Talvi, E. (2008). Booms and busts in Latin America: The role of external factors (Working Paper 631). Inter-American Development Bank. http://dx.doi.org/10.18235/0010885

Jacquier, E., Polson, N. y Rossi, P. (2004). Bayesian analysis of stochastic volatility models. Journal of Business and Economic Statistics, 12(4), 371-418. https://doi.org/10.1080/07350015.1994.10524553

Jemio, L. C. (2006). Volatilidad externa y el sistema financiero en Bolivia. Informe de consultoría elaborado para la Corporación Andina de Fomento (CAF).

Kalmanovitz, S. (2017). Breve historia económica de Colombia. Biblioteca Nacional de Colombia. Ministerio de Cultura.

Kaminsky, G. L., Reinhart, C. M. y Végh, C. A. (2004). When it rains, it pours: Procyclical capital flows and macroeconomic policies (NBER Working Paper No. 10780). National Bureau of Economic Research.

Kehoe, T. J. y Nicolini, J. P. (Eds.). (2022). A monetary and fiscal history of Latin America, 1960—2017. University of Minnesota Press.

Kehoe, T. J., Machicado, C. G. y Peres-Cajías, J. (2022). The history of Bolivia. En T. J. Kehoe y J. P. Nicolini (Eds.), A monetary and fiscal history of Latin America, 1960—2017 (pp. 83—129). University of Minnesota Press.

Kim, C. y Nelson, C. (1999). State-space models with regime switching. MIT Press.

Kose, M. (2002). Explaining business cycles in small open economies: “How much do world prices matter?” Journal of International Economics, 56(2), 299-327.

Lane, P. y Tornell, A. (1996). Power, growth and the voracity effect. Journal of Economic Growth, 1(2), 213-241. https://doi.org/10.1007/BF00138863

Laursen, S. y Metzler, L. A. (1950). Flexible exchange rates and the theory of employment. The Review of Economics and Statistics, 281-299.

Levy, A., Ricci, L. A. y Werner, A. M. (2020). The sources of fiscal fluctuations (Working Paper 2020/220). International Monetary Fund.

Mankiw, N. G. y Romer, D. (1991). New Keynesian Economics (2 vols.). MIT Press.

Martinelli, C. y Vega, M. (2021). The history of Peru. En T. J. Kehoe y J. P. Nicolini (Eds.), A monetary and fiscal history of Latin America, 1960–2017 (pp. 401—448). University of Minnesota Press.

Medina, L. (2016). The effects of commodity price shocks on fiscal aggregates in Latin America. IMF Economic Review, 64(3), 502-525. https://doi.org/10.1057/imfer.2016.14

Melo-Becerra, L. A., Parrado-Galvis, L. M., Ramos-Forero, J. E. y Zarate-Solano, H. M. (2020). Efectos de los auges y la crisis del petróleo en la economía colombiana: un enfoque autorregresivo vectorial variable en el tiempo. Revista de Economía del Rosario, 23(1), 31-63. https://doi.org/10.12804/revistas.urosario.edu.co/economia/a.8631

Mendoza, E. G. (1995). The terms-of-trade, the real exchange rate, and economic fluctuations. International Economic Review, 36(1), 101-137. https://doi.org/10.2307/2527429

Nakajima, J., Kasuya, M. y Watanabe, T. (2011). Bayesian analysis of time-varying parameter vector autoregressive model for the Japanese economy and monetary policy. Journal of the Japanese and International Economies, 25(3), 225-245. https://doi.org/10.1016/j.jjie.2011.07.004

Ostry, J. D. y Reinhart, C. M. (1992). Private saving and terms-of-trade shocks: Evidence from developing countries. IMF Staff Papers, 39(3), 495-517.

Perez-Reyna, D. y Osorio-Rodriguez, D. (2021). The history of Colombia. En T. J. Kehoe y J. P. Nicolini (Eds.), A monetary and fiscal history of Latin America, 1960–2017 (pp. 243—274). University of Minnesota Press.

Petrova, I., Papaioannou, M. G. y Bellas, D. (2010). Determinants of emerging market sovereign bond spreads: Fundamentals vs financial stress (Working Paper No. 2010/281). International Monetary Fund.

Primiceri, G. E. (2005). Time varying structural vector autoregressions and monetary policy. The Review of Economic Studies, 72(3), 821-852. https://doi.org/10.1111/j.1467-937X.2005.00353.x

Ramirez, J., Waggoner, D. y Zha, T. (2010). Structural vector autoregressions: Theory of identification and algorithms for inference. Review of Economic Studies, 77(2), 665-696.

Riascos, A. y Vegh, C. A. (2003). Procyclical government spending in developing countries: The role of capital market imperfections [Mimeo]. UCLA and Banco de la República, Colombia.

Stein, E., Talvi, E. y Gristani, A. (1999). Institutional arrangements and fiscal performance: The Latin American experience. En J.M. Poterba y J. von Hagen (Eds.), Fiscal institutions and fiscal performance (pp. 103-134). University of Chicago Press.

Tornell, A. y Lane, P. R. (1999). The voracity effect. American Economic Review, 89(1), 22-46. https://doi.org/10.1257/aer.89.1.22

Tornell, A. y Velasco, A. (1992). The tragedy of the commons and economic growth: Why does capital flow from poor to rich countries? Journal of Political Economy, 100(6), 1208-1231. https://doi.org/10.1086/261858

Villafuerte, M. y Lopez-Murphy, P. (2009). Fiscal policy in oil producing countries during the recent oil price cycle (Working Paper WP/10/28). International Monetary Fund.

Zeev, N. B., Pappa, E., & Vicondoa, A. (2017). Emerging economies business cycles: The role of commodity terms-of-trade news. Journal of International Economics, 108, 368—376.

Zellner, A. (1971). An introduction to Bayesian inference in econometrics. Wiley.

A. Sampling algorithms for estimation of model parameters

A.1 Drawing coefficient states

A.1.1 A standard state-space representation

Equations (3) and (4) have, respectively, the state-space form of equations (14), the “observation” equation, and (15), the “transition” equation, below:

[14]

[15]

where

In the observation equation the unknown parameters consist of the elements of H not fixed or given as data and the nonzero elements of the covariance matrix R. In the transition equation, the parameters to be estimated are the nonzero and free elements of F, Q, and the state variable, β t .

A.1.2 Bayesian econometrics: The general procedure

A Bayesian approach to estimating this model is based on three basic steps.

  1. Step 1. The researcher forms a prior belief of the distribution of the parameters to be estimated P β F H Q R ~ d . , where d . is a generic joint density function of the parameters.

  2. Step 2. The researcher collects data on the observed variables ( y ) and constructs the likelihood function of the model parameters contained in the data F ( y t | β , F , H , Q , R ) .

  3. Step 3. The researcher updates the prior belief on the model parameters (step 1) based on the information contained in the data (step 2). Put another away, the researcher combines the prior distribution P β F H Q R and the likelihood function F ( y t | β , F , H , Q , R ) to obtain the joint posterior distribution H ( β , F , H , Q , R | y t ) .

Defined by Bayes’ theorem, H . is a product of the likelihood F . and the joint prior P . . More formally,

here indicates proportionality.

To proceed further in terms of inference, the researcher has to “isolate” the component of the posterior relevant to the parameter of interest. For example, to conduct inference about β, the researcher has to derive the marginal posterior distribution for β from the joint posterior distribution of the parameters. Similarly, inference on Q is based on the marginal posterior distribution for Q. However, derivation of the marginal posterior distribution (from a joint posterior distribution) requires analytical integration, a procedure that may prove difficult in complex models such as the one used here. It was the development of simulation methods such as Gibbs sampling that greatly simplified this integration.

A.1.3 Bayesian econometrics: The general procedure

Gibbs sampling is a numerical method that use draws from conditional distributions to approximate joint and marginal distributions. From Blake and Mumtaz (2017), a general description of Gibbs sampling is the following:

Suppose we have a joint distribution of k variables

This may, for example, be a joint posterior distribution.

We are interested in obtaining the marginal distributions

Assume that the form of the conditional distributions f ( x i | x j ) , i j is known. A Gibbs sampling algorithm with the following steps can be used to approximate the marginal distributions:

(1) Set starting values for x 1 . . . x k

Where the superscript 0 denotes the starting values.

(2) Sample x 1 1 from the distribution of x 1 conditional on current values of x 2 . . . x k

(3) Sample x 2 1 from the distribution of x 2 conditional on current values of x 1 , x 3 , . . . x k

(4) Sample x k 1 from the distribution of x k conditional on current values of x 1 , x 2 , . . . x k - 1

to complete 1 iteration of the Gibbs sampling algorithm.

As the number of Gibbs iterations increases to infinity, the samples or draws from the conditional distributions converge to the joint and marginal distributions of x i at an exponential rate (for a proof of convergence see Casella and George (1992)). More concretely, by repeating the Gibbs sampling algorithm M times (i.e., a large enough number to achieve convergence) and saving the last H draws of x i , we obtain H values for x 1 . . . x k . A histogram for x 1 . . . x k is an approximation for the marginal density of x 1 . . . x k . One crucial thing to note is that the implementation of the Gibbs sampling algorithm requires the researcher to know or assume the form of the conditional distributions f ( x i | x j ) .

A.1.4 Gibbs sampling in state-space models

Going back to the state-space model of equations (14) and (15) above, a Gibbs sampling algorithm for this problem can be constructed by assuming that the state variable, β t is known and observed. This observation implies the following general Gibbs algorithm:

Step 1. Conditional on β t , sample H and R from their posterior distributions.

Step 2. Conditional on β t , sample F and Q from their posterior distributions.

Step 3. Conditional on the parameters of the state-space (F, H, Q, R), sample β t from its conditional posterior distribution.

Step 4. Repeat steps 1 to 3 until convergence is achieved.

As shown by Carter and Kohn (1994), the conditional posterior distribution H ( β T | F , H , Q , R , y T ) , where β T = [ β 1 , β 2 , . . . , β T ] is the time series vector of β (the same applies to y T ), can be factored into the following conditional distributions.

[16]

Note that the right-hand side splits into the product of (1) the marginal distribution of the state-space variable at time T and (2) the distribution of the vector β T 1 conditioned on β T (i.e., its conditional posterior). As shown in Kim & Nelson (1999), considering the fact that β T follows a first-order autoregressive or Markov process, equation (16) can be rewritten as

where, given that ϵ t and u_t are normally distributed:

Then, to draw β ’s from this distribution we need to calculate its mean, β t | t + 1 , and variance, P t | t + 1 , using the Kalman filter:

Starting from an initial value, that is, a prior of state β 0 | 0 and variance of the state P 0 | 0 , a standard Kalman filter consists of the following equations, which are evaluated recursively through time:

Where K = P t | t 1 H ' f t | t 1 - 1 is the “Kalman gain” (i.e., the weight attached to the prediction error). Running these equations from t = 1 , 2 , . . . T delivers β T | T and P T | T at the end of the recursion, which are known as the “updating” equations as they update the initial estimates β t | t - 1 and P t | t 1 using information contained in the prediction error, η t | t 1 .

Finally, the draw of β T and the output of the filter are now used for the first step of the backward recursion (which provides β T 1 |T and P T 1 | T used to make a draw of β T 1 . This process can be thought as updating β t | t (the Kalman filter estimate of the state variable) for information contained in β t + 1 . This backward recursion continues until time zero. As shown in Blake and Mumtaz (2017, p. 74), for a given time t, the updating formulas of the backward recursion are

The above formulas constitute the Carter and Kohn algorithm.

A.1.5 Drawing βt’s

Equations (14) and (15) can be rewritten as the following state-space forms:

[17]

[18]

The observation equation (17) is linear and has Gaussian innovations with known variance. Following the procedure described in Section A.1.4, the conditional posterior distribution H ( β T | y T , A T , T , V ) can be factored as

where

Then, to draw β ’s from this distribution we need to calculate its state mean, β t | t + 1 , and state variance, P t | t + 1 :

The vector of β t 's can be easily drawn because it can be computed using the forward (Kalman filter) and the backward (Carter and Kohn algorithm) recursions presented in Section A.1.4.

The starting values of the Kalman filter, that is, the prior of the state β 0 | 0 and variance of the state P 0 | 0 are the following:

Priors for β t ’s. The first T 0 = 2 0 observations of the sample (the 20-year period 1962—1981) are used to estimate a standard fixed-coefficient VAR via ordinary least squares (OLS) such that β 0 | 0 = β OLS with a coefficient covariance matrix given by p 0 | 0 = 0 ( X ' 0 t X 0 t ) - 1 , where X 0 t = { Y 0 t 1 , . . . Y 0 t p , 1 } , 0 = ( Y 0 t X 0 t β 0 ) ( Y 0 t X 0 t β 0 ) T 0 and the subscript 0 denotes the fact that this is the training sample.

The last recursion of the Kalman filter provides β T | T , and P T | T which are the mean variance of the posterior distribution of β T . After drawing a value from this distribution, the draw is used in the backward recursion to obtain β T 1 | T and β T 1 | T from period t 1 to 0 , that is, to obtain β t conditional on β t + 1 .

A.1.6 Drawing aij,t 's

From equations (8) to (11), state-space formulations for the a i j , t ’s can be derived. Specifically, the state-space formulation for a 1 2 , t is

[19]

[20]

and the state-space formulation for a 1 3 , t and a 2 3 , t is

[21]

[22]

Because S is block diagonal, the Kalman filter and Carter and Kohn algorithm can be applied equation by equation. The priors of the a i j , t are the following:

Priors for a i j , t s. Let A = 0 1 / 2 and ley A 0 denote the inverse of the matrix A with the diagonal normalized to 1 . The initial values for a i j , t (i.e., the initial state a i j , 0 | 0 ) are the nonzero of A_0 with the variance of the initial state set equal to a b s ( a i j ) × 1 0 , following Benati & Mumtaz (2007).

Note that without the block diagonality of S it would not be feasible to apply the Kalman filter and Carter and Kohn algorithm equation by equation and draw separately every block of a i j , t ’s. However, while the block-diagonal assumption of S simplifies the analysis, it is not essential and Primiceri (2005) provides a procedure to deal with an unrestricted S .

A.2 Drawing volatilities

A.2.1 The Metropolis Hasting algorithm

In this section, following Blake and Mumtaz (2017), we briefly describe the Metropolis Hastings (MH) algorithm in a general setting. Suppose that we are interested in drawing samples from the following distribution:

where Φ is K × 1 a vector that represents a set of parameters and is referred as the “target density.” π Φ can be thought of a posterior distribution where the Gibbs sampler is not operation, because the conditional distributions of different blocks of the Φ parameters are unknown. However, if provided with a value of Φ = Φ * it is possible to evaluate the density of Φ * , that is, π Φ * . If this is the case, the MH algorithm can be used to sample from π Φ following the steps described below:

Step 1. Specify a candidate density q ( Φ G + 1 | Φ G ) where G indexes the draw of the parameters Φ . One must be able to draw samples from this density.

Step 2. Draw a candidate value of the parameters Φ G + 1 from the candidate density q ( Φ G + 1 | Φ G ) .

Step 3. Compute the probability of accepting Φ G + 1 (denoted by α ) using the expression

The numerator of this expression is the target density evaluated at the new draw of the parameters π ( Φ G + 1 ) divided by the candidate density evaluated at the new draw of the parameters q ( Φ G + 1 | Φ G ) . The denominator is the same expression evaluated at the previous draw of the parameters

Step 4. If the acceptance probability α is large enough, retain the new draw Φ G + 1 , otherwise retain the old draw Φ G . We decide if α is large enough by drawing a number u from the standard uniform distribution. If u < a , accept Φ G + 1 ; otherwise keep Φ G 3.

Step 5. Repeat steps 2 to 4 M times and base inference on the last L draws. Provided convergence exists, the empirical distribution using the last L draws is an approximation to target density.

A.2.2 A simple stochastic volatility model using the MH algorithm

Consider the simple stochastic volatility model

where h t is time-varying variance. This is a state-space model where the observation equation is nonlinear in terms of the state variable h t and therefore the Carter and Kohn algorithm does not apply. Jacquier et al. (2004) suggest applying an independence MH algorithm at each t to sample from the conditional distribution of h t which is given by f ( h t | h t , y t ) where the subscript - t denotes all other dates than t .

Because the transition equation is a random walk, the knowledge of h t + 1 and h t 1 contains all the relevant information about h t . This way, the conditional distribution of h t can be simplified as

To sample from f ( h t | h t 1 , h t + 1 , y t ) a date-by-date application of the independence MH algorithm could be performed following steps 2 to 4 as described in Section A.2.1. However, this procedure does not apply for the first and last observations. Therefore, the general algorithm is modified as follows (Blake & Mumtaz, 2017, p. 158): Jacquier et al. (2004) show that this density has the following form:

that is, this density is the product of a normal density and a log normal density, with

Step 1. Generate a starting value for h t , t = 0 . . . T as ε ˆ t 2 and set the prior μ , σ (e.g, μ could be the log of the OLS estimate of the variance of ε t and σ could be set to a big number to reflect the uncertainty in this initial guess). Set an inverse-gamma prior for g (i.e., p g ~ IG g 0 2 v 0 2 ). Set a starting value for g.

Step 2. The drawing of h t proceeds in three steps:

2a. for t=0 , sample the initial value of h t denoted by h 0 from the log normal density

where the mean μ = σ 0 ( μ σ + ln h 1 g ) and σ 0 = σ g σ + g .

2b. For each date t = 1 to T 1 draw a new value for h_t from the candidate density (call the draw h t , new )

Where μ = ln h t + 1 + ln h t 1 2 and σ h = g 2 . Compute the acceptance probability

Draw u ~ U ( 0 , 1 ) . If u < α , set h t = h t , new . Otherwise retain the old draw.

2c. For the last time period t = T compute μ = ln h t 1 and σ h = g and draw from the candidate density

Compute the acceptance probability

Draw u ~ U ( 0 , 1 ) . If u < α , set h t = h t , new . Otherwise retain the old draw.

Step 3. Given a draw for h t , compute the residuals of the transition equation v t = ln h t ln h t 1 . Draw g from the inverse-gamma distribution with scale parameter v t v t + g 0 2 and degrees of freedom T + v 0 2 .

Step 4. Repeat steps 2 and 3 M times. The last L draws of h t and g provide an approximation to the marginal posterior distributions.

A.2.3 Drawing (σi,t)’s

Equations (3) and (6) can be rewritten into the following state-space forms:

[23]

[24]

where ln σ i , t is time-varying variance. This is a state-space model where the observation equation is nonlinear in the state variable σ and therefore can be estimated by the MH algorithm explained above after linearization. Note that because t ε t = A t u t is contemporaneously uncorrelated, the draws ln σ i , t from the MH algorithm can be done separately for each i = 1 . . . 3 .

Priors for σ i , t . A starting value for σ i , t is obtained from u ̂ i t 2 . The prior for μ can be set equal of the ith diagonal element of 0 and σ to a large number, 10 in this case, following Blake and Mumtaz (2017).

A.3 Drawing hyperparameters

Conditional on β T , T , A T , and y T , it is easy to draw posteriors using Gibbs sampling for Q , the block of S , and W , because all of these posteriors are observable. We discuss the priors we used to estimate these conditional distributions below.

A.3.1 Priors

The first T 0 = 2 0 observations (the 20-year period between 1962 and 1981) are used to calibrate the prior distributions.

Prior for Q . The (conjugate) prior for Q is inverse-Wishart4 p Q ~ IW ( Q 0 , T 0 ) , where Q 0 is the scale matrix and T 0 are the degrees of freedom. This prior is key, because it shapes the amount of time variation allowed for in the VAR model, that is, a large value for the scale matrix Q 0 would imply more fluctuation in β t .

The scale matrix Q 0 is set equal to p 0 | 0 × T × τ , where τ is a scaling factor chosen by the researcher. Some studies set τ = 3 . 5 1 0 - 4 , i.e., a small number, to reflect the fact that the training sample is typically short and the resulting estimates of p 0 | 0 maybe imprecise. Note that one can control the a priori amount of time variation in the model by varying τ .

Priors for S 1 and S 2 . The prior for S 1 is inverse-gamma5 p S 1 ~ IG ( S 1 0 , T 0 ) and the prior for S 2 is inverse Wishart p S 2 ~ IW S 2 0 T 0 . We follow Benati & Mumtaz (2007) who set S 1 0 = 0 . 0 0 1 and S 2 0 = 0 . 0 0 1 0 0 0 . 0 0 1 .

Priors for W . An inverse-gamma prior for W = g i , p n u i ~ GI g 0 v 0 is set with scale parameter g 0 = 0 . 0 1 2 and degrees of freedom v 0 = 1 .

A.3.2 Posteriors

Posterior for Q . The hyperparameter Q has an inverse-Wishart conditional posterior distribution p Q ~ IW ( η η + Q 0 , T + T 0 ) . Posteriors for S 1 and S 2 . The hyperparameter S 1 has an inverse-gamma posterior conditional distribution p S 1 ~ IG ( v 1 v 1 + S 1 0 2 , T , T 0 2 ) . Posterior for Q. The hyperparameter Q has an inverse-Wishart conditional posterior distribution p Q ~ IW ( η η + Q 0 , T + T 0 )

Posteriors for S 1 and S 2 . The hyperparameter S 1 has an inverse-gamma posterior conditional distribution p S 1 ~ IG ( v 1 v 1 + S 1 0 2 , T + T 0 2 ) .

The hyperparameter S 2 has an inverse-Whishart conditional posterior p S 1 ~ IW ( v 2 v 2 + S 2 0 , T + T 0 ) .

Posterior for W . The hyperparameters in W have an inverse-gamma conditional posterior distribution p v i ~ IG v i v i + g 0 2 T + v 0 2 .

A.4 Summary of the sampling chain

Step 1. Set priors and initial values of B T , a i j , t , σ i , t , Q , the block S , and W :

1a. Set prior for Q : p Q ~ IW ( Q 0 , T 0 ) and starting values of the Kalman filter: β 0 | 0 and P 0 | 0 .

1b. Set prior for S 1 : p S 1 ~ IG S 1 0 T 0 , a prior for S 2 : p S 2 ~ IW S 2 0 T 0 , and starting values of a i j , t .

1c. Set a starting value for σ i , t and a prior for W : v i , p v i ~ IG g 0 v 0 .

Step 2. Conditional on A t , W t , and Q , draw β t using the Carter and Kohn algorithm.

Step 3. Conditional on the draw of β t , sample Q from p Q ~ IW ( η η + Q 0 T + T 0 ) .

Step 4. Conditional on β t , W t , and S 1 and S 2 , draw a i j , t using the Carter and Kohn algorithm.

Step 5. Conditional on the draw of a i j , t estimate residuals v 1 , v 2 , v 2 , and sample S 1 from p S 1 ~ IG v 1 v 1 + S 1 0 2 and S 2 from p S 2 ~ IW v v 1 + g 0 2 T + v 0 2 . p v i ~ IG v i v i + g 0 2 T + v 0 2 .

Step 6. Using the draw of A t from Step 4, calculate ε t = A t u t and draw σ i , t using the MH algorithm.

Step 7: Conditional on a draw for σ i , t , draw W from p v i ~ IG v i v i + g 0 2 T + v 0 2 .

Step 8: Repeat steps 2 to 7 M times. The last L draws give an approximation to the marginal posterior distribution of the model parameters.

B Algorithm for sign restrictions

Once past the burn-in stage –the process of dropping M - L Gibbs draws– and marginal posterior distributions of all the model’s parameters are obtained, following Ramirez (2010), the steps presented below are used to calculate the required A 0 matrix with sign restrictions:

Step 1. Draw a N × N matrix K from the standard normal distribution.

Step 2. Calculate the matrix Q from the QR decomposition of K . Note that Q is orthonormal i.e., Q Q = I .

Step 3. Calculate the Cholesky decomposition of the current draw of = A ˜ 0 A ˜ 0 .

Step 4. Calculate the candidate A 0 matrix as A 0 = Q A ˜ 0 . Because Q ' Q = I , this implies that A 0 A 0 will still equal , that is, by calculating the product Q A ˜ 0 we alter the elements of A ˜ 0 but not the property that = A ˜ 0 A ˜ 0 . The candidate A 0 matrix has the following form:

The second and third rows of this matrix corresponds to the oil price shock impact on the fiscal variable and the nonoil real GDP, respectively. We need to check if a 1 2 < 0 , a 1 3 > 0 , and a 2 3 < 0 . If this is the case, a contemporaneous shock in oilprice t will lead to a fall in p b t and an increase in nonoilr g d p t , because the elements ( a 1 3 a 2 3 1 ) correspond to the current period response of nonoilr g d p t to an ε pilprice , t shock. If a 1 2 < 0 , a 1 3 > 0 , and a 2 3 < 0 , the algorithm stops and uses this A 0 matrix to compute a draw of impulse responses. If the restriction is not satisfied, the algorithm goes back to step 1 and tries with a new K matrix.

Step 5. Repeat steps 1 to 4 for every retained Gibbs draw.

Notes

1 Villafuerte and Lopez-Murphy (2009), Erbil (2011), and Levy et al. (2020) show that fluctuations in commodity prices can generate significant impacts on countries’ fiscal variables, especially in countries with emerging economies.
2 These do not need to be triangular. See Primiceri (2005) for a discussion.
3 This essentially means that we accept the draw with probability if this experiment is repeated many times (e.g., if and we perform 1000 replications we should expect 100 of the 1000 draws to have ).
4 The appendix in Zellner (1971) provides a detailed description of the inverse-Wishart distribution.
5 See Zellner (1971) for a detailed description of the inverse-gamma and gamma distributions and Bauwens et al. (1999) for a detailed description of algorithms for drawing from these distributions.

Additional information

Clasificación JEL: E62, D72, F3, H60



Buscar:
Ir a la Página
IR
Non-profit publishing model to preserve the academic and open nature of scientific communication
Scientific article viewer generated from XML JATS4R