The adjustment to commodity price shocks

ABSTRACT This paper analyzes the macroeconomic adjustment in commodity-exporting countries to commodity price shocks. First, I estimate a heterogenous panel SVAR using data from 22 commodity-exporting economies spanning the period 1980–2017. I find that commodity terms of trade shocks are an important driver of business-cycle fluctuations: they explain around 30 percent of movements in output, contrary to the 10 percent found in recent studies. However, there is wide variation in the responses to a commodity terms of trade innovation across countries. Second, I use panel SVARs to study the role of various key country characteristics and economic policies in the macroeconomic response to these shocks. I find evidence that exchange rate flexibility, inflation targeting regimes and fiscal rules help insulate the economy from commodity price movements.


Introduction
Commodity prices experienced a remarkable increase during the 2000s, the so-called commodity super-cycle, which was only slightly interrupted by the global financial crisis, generating a terms of trade (ToT) boom for many commodity-exporting economies. For instance, in Chile and Peru, the ToT doubled from 2000 to 2011, and in Colombia ToT increased by 70 percent. However, the prices of metals and oil declined after 2011 and mid-2014, respectively. Through deteriorating ToT, the shock resulted in lower national incomes, wider current account deficits, and weaker national currencies. While the conventional wisdom dictates that ToT movements would have important implications for macroeconomic performance as relative prices and incomes change (Kose, 2002;Mendoza, 1995), Schmitt-Grohe and Uribe (2018) find that on average ToT shocks account only for 10 percent of fluctuations in output.
This paper analyzes the transmission of commodity terms of trade (CToT) shocks in commodity-exporting countries and argues that commodity prices are a better measure of the terms of trade than aggregate indices of export and import unit values (the measure used in Schmitt-Grohe & Uribe, 2018). In particular, I analyze a sample of 22 commodity-exporting countries that are quite heterogenous with respect to their level of economic development, exchange rate regime, openness to trade, public debt levels, and fiscal/monetary frameworks. I exploit this country heterogeneity in the study of the effects of CToT shocks and make two main contributions to the literature. First, I employ the heterogenous panel SVAR methodology developed in Pedroni (2013). This methodology has not been used before in the analysis of terms of trade shocks and contrary to the conventional dynamic panel methods used in the literature, it allows individual country responses to structural shocks to be heterogenous while also taking into account that countries may be cross-sectionally linked through common global shocks. Second, I explore the non-linear effects attached to the different relevant country characteristics. For both parts of the empirical analysis, I follow the model specification in Schmitt-Grohe and Uribe (2018) which includes the following domestic endogenous variables: the trade balance, output, private consumption, investment, and the real exchange rate. I also follow their identification restriction that the CToT in my sample of commodity-exporting countries are exogenous. Then, the transmission is measured by the impulse responses of domestic macroeconomic variables to CToT shocks, and by computing the fraction of the variance of these variables that is explained by the shock.
The results indicate that there is substantial heterogeneity among countries in the dynamic response to CToT shocks. However, the median impulse responses show that CToT shocks have substantial impact on the country-specific macroeconomic variables. In particular, an increase in CToT induces an improvement in the trade balance, validating the Harberger-Laursen-Metzler effect. Moreover, the improvement in CToT causes an expansion in aggregate activity, consumption, and investment. Finally, the shock leads to a real exchange rate appreciation. These results are in line with the predictions of the theoretical framework. More interestingly and contrary to Schmitt-Grohe and Uribe (2018), I find that CToT shocks account for a sizable fraction of the business-cycle fluctuations in commodity-exporting countries. According to my estimates, CToT shocks explain, on average, about 25, 29, 31, 34, and 33 percent of the variances of the trade balance, output, consumption, investment, and the real exchange rate, respectively.
With respect to country characteristics, the data lend support to the conventional wisdom that CToT are relatively more important in driving business cycles in emerging economies than in advanced countries. I find support that floating exchange rate and inflation targeting regimes mitigate the impact of CToT shocks on the domestic economy, in line with the implications of the Mundell-Fleming model. Moreover, countries without debt sustainability concerns and with sound fiscal policy frameworks are less vulnerable to CToT shocks. This indicates that fiscal policy plays a key role defining the extent of the transmission of CToT shocks to the domestic economy.
The rest of the paper is organized as follows. Section II presents the related literature. Section III illustrates the transmission mechanisms of CToT shocks based on simple model that is presented in the Appendix. Section IV describes the data and presents the methodology used to estimate the impact of commodity prices on key macroeconomic variables. Section V discusses the results from the VAR approach. Section VI studies how country characteristics and macro institutions shape responses. Section VII concludes, summarizing the key findings.

Related literature
There is a large literature focusing on the impact of ToT shocks on macroeconomic fluctuations, especially on the current account. Harberger (1950) and Laursen and Metzler (1950) show that a negative shock to the ToT would worsen the current account. Ostry and Reinhart (1992) find that ToT shocks generate sizable variations in real exchange rates and the current account. Cashin and McDermott (1998) find that ToT shocks account for a large proportion of the variability in the current account in Australia and New Zeland. Cashin and Kent (2003) find that the current account tends to move in the opposite direction to the ToT shock. Agenor and Aizenman (2004) find that increases in the permanent component of the ToT are associated with higher private savings rates in sub-Saharan Africa. Deaton and Miller (1996) examines the effects of commodity-price fluctuations on national output and its components in sub-Saharan Africa, and do not find that commodity booms are generally harmful. However, Bleaney and Greenway (2001) find that growth in this region is negatively affected by terms of trade instability. Raddatz (2007) finds that shocks to commodity prices are an important source of variation in developing countries' income per capita. Kaminsky (2010) finds that ToT booms do not necessarily lead to larger government surpluses, particularly in emerging markets and especially during capital flow bonanzas. Cespedes and Velasco (2014) find that fiscal policy tended to be more countercyclical in the recent commodity price boom, due to the presence of fiscal rules. Medina (2016) shows that government expenditures in countries with fiscal rules respond less to shocks to commodity prices. Lopez-Martin, Leal, and Fritscher (2017) present a model of sovereign default that illustrates the mechanism behind the positive correlation of commodity revenues with government spending and a negative correlation with tax rates. Adler and Sosa (2011) find that a country's ultimate degree of vulnerability to commodity price shocks is to a great extent determined by the flexibility and quality of its policy framework. Adler and Magud (2015) argue that greater aggregate savings in the recent boom than in previous episodes reflect mainly the sheer size of the exogenous income shock rather than a greater effort to save it. Adler, Magud, and Werner (2017) show that exchange rate flexibility played an important buffering role during ToT booms, but less so during busts. Mendoza (1995) and Kose (2002) pioneered the analysis on the effects of ToT shocks in emerging economies. Using calibrated real business-cycle models these studies argued that ToT shocks are an important source of cyclical fluctuations. As mentioned in the Introduction, Schmitt-Grohe and Uribe (2018) challenged this conventional wisdom. However, more recent studies, in line with the findings of this paper, restore the importance of terms of trade shocks by focusing on a measure based on commodity prices. Drechsel and Tenreyro (2018) study the case of Argentina and find that CToT shocks explain about 38 percent of the fluctuations in output. Ferndandez, Gonzalez, and Rodriguez (2018) document that a common factor accounts for most of the time series dynamics of commodity prices. Then, they present a multi-country DSGE augmented with a commodity sector in which commodity prices follow a common dynamic factor structure and show that CToT shocks are an important driver of business cycles. Finally, Ben Zeev, Pappa, and Vicondoa (2018) find that news-augmented CToT shocks explain almost half of aggregate activity variations in Latin American countries. 1 This paper contributes to this literature first by extending the sample coverage to a larger set of quite heterogenous group of commodityexporting countries, including both emerging and advanced economies. Second, the papers just described rely on either country-specific VARs or DSGE models, while in this paper I use a novel heterogenous panel SVAR developed in Pedroni (2013). Finally, those papers do not explore the role of key country characteristics and economic policies in the transmission of CToT shocks, as I do.

On the transmission of CToT shocks
In this Section I describe the mechanisms from a simple framework to inspect how commodity ToT shocks affect the selected macroeconomic variables in the VAR analysis. This is a twoperiod model of a small-open economy with three sectors: tradable, non-tradable and commodity sector. Capital is the only factor of production in all sectors. However, the commodity good is also needed as an intermediate input in the production of tradable goods. The economy faces exogenous changes in the price of commodities. The full model is explained in the Appendix. A rise in the commodity price in the first period induces a contemporary boom in the commodity sector and, thus, translates into higher commodity trade revenues. This positive income effect generates an overall increase in consumption in both periods. Moreover, the shock leads to an allocation of capital away from the production of both non-tradables and tradables towards the commodity sector. This implies that the price of non-tradable goods must increase (i.e. the real exchange rate appreciates). In the tradable sector, domestic producers also suffer from more expensive intermediate inputs and cut back supply. However, the expansion in the commodity sector more than compensates the decline in production in the rest of the economy, leading to an increase in total production and an improvement in the overall trade balance in period 1. Finally, the improvement in the commodity price induces an increase in investment due to the increased consumption of nontradables in period 2. Figure 1 presents a visual representation of the results from the model.

Data and methodology
I use a panel structural VAR approach to analyze the implications of a shock in commodity prices on key macroeconomic variables. I follow Schmitt-Grohe and Uribe (2018) and include the following variables in the model: the commodity terms of trade, the trade balance, output, consumption, investment, and the real effective exchange rate. There are three main differences in the empirical analysis I conduct in this paper with respect to Schmitt-Grohe and Uribe (2018). First, I rely on panel VAR methods while Schmitt-Grohe and Uribe (2018) estimate country-specific VARs. Second, the focus of this paper is on commodity terms of trade shocks (not standard terms of trades) and how the impact of these shocks varies with different macroeconomic policies, while the focus in Schmitt-Grohe and Uribe (2018) is on comparing the importance assigned to TOT shocks by theoretical and VAR models. Finally, they use annual data while I employ quarterly data.
The estimation uses quarterly data from the first quarter of 1980 until the last quarter of 2017 and a country-specific commodity price index aimed at capturing the impact of variations in commodity prices at the country level. 2 This is a point of departure with respect to many studies in the literature that use either a non-country specific measure of commodity prices or standard ToT measures. However, the former can fail at capturing the price variations of the specific commodities a country trades, while the latter is influenced by noncommodity prices and by the country's composition of exports. The country-specific commodity price index used in this paper is constructed with both international prices and country-level data on exports for individual commodities, assigning a weight based on net exports of each commodity. 3 For a country to be included in the panel, it has to qualify as a commodity-exporting country and have quarterly time series data of substantial length. I classified countries as commodity exporters if primary commodity exports represented at least 20 percent of total merchandise exports. 4 Table 1 shows the countries that satisfy both criteria.
All the series are seasonally adjusted and detrended using the Hodrick-Prescott (HP) filter. The trade balance is expressed as percentage of GDP. 5 Let the variables ctot i;t , y i;t , c i;t , i i;t , and REER i;t denote the log-deviations of the CToT index, real GDP, real private consumption, real investment, and the real effective exchange rate from their respective time trends. Let the variable tb i;t denote the deviation of the trade balance as a share of GDP from its trend. Then, the baseline model is expressed as a panel structural VAR where A i L ð Þ are matrix polynomials in the lag operator of order q = 4, u i;t are the structural errors, and x i;t is a vector with country-specific dimension t = [1, . . ., T i ] for each member i = [1, . . ., M] of the unbalanced panel, given by 6 (*): Average share of primary commodity exports in the total of merchandise exports for the period 1995-2017.
Following Schmitt-Grohe and Uribe (2018) and Broda (2004), the main identifying assumption in the paper is that commodity terms of trade are exogenous. This assumption is justified given that there are not large countries in the sample and most of them are emerging economies, which are likely taking the terms of trade as exogenously given. The exogeneity of CToT implies the following restrictions on the A matrices: (i) all elements of the first row of A i L ð Þ for all q > 0 except the first to be 0, and (ii) A 0 is assumed to be lower triangular with 1 on the main diagonal. These assumptions imply that CToT follow a univariate autoregressive process. Note that the identification of the CToT shock only requires that the elements of the first row of A 0 except the first to be 0. Besides, changing the ordering of the remaining variables in the SVAR has no implications on the dynamic responses to the CToT shock.
I employ the heterogenous panel SVAR methodology developed by Pedroni (2013) to estimate the model. Standard panel methods fail to account for heterogenous dynamics among the members of the panel which could result in inconsistent estimation and inference (see Pesaran & Smith, 1995). Moreover, these methods usually ignore that members of the panel may be connected cross-sectionally via common global shocks. The approach in Pedroni (2013) allows for complete heterogeneity in the dynamic responses across individual members of the panel while also accounting for the cross-sectional dependence due to shocks that are common across members of the panel. The algorithm exploits orthogonalities associated with SVAR identification schemes to decompose the shocks into memberspecific idiosyncratic shocks and common structural shocks that drive the cross-sectional dependence among members. The relative importance of the idiosyncratic versus common shocks is permitted to differ for each member of the panel, and each member is permitted to respond in a heterogeneous member specific manner to both the common and idiosyncratic shocks.
Next, I briefly describe the estimation procedure and refer readers to Pedroni (2013) for further details. First, I compute the cross-sectional averages of the data, x i;t Þ=M, which contain identifiable information regarding the common shocks. Second, I estimate a set of M + 1 reduced-form VARs: one for each country in the panel and an additional one using the cross-sectional averages The structural shocks are recovered imposing the identifying assumption that CToT is exogenous as explained above. The strategy in Pedroni (2013) is to decompose the orthogonal structural shocks into orthogonal common and idiosyncratic components: where u i;t are the composite shocks, u t are the common shocks,ũ i;t are the idiosyncratic shocks, and Δ i is a diagonal matrix of the country specific loadings that reflects the relative importance of the common shock for a particular country. The loadings matrix is constructed by running simple OLS of the composite shock on the common shock for each country. Then, the composite impulse response can be decomposed as represent country-specific responses to an idiosyncratic structural shock. Finally, I compute confidence bands for the median response via bootstrapping with 1000 repetitions.
In the next section, I use this methodology to analyze the dynamic responses to commodity price shocks by examining the distribution of heterogenous country impulse responses, and I account for the importance of these shocks as a source of variation through a variance decomposition analysis.

Results from heterogeneous panel SVAR
This section discusses the propagation mechanism of idiosyncratic CToT shocks through the analysis of impulse responses, and quantifies the variation in key macroeconomic variables that is accounted by these shocks using a forecast error variance decomposition analysis. I focus on the analysis of idiosyncratic shocks as they have a more prominent role than common shocks both in terms of impulse responses and variance decomposition. Figure 2 displays the median as well as the 25 th and 75 th percent quantile responses to an idiosyncratic CToT shock among the 22 countries in the panel. Figure 3 reports the median responses with the associated 90 percent bootstrapped confidence bands. Interestingly, the results suggest that there is substantial variation across countries in the impulse responses of the different macro variables in the model to a CToT shock, and that these responses are rather persistent. However, the median impulse responses are broadly in line with the expected sign from the theoretical framework developed in Section II, and these responses are statistically significant as reflected by the confidence intervals. While Schmitt-Grohe and Uribe (2018) also find that ToT shocks have similar effects on the variables under study, many of the responses are statistically insignificant. Hence, the results in Figure 3 already hint that commodity prices are a better measure of the ToT for commodity exporters.

Impulse response function analysis
The shock induces a positive median impact of 0.2 percent of GDP in the trade balance, which lasts for about 6 quarters. Moreover, this positive effect on impact is observed in all the quantiles presented in Figure 2. In line with Schmitt-Grohe and Uribe (2018), this result is consistent with the Harberger-Laursen-Meltzer effect. However, the immediate increase in the trade balance is almost 3 times larger than the median for the 75 th percentile while it is almost zero for the 25 th percentile.
The results show that CToT shocks have strong effects on aggregate activity, private consumption, investment, and the real exchange rate. A one percent increase in CToT causes an expansion in GDP with the median impulse response peaking at 0.2 percent after a year. Median private consumption and investment increase on impact and peak at 0.2 and 0.86 percent, respectively, around 3 quarters following the shock. As expected, the shock leads to a real exchange rate appreciation of around 0.4 percent during the first year. However, as mentioned above, there is substantial dispersion in the impulse response estimates. In particular, note that the 25 th percent quartile shows that there is a subset of countries for which CToT shocks cause opposite effects from the ones just discussed or from the theoretical framework.
The conventional wisdom is that business cycles in emerging economies are more volatile than in advanced economies due to their dependence on commodities. Then, in the context of this study, a natural question is whether CToT shocks have a larger impact on developing countries than in advanced ones. To tackle this question, I also use the heterogeneous panel   Figures 4 and 5 show the median impulse responses with the associated 90 percent bootstrapped confidence bands for developing and advanced countries, respectively. The results support this idea and show that CToT shocks have strong effects on aggregate activity, private consumption, investment, the trade balance, and the real exchange rate. While the median responses are qualitatively similar among both groups, the magnitudes are larger for developing economies (except for 7 I use the World Bank's classification of advanced countries and include all others in the category "developing" (see Table 1).
the trade balance). More importantly, the median responses in advanced economies are less statistically significant than in emerging economies. A one percent increase in CToT causes an expansion in GDP with the median impulse response peaking at 0.33 percent after a year in developing economies, but only 0.15 percent in advanced economies. While the initial increase in median private consumption is similar in both groups, after 3 quarters it peaks at 0.23 percent in developing economies and 0.12 in advanced economies. The response of private investment is similar across groups during the first 4 quarters following the shock, peaking at 1.3 percent in emerging economies relative to 1.2 in advanced economies. However, after the 4 th quarter, the median investment only remains positive and statistically significant in developing countries. Finally, the shock leads to a statistically significant real exchange rate appreciation only developing countries.

Forecast error variance decomposition analysis
In order to understand the importance of CToT shocks as a source of business cycles fluctuations, I perform a variance decomposition of the forecast errors. Figure 6 reports the median, the average, and the 25 th and 75 th percent country quantiles as fractions of the total forecast variance for the six variables in the SVAR explained by the CToT innovation. Interestingly, the results suggest once again that there is a sizable cross-country variation. According to my estimates, CToT shocks explain, on average, about 25, 29, 31, 34, and 33 percent of the variances of the trade balance, output, consumption, investment, and the real exchange rate, respectively. In all cases, the median is very close to the mean. Once again, these findings are at odds with those in Schmitt-Grohe and Uribe (2018) and suggest that fluctuations in commodity prices play a remarkable role in driving business cycles for commodity exporters. Moreover, together with the impulse response function analysis, these results suggest that commodity prices are a better measure of the ToT for commodity exporters than aggregate indices of export and import values.
As with the impulse response function analysis, I also study whether CToT shocks are more important in accounting for the business cycle in emerging economies than in highincome economies. Figures 7 and 8 report the median, the average, and the 25 th and 75 th percent country quantiles as fractions of the total forecast variance in the model variables explained by the CToT innovation for developing and advanced countries, respectively. The estimates indicate that fluctuations in commodity prices are important for both groups. However, as expected, the prominence of CToT innovations is much larger in emerging economies. In the case of output, CToT shocks explain, on average 34 percent of the variance in developing economies while only 16 percent in advanced economies. In the case of consumption, CToT shocks explain, on average 36 percent of the variance in developing economies while only 19 percent in advanced economies. Finally, in the case of investment, CToT shocks explain, on average 37 percent of the variance in developing economies while 26 percent in advanced economies.
Taken together, these results suggest that CToT shocks represent a major source of business cycles in commodity-exporting countries. Moreover, these shocks are relatively more important for emerging than advanced economies. A plausible explanation is that advanced countries feature better diversified economies while developing economies rely heavily on commodity sectors.

CToT shocks, country characteristics and macro-frameworks
The results in the previous section already indicate that the impact of CToT shocks differs between emerging and advanced economies. In this Section I study the relevance of key country characteristics and institutional frameworks that govern macroeconomic policy in shaping the responses of the variables in the SVAR to innovations in CToT. In particular, I sort countries based on their degree of exchange rate flexibility, openness to trade, level of outstanding debt, and whether fiscal rules and inflation targeting frameworks were in place. Table 2 reports how I pooled the data for each category. For each group of countries, I use a panel VAR approach to estimate the impulse responses to commodity price shocks. The strategy is to split the full sample into two subsamples according to the country characteristic of interest. Note that different observations from the same country can appear in both subsamples (e.g. a country may have adopted an IT framework in the middle of the sample). For this reason, I cannot use the heterogeneous SVAR approach in Pedroni (2013). Instead, I follow the methodology in Medina (2016) who estimates a homogenous panel SVAR using system Generalized Method of Moments (GMM).
First, I divide the sample of 22 countries into episodes of fixed exchange rates and those with more flexible exchange rate regimes. The exchange rate regime is based on de facto classification of Ilzetzki, Reinhart, and Rogoff (2009). Figures 9 and 10 display the impulse response functions under predetermined and flexible exchange rate regimes, respectively. The main difference that stands out between the impulse responses is on the real exchange rate. The impact response of the real exchange rate is positive and statistically significant under flexible exchange rate, but it is almost zero and not statistically significant under fixed exchange rate. However, the impulse response under fixed exchange rate peaks after 5 quarters at the same magnitude than under flexible exchange rate. The rest of the impulse responses behave similarly under both regimes but with stronger magnitudes under fixed exchange rate regimes. In particular, the increase in the trade balance peaks at 0.48 and 0.27 percent in the 2 nd quarter following the shock under fixed and flexible exchange rate regimes, respectively. The shock generates a maximum real GDP response of 0.26 percent after 4 quarters under fixed exchange rates, and 0.2 percent under flexible exchange rates. These results are consistent with the   Figure 9. Impulse response to a CToT Shock -fixed exchange rate regime. Mundell-Fleming argument for the optimality of floating exchange rates: in the presence of nominal rigidities, a depreciation of the exchange rate can bring about the right relative price adjustment. Thus, business-cycle gaps fluctuate less with shocks. Broda (2004) also finds support to this theory. Overall, these results highlight the benefits of flexible exchange rates as the first line of defense against external shocks. Second, I divide the sample based on their ratio of trade to GDP, where trade is measured as imports plus exports. I consider a country to be "open" if this ratio exceeds 40 percent. Figures 11 and 12 display the impulse response functions for open and Figure 10. Impulse response to a CToT shock -flexible exchange rate regime. closed economies, respectively. In this case, there are not qualitative differences in the impulse responses to an innovation in CToT. However, the impact on output, consumption, investment and the real exchange rate is larger in closed economies. In particular, in closed economies the shock in CToT triggers a real exchange rate appreciation of 1 percent and peaks at 2 percent after 3 quarters. The appreciation is much milder in open economies with a peak of 0.46 after 2 quarters. Aizenman, Edwards, and Riera-Crichton (2012) also find evidence that the reaction of real exchange rate is larger in relatively closed economies. They argue that in those economies a shock in CToT induces a larger real appreciation due to a stronger reallocation of resources towards poorly developed trade sectors that enjoy higher potential productivity. These sectoral reallocations could also explain why the responses of output, consumption and investment are stronger among relatively closed economies. These results shed light on the importance of engaging in international markets to mitigate the volatility of real exchange rates.
Third, I study two different criteria with respect to the fiscal policies. On one hand, I divide the sample based on the total debt to GDP of the central government. Country episodes with debt higher than 60 percent are included in the "high-debt" group. Figures 13 and 14 display the impulse response functions for low-and high-debt country episodes, respectively. On the other hand, I divide the Figure 12. Impulse response to a CToT shockclosed economies.
sample based on whether a fiscal rule was in place or not. 8 Figures 15 and 16 display the impulse response functions for countries with and without fiscal rules in place, respectively. A year after a shock in CToT, countries without fiscal rules (high debt) experience an increase in output, private consumption, and investment of 0.15 (0.25) percent, 0.14 (0.3) percent and 0.4 (0.7) percent, respectively; and a real exchange rate appreciation of 0.5 (0.4) percent. Interestingly, Figure 13-16 Figure 13. Impulse response to a CToT shocklow debt.
suggest that fiscal policy plays a key mitigating role in the transmission of commodity price shocks to the economy as the responses lose statistical significance during low-debt and fiscal rules episodes. These results could be suggesting that countries with higher fiscal space (low-debt levels) and/or anchored fiscal expectations (due to the enactment of fiscal rules) have larger possibilities to conduct countercyclical fiscal policies and mitigate the impact of the shocks.
Finally, I divide the sample based on whether an inflation targeting framework was in place or not. Figures 17 and 18 display the impulse response functions for countries with and without inflation targeting regime, respectively. The results resemble those in Figure 14. Impulse response to a CToT shockhigh debt. the analysis of the exchange rate regimes. Once again, the main difference that stands out between the impulse responses is on the real exchange rate. The impact response of the real exchange rate is positive and statistically significant for inflation targeting country episodes, but it is almost zero and not statistically significant without an inflation targeting regime. This result could be related to the fact that most inflation targeting regimes are characterized by also having a flexible exchange rate. Figure 15. Impulse response to a CToT shockwith fiscal rule.

Conclusions
In this paper, I use the heterogenous panel SVAR approach developed in Pedroni (2013) to study the impact of commodity terms of trade shocks on the business cycles of commodityexporting countries. I apply this methodology on a panel of 22 commodity exporters, with both advanced and developing countries, with quarterly data from 1980 to 2017. I find that the contribution of CToT shocks to business cycle fluctuations is substantial: CToT shocks account, on average, about 25, 29, 31, 34, and 33 percent of the variances of the trade balance, output, consumption, investment, and the real exchange rate, respectively. Moreover, these Figure 16. Impulse response to a CToT shockwithout fiscal Rule.
contributions more than double the estimates in Schmitt-Grohe and Uribe (2018), highlighting the relevance of using commodity prices as the measure of ToT instead of aggregate indices of export and import unit values when analyzing commodity-exporter countries.
I also find that the impact of commodity price shocks depends on key country characteristics and institutional frameworks that govern macroeconomic policy. I find support to the common belief that fluctuations in commodity prices play a more prominent role in developing economies than in advanced countries. Thus, developing economies should continue investing in diversifying their economies and reduce their dependence on commodity sectors. As expected, the results also suggest that in countries with inflation targeting frameworks and Figure 17. Impulse response to a CToT shockwith inflation targeting.
high degree of exchange rate flexibility, the real exchange rate appreciates faster after a commodity price shock than in countries without inflation targeting or with predetermined exchange rate regimes. In this regard, the study supports the policy recommendation of using the exchange rate as the first line of defense against external shocks. Finally, I find evidence that countries with low fiscal space (high public debt levels) and without well anchored fiscal frameworks (no fiscal rules) are more affected by shocks in CToT. Hence, fiscal policy seems to play a key mitigating role in the transmission of the shock in CToT. Understanding this role in more depth is an interesting avenue for future research. Figure 18. Impulse response to a CToT shockwithout inflation targeting.

Disclosure statement
No potential conflict of interest was reported by the author.

Notes on contributor
Francisco Roch is an Economist at the IMF's Research Department. While on leave from the IMF during 2017-19, he was Deputy Manager of the Research Department at the Center for Latin American Monetary Studies (CEMLA). He holds a Ph.D. from the University of Chicago and has been at the IMF since 2012.