Commodity Terms of Trade
A New Database*
  • 1 0000000404811396https://isni.org/isni/0000000404811396International Monetary Fund

Contributor Notes

Author’s E-Mail Address: bgruss@imf.org, skebhaj@imf.org

This paper presents a comprehensive database of country-specific commodity price indices for 182 economies covering the period 1962-2018. For each country, the change in the international price of up to 45 individual commodities is weighted using commodity-level trade data. The database includes a commodity terms-of-trade index—which proxies the windfall gains and losses of income associated with changes in world prices—as well as additional country-specific series, including commodity export and import price indices. We provide indices that are constructed using, alternatively, fixed weights (based on average trade flows over several decades) and time-varying weights (which can account for time variation in the mix of commodities traded and the overall importance of commodities in economic activity). The paper also discusses the dynamics of commodity terms of trade across country groups and their influence on key macroeconomic aggregates.

Abstract

This paper presents a comprehensive database of country-specific commodity price indices for 182 economies covering the period 1962-2018. For each country, the change in the international price of up to 45 individual commodities is weighted using commodity-level trade data. The database includes a commodity terms-of-trade index—which proxies the windfall gains and losses of income associated with changes in world prices—as well as additional country-specific series, including commodity export and import price indices. We provide indices that are constructed using, alternatively, fixed weights (based on average trade flows over several decades) and time-varying weights (which can account for time variation in the mix of commodities traded and the overall importance of commodities in economic activity). The paper also discusses the dynamics of commodity terms of trade across country groups and their influence on key macroeconomic aggregates.

1 Introduction

The role of world prices in macroeconomic activity has long received substantial attention in international economics. Several studies have explored the importance of export prices or the terms of trade in driving economic growth (Dehn, 2000; Collier and Goderis, 2012), business cycle fluctuations (Mendoza, 1995; Kose, 2002; Aghion et al., 2010; Fernández et al., 2017; Schmitt-Grohé and Uribe, 2018), real exchange rate movements (Chen and Rogoff, 2003; Cashin et al., 2004; Ricci et al., 2013), and international reserves (Aizenman et al., 2012). A common empirical challenge in this literature is to identify exogenous shocks to the terms of trade. Identification using standard measures—the overall export-to-import price ratio—is almost impossible as they do not only capture changes in world prices (Chen and Rogoff, 2003). An alternative often adopted in the literature is to rely on world prices of individual commodities, broad aggregate indices of commodity prices, or country-specific commodity price indices—often called commodity terms of trade (Spatafora and Tytell, 2009; Aizenman et al., 2012).

This paper presents a comprehensive database of country-specific commodity price indices that expands the coverage of earlier studies in several dimensions. First, the database covers 182 economies over 1962–2018. For each country, the change in the international price of up to 45 individual commodities is weighted using commodity-level trade data.1 Second, the database includes alternative commodity export, import, and terms-of-trade indices that should provide versatility to tackle a wide range of analytical questions. Finally, two variants of each series are constructed using, alternatively, time-invariant and time-varying weights.

We first present a commodity terms-of-trade index, along the lines of Spatafora and Tytell (2009). The weight of each commodity is given by the share of net exports of that commodity in aggregate output, so variations in the index provide an estimate of the windfall gains and losses of in-come associated with changes in world prices. We then study the dynamics of commodity terms of trade across country groups of economies and explore their influence on key macroeconomic aggregates. We find that variability of commodity terms of trade is large for commodity exporters, but is also substantial in other economies. Moreover, while commodity prices tend to comove, the cross-country correlation in commodity terms of trade is relatively limited, even among commodity exporters. We find that shocks to our commodity terms-of-trade index have a significant effect on output growth, real consumption, and domestic absorption in a broad panel of 158 economies. While demand from large countries or supply from dominant commodity exporters—those that account for a large fraction of global trade in some commodity—could affect world prices, we show that for most countries there is little evidence that domestic developments drive fluctuations in a country’s commodity terms-of-trade index.

The database is further complemented with a rich set of alternative country-specific commodity price indices. The distinct series differ on (i) which country-commodity trade flows—exports, imports, or net exports—are used to weight individual commodities; (ii) whether these trade flows are scaled by overall commodity trade or by output (providing an estimate of the effect that price fluctuations have on aggregate disposable income). The relative advantage of each index depends on the specific question at hand. For instance, some studies focused on the evolution of country-specific export prices rather than on the terms of trade for questions related to output growth (Collier and Goderis, 2012), real exchange rate dynamics (Cashin et al., 2004), and corporate investment (Magud and Sosa, 2017).

The typical approach in the literature has been to use average trade flows over a few years to weight individual commodities. Besides reasons related to data availability, the rationale for using weights that are invariant over the sample is to ensure that endogenous supply responses to price changes do not affect the analysis (Deaton and Miller, 1996). The problem with this approach, however, is that the mix of commodities traded and the overall importance of commodities in trade and output can vary significantly over time. We report that this is indeed the case in many countries, so using different reference periods when constructing commodity weights can have important implications for empirical questions on the role of terms-of-trade shocks. For instance, using 1980–83 data to construct commodity price indices would lead to a substantial underestimation of the boom and bust in terms of trade that Colombia experienced in the 2000s since oil production and exports only took off after 1985. Similarly, the collapse of oil prices in mid-2014 would appear as a negative terms-of-trade shock for the United Kingdom while, in fact, it was a net oil importer at that time.

In order to account for variations in commodity trade over time, our database includes indices constructed using time-varying weights. In those cases, we use lagged three-year rolling averages of trade values, as in Gruss (2014), to ensure that changes in the price indices reflect variations in commodity prices rather than endogenous changes in trade volumes. But a version of all indices using time-invariant weights, based on average trade flows over 1980–2015, is also included in the database.

The rest of the paper is organized as follows. Section 2 discusses previous studies constructing country-specific commodity price indices. Section 3 presents the data on commodity prices and trade flows we use. Section 4 describes the methodology to construct the commodity terms-of-trade index and the other country-specific commodity price indices included in the database, and provides stylized facts and evidence of their relationship with key macroeconomic aggregates. Section 5 presents some concluding remarks.

2 Previous Literature

Several earlier studies use commodity prices to capture exogenous shifts in terms of trade or, more broadly, the relevance of commodity price fluctuations for macroeconomic outcomes. Many of them use either prices of individual commodities or indices of aggregate commodity price movements (e.g., oil, metals, food, and agricultural raw materials). But this may be a poor approximation for terms-of-trade shocks. First, few countries are so specialized that focusing on just one commodity price is enough. Second, while commodity prices tend to comove, the correlation of unrelated commodities is much lower than commonly believed (Cashin et al., 2002). Finally, there is substantial heterogeneity in price variations within aggregate commodity categories. So even if a country specializes in a commodity category (e.g., metals), an aggregate price index is likely to poorly track the terms-of-trade shocks it faces.

Following Deaton and Miller (1996), several studies constructed country-specific commodity export price indices combining international prices and country-level data on exports, or production, of individual commodities. Chen and Rogoff (2003) construct quarterly price indices for Australia, Canada, and New Zealand by weighting world market prices of individual (non-oil) commodities in constant US dollars (deflated by the US CPI) by their corresponding production shares, averaged over 1982–90. Dehn (2000) uses data on export values in 1990 for 113 countries to weight quarterly real price variations (deflated by a unit value index of industrial country exports) in 57 commodities over 1957–97. Cashin et al. (2004) use export data on 44 commodities (average export shares over 1991–99) to construct monthly price indices over 1980–2002 for 58 commodity-exporting countries. Collier and Goderis (2012) use trade values in 1990 and international prices for 50 commodities to construct commodity export price indices for 120 countries over 1963–2008. They use net exports to weight individual commodities, but ignore price variations of commodities for which the country was a net importer in 1990.

Other studies considered the price of both commodity exports and imports to capture shocks to the terms of trade. Spatafora and Tytell (2009) construct annual country-specific commodity terms-of-trade indices for 152 countries over 1970–2007 by weighting price variations of 32 commodities with their export and import shares in GDP, averaged over the whole sample period. Aghion et al. (2010) use average export and import data on 42 commodities over 1985–87 to construct annual country-specific price indices over 1960–2000. The weight of individual commodities is given by net exports of that commodity over the country’s total net exports. Ricci et al. (2013) use net export flows of six commodity categories (food, fuels, agricultural raw materials, metals, gold, and beverages), averaged over 1980–2001, to construct country specificity commodity terms-of-trade series for 48 countries over 1980–2004.

All the studies mentioned above use average trade flows over some period, or one single year, to construct the price indices. The rationale for using fixed weights, following Deaton and Miller (1996), is to ensure that the index captures variations in international prices rather than supply responses triggered by those price variations. But the relative share of individual commodities in exports and imports, and the overall importance of commodities in trade and output can change significantly over time (as documented in subsequent sections). Gruss (2014) constructs commodity terms-of-trade indices using time-varying weights. These are based on three-year rolling averages of trade values (to smooth fluctuations) and lagged (so that changes in index reflect variations in commodity prices rather than endogenous changes in volumes). In this paper, we take the same approach to construct commodity terms-of-trade indices based on time-varying weights for a broader sample of countries and covering a longer period. We also construct other country-specific series, such as commodity export and commodity import price indices, using time-varying weights. But since indices based on time-invariant weights may be appealing for some applications despite the caveats aforementioned, we also present a variant of all commodity price indices in our database based on fixed weights, constructed using average trade flows over 1980–2015.

3 Data

Our database includes country-specific commodity price indices for 182 economies starting in 1962.2 The raw data needed to construct all indices include price data (international prices of individual commodities and an international manufacturing trade price index); trade data at the country-commodity level; and output data at the country level (nominal GDP in US dollars from the IMF World Economic Outlook database).

3.1 World Commodity Prices

We use international prices of 45 individual commodities:

  • 1. Energy: coal, crude oil, and natural gas.

  • 2. Metals: aluminum, copper, gold, iron ore, lead, nickel, tin, uranium, and zinc.

  • 3. Food and beverages: bananas, barley, beef, cocoa, coffee, corn, fish, fish meal, groundnuts, lamb, olive oil, oranges, palm oil, poultry, rapeseed oil, rice, shrimp, soybean meal, soybean oil, soybeans, sugar, sunflower seed oil, swine meat, tea, and wheat.

  • 4. Agricultural raw materials: cotton, hard logs, hard sawnwood, hides, natural rubber, soft logs, soft sawnwood, and wool.

The primary source for world commodity prices is the the IMF Primary Commodity Prices database. We used the World Bank’s Global Economic Monitor database and data from the US Energy In-formation Administration to extend the price series of some commodities—barley, coal, iron ore, and natural gas—back to the 1960s. The list of individual commodities, the corresponding international price, and their sources are listed in Annex Table A2. For each commodity, real prices are constructed as the commodity price in US dollars divided by the IMF’s unit value index for manufactured exports (or MUV index).3

We construct two variants of the database that differ on the sample period and frequency: (i) a monthly database based on the 45 commodities listed above that starts in 1980; and (ii) an annual database using a narrower set of 40 commodity prices that starts in 1962.4

3.2 Trade Data

We use trade data at the country-commodity level from the United Nations Comtrade database, SITC Revision 1 nomenclature, at 5-digit headings, to weight individual commodity prices. The database has annual country export and import values for more than 2,600 individual goods (headings) starting in 1962. Two aspects regarding the original trade data warrant further discussion: how to deal with data gaps at the reporting country level; and how to map world commodity prices with individual headings in Comtrade data.

Addressing trade data gaps

A key difference between some of the indices in this database and most in earlier studies is that they are constructed using time-varying weights. To this end, having broad coverage of commodity trade over time is of the essence. While the coverage of the Comtrade database is large, it relies on data submissions from country authorities and not all countries necessarily report trade statistics for each and every year. Figure 1 shows the share of countries with missing trade data in the UN Comtrade database. Data gaps were particularly prevalent in the 1960s, but coverage increased gradually over time, especially since the 1990s.5 However, many countries have some data gap along the sample—122 economies have data missing for at least one year over 1962–2015—and, in some cases, the data gaps span over 30 years (Table A3 reports all data gaps in the sample). Some countries—12 in total—do not report trade data at all, although they are included in reported data by trading partners. Data gaps are particularly prevalent among low-income countries; by the early 2000s about 20 to 30 percent of low-income countries were still not reporting trade data.

Figure 1:
Figure 1:

Countries with Missing Trade Data

(Percent)

Citation: IMF Working Papers 2019, 021; 10.5089/9781484393857.001.A001

Source: Authors’ calculations based on data from UN Comtrade.Note: See Table A1 for country groups. The spike in missing data towards the end of the period is due to a delay in reporting. AE = advanced economies. EM = emerging market economies. LIDC = low-income developing countries.

In order to circumvent this issue, we use bilateral trade data from Comtrade at the commodity level. We follow a multipronged approach but in most cases we rely on export and import flows reported by trading partners. That is, export (import) values of each commodity j by country i, for which data are unavailable are inferred by using the sum of imports (exports) from (to) country i as reported across all its trading partners p ≠ i (see Annex A for details).6

Mapping world prices to commodity trade data

The second challenge to construct commodity weights is to map the 45 individual commodities to SITC 5-digit headings.7 Some commodity prices are linked unequivocally with one single SITC heading (for instance, the price of bananas and olive oil are associated with SITC headings 0513 and 4215, respectively). Most of them, however, are associated with multiple headings.

We link each commodity price with all those product codes that correspond to the unprocessed commodity as well as products that, while somewhat processed, we expect their price to comove strongly with that of the primary commodity. For instance, the price of copper is associated with trade of “ores and concentrates of copper” (SITC heading 28311), but also semi-processed categories such as “refined copper including remelted” (SITC heading 68212). Some of the semi-processed categories can account for a significant share of commodity trade. For instance, “refined copper including remelted” accounted for more than half of Chile’s exports of copper in 2010, while “ores and concentrates of copper” accounted for abut one third; the remaining exports of copper are recorded in other ten headings.

4 A Set of Country-Specific Commodity Price Indices

We construct several country-specific commodity price indices that differ in how price variations of individual commodities are weighted. All indices are constructed as follows:

ΔLog(Index)i,t=Σj=1JΔPj,tΩi,j,t(1)

where Pj,t is the logarithm of the real price of commodity j in period t (see Section 3.1), where period t denotes either months or years, ∆ denotes first differences, and i,j,t denote commodity-and country-specific time-varying weights (the database also includes a set of indices based on fixed weights, as explained below in Section 4.3). These log differences are then used to generate the indices in levels we report in the database (which are set to 2012 = 100 in the case of annual data and to June 2012 = 100 in the case of monthly data).

The time-varying weights are based on average trade flows over the previous three calendar years—so that they reflect changes over time in the basket of commodities traded but are predetermined vis-à-vis the price change in each period t:8

Ωi,j,t=13Σs=13ωi,j,τs(2)

where τ denotes the calendar year corresponding to period t.

We construct six alternative commodity price indices that differ in how the weight of individual commodities, ωi,j,τ, is constructed (Table 3 summarizes the weights ωi,j,τ of all series included in the database). The following section describes the commodity terms-of-trade index and presents some stylized facts. Section 4.2 describes the other commodity price indices included in the database.

4.1 Commodity terms-of-trade index

We construct commodity terms-of-trade indices (labeled xm_gdp in the database) similarly to Spatafora and Tytell (2009). The annual weight of each commodity is given by the share of net exports in output:

ωi,j,τ=xi,j,τmi,j,τGDPi,τ(3)

where xi,j,τ (mi,j,τ) denotes the exports (imports) value of commodity j of country i in year τ, expressed in US dollars; and GDPi,τ denotes country i’s nominal GDP is US dollars in year τ.9

Using net exports to weight individual commodities ensures that that price variations of imported commodities (i.e., those for which xi,j,τxi,j,τ < 0) are taken into account. Many countries export non-energy commodities but import energy so generalized increases in commodity prices do not necessarily translate into improvements of their commodity terms of trade. Moreover, even in cases where net exports of a given commodity are positive, net exports can be significantly lower than gross exports, as reflected by the off-diagonal observations in Figure 2.

Figure 2:
Figure 2:

Gross versus Net Commodity Export Shares

(Average over 2000–15, percent)

Citation: IMF Working Papers 2019, 021; 10.5089/9781484393857.001.A001

Source: Authors’ calculations based on data from UN Comtrade.Note: The figure shows average gross versus net shares over 2000–15 for individual countries and commodities for which net exports are strictly positive over 2000–15 and the gross share is up to 30 percent.

What is the economic interpretation of fluctuations in the commodity terms of trade? Variations in the commodity terms-of-trade index provide an estimate of the windfall gains and losses of income associated with changes in international prices. That is, a one percentage point change in the commodity terms-of-trade index can be interpreted as a change in aggregate disposable income equivalent to one percentage point of GDP. It is, of course, a first-order approximation, as the construction of the index intentionally abstracts from the potential reaction of export and import volumes to the change in international prices.

4.1.1 Stylized facts

The average annual growth rate of commodity terms of trade in the sample—that is, across all countries over 1963–2018—is close to zero (0.3 percent). This reflects the offsetting effect of given price variations on exporters and importers and the numerous cycles in commodity prices over the sample. But the commodity terms of trade exhibits substantial variability across countries and over time. The distribution of annual growth rates of commodity terms of trade for the whole sample is shown in Figure 3, panel (a). The interquartile and interdecile ranges are 1.2 and 4.3 percentage points, respectively; the standard deviation is 4.2 percent—a large number considering that price variations are weighted by the net exports to GDP ratio. The distribution exhibits fat tails and is skewed to the right.

Figure 3:
Figure 3:

Annual Growth Rate of Commodity Terms of Trade

(Density)

Citation: IMF Working Papers 2019, 021; 10.5089/9781484393857.001.A001

Source: Authors’ calculations.Note: The commodity terms-of-trade series corresponds to xm_gdp in Table 3. Vertical dashed lines denote the 5th and 95th percentile of the annual growth rate of commodity terms of trade across all economies and years. Extreme variations (lower than the 1st percentile and larger than the 99th percentile across the whole sample) have been excluded. Commodity exporters are those where the share of net commodity exports in GDP, or the share of commodity exports in total exports of goods, averaged over 2000–15, is equal or larger than the 75th percentile of the sample distributions. AE = advanced economies. EMDE = emerging market and developing economies.

The distributions in panel (b) show that extreme commodity terms-of-trade growth rates are more prevalent for emerging market and developing economies than for advanced economies. Extreme growth rates are more prevalent for commodity exporters than for other economies (panel [c]), as expected. But the variability of commodity terms of trade is nonetheless large for non-commodity exporters (the standard deviation is 2.3 percent, versus 6.7 percent for commodity exporters).

The difference between commodity exporters and other economies is obviously starker in periods of large commodity price fluctuations. During the 2003–07 commodity price boom (Figure 3, panel [d]), commodity terms of trade increased on average by 2.9 percent per year among commodity exporters, while they declined by 0.5 percent per year on average for other economies. But it is also evident that there are significant differences in commodity terms-of-trade dynamics even among commodity exporters (as shown by the blue line in panel [d]).

This heterogeneity is underscored by examining the indices for selected economies. For instance, while the overall trend in the commodity terms-of-trade indices is similar, the magnitude of gains and losses are significantly different for the three metal exporters reported in Figure 4 (Australia, Chile, and Peru). This reflects differences in the specific metals they export (copper plays a predominant role in Chile and Peru, while Australia mainly exports iron ore); their net exports-to-GDP ratios; and the incidence of prices of commodities with negative net exports-to-GDP ratios (for instance, the decline in oil prices explains the larger improvement in Chile’s commodity terms-of-trade index in the late 1980s). The commodity terms-of-trade index often move in opposite direction for commodity exporters that belong to the same category. For instance, terms of trade deteriorated in Colombia during the oil price boom of the 1970s, while they soared for Iran and Venezuela. Instead, the indices of all three countries improved during the 2003–07 price boom, albeit at different rates. The indices of Argentina and Sri Lanka, both exporters of food and beverages, also moved in opposite direction in the early 2000s.

Figure 4:
Figure 4:

Commodity Terms of Trade—Selected Economies, 1970–2018

(Index, 2012 = 100)

Citation: IMF Working Papers 2019, 021; 10.5089/9781484393857.001.A001

Source: Authors’ calculations.Note: The commodity terms-of-trade series corresponds to xm_gdp in Table 3.

This evidence suggests that although commodity prices tend to comove, the correlation of commodity terms of trade across countries need not be large. This is confirmed by exploring the distribution of all pairwise correlations of the annual growth in commodity terms of trade. Figure 5, panel (a) shows a rather uniform distribution of pairwise correlations. Moreover, panel (b) shows that even when the sample is restricted to commodity exporters, the correlation is far from perfect. Indeed, there is a high incidence of pairwise correlations close to zero.

Figure 5:
Figure 5:

Cross-Country Correlation of Commodity Terms of Trade Growth Rates

(Density, average over 1963–2018)

Citation: IMF Working Papers 2019, 021; 10.5089/9781484393857.001.A001

Source: Authors’ calculations.Note: The commodity terms-of-trade series corresponds to xm_gdp in Table 3. Commodity exporters are those where the average share of net commodity exports in GDP, or the share of commodity exports in total exports of goods, in 2000–15 is equal or larger than the 75th percentile of the sample distributions.

4.1.2 Commodity terms of trade and macroeconomic outcomes

We then assess the relevance of fluctuations in commodity terms of trade for selected domestic macroeconomic outcomes, including real GDP, real domestic absorption, and real consumption.10 The effects of an improvement of the commodity terms of trade will likely depend on whether it reflects an increase in the price of a commodity the country exports or a decline in the price of a commodity it imports. In the former case, a rise in commodity prices could lead to an increase in aggregate output in the short term if there is slack in capacity utilization in the commodity sector and supply can react to the higher price. Over the medium term, installed capacity and output in the commodity sector is likely to expand in response to higher prices. Moreover, the higher export price is likely to trigger an increase in aggregate demand. Investment would increase in light of increased profitability. Aggregate consumption would also tend to increase.11 To the extent that the higher domestic demand partly falls on domestic goods, it would also lead to higher output. The effect of a decline in the price of commodity imports on demand should be qualitatively similar.

We estimate the cumulative response of each real macroeconomic aggregate over three years to a change in the commodity terms-of-trade index in a panel setting using Jordà (2005) local projection method:

yi,t+h1yi,t1=αh+β0hΔtoti,t+Σj=1JβjhΔtoti,tj+Σj=1JρjhΔyi,tj+μih+νth+ϵi,t+h,(4)

where yi,t denotes the natural logarithm of, alternatively, real GDP, real domestic absorption, and real consumption, in country i in year t12; tot denotes the natural logarithm of the terms-of-trade index; μi are country fixed effects; νt are time fixed effects; and εi,t+j is a random disturbance. We include three lags of ∆toti,j and ∆yi,t (i.e., J = 3).

This specification is estimated by ordinary least squares for each horizon h using data at annual frequency from an unbalanced panel between 1962 and 2014. Since the dependent variable is de-fined in cumulative terms—it measures cumulative growth between t —1 and t + h—the estimate of β0h is the cumulative impact of an innovation in the terms of trade on the real macroeconomic aggregate. Following Jorda et al. (2015), we use country-based cluster-robust standard errors to correct for potential serial correlation and heteroscedasticity.

The results are reported in Table 1, panel (a). The contemporaneous response of all three macro aggregates to a commodity terms-of-trade shock (β01) is indistinguishable from zero. However, the cumulative response of real domestic absorption and real consumption one year after the shock (β02) is positive and statistically significant, and the cumulative response after two years (β03) is significant for all three macro aggregates. Two years after a commodity terms-of-trade shock—equivalent to a change in aggregate disposable income of 1 percent of GDP—real GDP is on average 0.11 percent higher than in the absence of the shock. In the case of real domestic absorption, the cumulative response after two years is substantially larger, 0.32 percent; and it is about 0.25 percentage points in the case of real consumption.

Table 1:

Response of Macroeconomic Aggregates to Terms-of-Trade Shocks

article image
Source: Authors’ compilation.Notes: All regressions include country and time fixed effects, and three lags of the terms of trade and the dependent variable. Country-based cluster-robust standard errors are reported in parentheses. *** p <0.01, ** p <0.05, * p <0.1. tot is xm_gdp in panel (a) and the terms-of-trade series from the IMF World Economic Outlook database in panel (b). Real output, real domestic absorption and real consumption are from Penn World Tables, version 9.0 (series rgdpna, rdana, and rconna, respectively).

How do these results compare with using standard measures of terms of trade (that is, the over-all export-to-import price ratio)? To assess this, we replace tot in equation (4) with the terms-of-trade series from the IMF World Economic Outlook database. Before turning to the results, Figure 6 shows that there is substantial cross-country variability in the correlation, computed over non-overlapping five-year subperiods, between commodity and standard terms-of-trade series. The median correlation hovers around 0.5 but the interquartile range is about 0.8. While the correlation is close to 1 for about one tenth of the economies throughout the sample period, it is actually negative for about one fourth of the sample—end even lower than -.5 for about 10 percent of the sample economies.

Figure 6:
Figure 6:

Correlation of Commodity and Standard Terms-of-Trade indices

(Correlation coefficient)

Citation: IMF Working Papers 2019, 021; 10.5089/9781484393857.001.A001

Source: Authors’ calculations.Note: The figure shows the cross-country distribution of the rolling correlation between the country’s commodity terms-of-trade series (xm_gdp in Table 3) and the standard terms-of-trade index (from the IMF World Economic Outlook database). The horizontal line inside each box represents the median; the upper and lower edges of each box show the top and bottom quartiles; the vertical lines denote the range between the top and bottom deciles; and the circles denote the 1st and 99th percentile.
Table 2:

Granger Causality Tests—P-values

article image
Source: Authors’ compilation.Notes: The table reports the p-values of the Dumitrescu and Hurlin (2012) Granger non-causality test statistic (“Z” is the standardized statistic and “Z approx.” is the approximated standardized statistic, recommended for smaller samples). The null hypothesis is that GDP growth does not Granger-cause changes in commodity terms of trade. The alternative hypothesis is that GDP growth does Granger-cause changes in terms of trade for at least one economy in the panel. The number of lags are selected according to the Hannan-Quinn information criterion. Commodity exporters are those where the share of net commodity exports in GDP, or the share of commodity exports in total exports of goods, averaged over 2000–15, is equal or larger than the 75th percentile of the sample distributions. Large countries are those in the upper quintile in terms of GDP in US dollars, and market-dominant countries are those with a global market share of 20 percent or more in any commodity market (average over 2000–15 in both cases). AE = advanced economies. EMDE = emerging market and developing economies.
Table 3:

Weights of Alternative Commodity Price Indices

article image
Note: Xi,j,τ(mi,j,τ) denote the exports (imports) value of commodity j by country i in year τ, expressed in US dollars; GDPi,τ denotes country i’s nominal GDP is US dollars in year τ.

The estimation results are reported in Table 1, panel (b). The cumulative response of all three macroeconomic aggregates to a change in the standard terms-of-trade series is indistinguishable from zero at all horizons—except for domestic absorption, which is statistically significant two years after the shock at the 10 percent confidence level. This could reflect that a given external shock may induce different reactions in export and import prices across countries depending, for instance, on whether goods are priced in the producer’s currency or in local currency, and the degree of price rigidity.13

4.1.3 The exogenous price assumption

Many studies take fluctuations in the terms of trade as exogenous, relying on a small open economy assumption as a rationale for individual countries being price takers in international markets. Mendoza (1995) and Broda (2004) show evidence that, in the case of standard terms-of-trade measures, this is a reasonable assumption for many countries. Here we present additional evidence suggesting that our commodity terms-of-trade index can typically be considered exogenous from the perspective of individual countries.

If monopoly power depends on the market share of the exported good, a natural starting point is to explore in which commodity markets a large fraction of world exports is accounted for a few countries. We first compute, for each commodity, the global market share of each country—that is, the country’s exports as a share of the sum of exports by all countries—averaged over 2000–15. In Figure 7 we report the largest ten market shares within each of the following commodity categories: energy, metals, food and beverages, and agricultural raw materials. The results indicate that the market share of individual countries is larger than 40 percent in only a few food commodities: palm oil (Malaysia), soybeans (US), corn (US), olive oil (Spain), and soybeans oil (Argentina). The production of food commodities is typically not very concentrated, so even if some countries account for a large share of world exports, it is hard to argue that there is monopolistic power in those markets. Still, domestic supply shocks in those countries could arguably affect international prices and thus their own commodity terms of trade. However, these exports typically account for only a relatively small fraction of overall commodity exports in these countries. So even if supply shocks do affect world prices, the effect of these shocks on their commodity terms of trade may be negligible. The situation is similar for agricultural raw materials, where global market shares are even lower.

Figure 7:
Figure 7:

Market Share of Individual Countries in World Commodity Markets

(Percent)

Citation: IMF Working Papers 2019, 021; 10.5089/9781484393857.001.A001

Source: Authors’ calculations based on data from UN Comtrade.Note: The figure shows the average global market share over 2000–15—defined as the share of country exports in total world exports—for the 10 country-commodity pairs with largest market shares within each category. It also shows the share of exports of each commodity in the country’s total commodity exports and total exports of goods.

In the case of metals, exports of copper by Chile and Uranium by Niger account for a large share of their total commodity exports, and their global market share is 20 and 30 percent respectively. Within energy commodities, Australia accounts for about 30 percent of global exports of coal—which accounts for about 20 percent of Australia’s total commodity exports. In the case of crude oil and natural gas, individual market shares are substantially lower—the largest market shares are between 15 and 18 percent—although exports oil or natural gas do account for a large share of total commodity exports in a few cases (Qatar, Saudi Arabia, and Russia).

All in all, there is only a handful of countries that have a dominant share in the global market of a given commodity and where, at the same time, that commodity accounts for a large share of the country’s total commodity exports.

We complement this evidence by studying statistical causality between output (real GDP) and commodity terms of trade. Table 2 shows results of Dumitrescu and Hurlin (2012) Granger causality tests for different groups of economies over 1970–2014.14 The null hypothesis of the test is that domestic output growth does not Granger-cause changes in commodity terms of trade. The lowest p-value is found for the group of countries that are either large (in the upper quintile in terms of aggregate GDP in market US dollars) or have a dominant position in any commodity market (the global market share is 20 percent or higher). This is expected as in these cases domestic developments could influence international prices and thus the country commodity terms of trade. But still the test does not allow to reject with confidence the hypothesis of Granger non-causality—the p-value for the adjusted statistic is 0.14. The large p-values found across groups support the view that that country-specific commodity terms-of-trade indices are largely determined in world markets and can be taken as exogenous from the perspective of individual countries—an approach widely adopted in the literature (see, for instance, Kose, 2002; Raddatz, 2007; Aghion et al., 2010; Aizenman et al., 2012; and Fernàndez et al., 2017).

4.2 Alternative commodity price indices

The database also includes additional country-specific commodity price indices that may be of interest for alternative questions. They differ on (i) whether exports and imports of individual commodities are weighted by overall commodity trade or output (as in the case of the commodity terms-of-trade index discussed in the previous section); and (ii) which country-commodity trade flow are considered (that is, only exports, only imports, or net exports). The commodity weights of the alternative series (that is, ωi,j,τ in equation [2]) are defined in Table 3.

Regarding the first distinction, weighting individual commodity trade flows by overall commodity trade (rather than by output) is similar to what is done in standard price indices.15 However, this approach does not take into account the difference in the overall importance of commodities across countries, which is often a desired feature. For instance, Collier and Goderis (2012) multiply the their commodity export price index by the share of aggregate commodity exports in GDP in order to allow the effect of commodity export prices to be larger for countries with larger exports. Figure 8 shows that, indeed, countries that face similar variations in commodity prices (as captured by the terms-of-trade index xm, in which individual commodity prices are weighed by the relevance in overall commodity trade) can experience very different windfall gains or losses (as captured by the commodity terms-of-trade index xm_gdp discussed in Section 4.1). For instance, the United Sates faced a larger drop in xm over 2001–07 than Ukraine, but looking at the evolution of xm_gdp reveals the latter registered much larger losses in disposable income. The average increase in xm during that period was larger in Argentina than in Indonesia, but the associated windfall gains were somewhat smaller.

Figure 8:
Figure 8:

Alternative Commodity Terms-of-Trade Indices, Selected Countries

(Average annual growth rate over 2001–07, percent)

Citation: IMF Working Papers 2019, 021; 10.5089/9781484393857.001.A001

Source: Authors’ calculations.Note: xm (xm_gdp) is the commodity terms-of-trade index in which net exports of individual commodities are weighted by total commodity trade (weighted by output), as specified in Table 3.

While commodity terms-of-trade indices received significant attention in the literature, other in-dices based only on exports or imports have also been used for a wide range of questions. For instance, Deaton and Miller (1996), Dehn (2000), and Collier and Goderis (2012) study the impor-tance of country-specific commodity export price indices for aggregate growth; Cashin et al. (2004) assess their influence on real exchange rate dynamics; and Magud and Sosa (2017) document their importance for firms’ investment dynamics. Price indices based on only exports or imports can differ significantly from commodity terms-of-trade series, so their relevance will depend on the specific question at hand. To illustrate this point, Figure 9 shows the evolution of commodity export, import, and terms-of-trade indices for Argentina and Uruguay between January 2007 and July 2008. The figure shows that while the export price index improved in both countries as food commodity prices increased, their commodity terms-of-trade indices moved in opposite directions. The main reason is the influence of commodity import prices, as the oil trade balance was negative and large in Uruguay and positive in Argentina.

Figure 9:
Figure 9:

Alternative Commodity Price Indices, Selected Countries

(Index, January 2007 = 100)

Citation: IMF Working Papers 2019, 021; 10.5089/9781484393857.001.A001

Source: Authors’ calculations.Note: The alternative commodity price indices are defined in Table 3. RHS = right hand scale.

Indeed, improvements in commodity export prices do not necessarily translate into rising terms of trade. Figure 10 shows the cross-country distribution of the correlation between the annual growth rate of the export price index (x) and the net export price index (xm) over 1963–2018. While there is a substantial number of countries with a high correlation between the evolution of gross and net export price indices, the share of countries with a negative correlation is not negligible.

Figure 10:
Figure 10:

Correlation between Growth Rate of Commodity Export and Terms-of-Trade Indices

(Density, average over 1963–2018)

Citation: IMF Working Papers 2019, 021; 10.5089/9781484393857.001.A001

Source: Authors’ calculations.Note: x (xm) is the commodity export (net export) price index as defined in Table 3.

4.3 Time-varying and fixed weights

A common approach for constructing country-specific commodity price indices since the work of Deaton and Miller (1996) is to use commodity weights based on average trade flows over a few years (e.g., Aghion et al., 2010; Ricci et al., 2013). A key advantage of this approach is that the index is invariant to changes in import and export volumes in response to commodity price fluctuations, ensuring it is exogenous to domestic developments.

A limitation of this approach, however, is that the weights are likely to misrepresent the relevance of individual commodities at some point along the sample. The mix of traded commodities and the overall importance of net commodity exports in output can change significantly over time. Indices based on fixed weights can thus provide a poor approximation of the role of commodity prices during periods in which the relevance of individual commodities is very different from that in the reference period.

To illustrate this point, Figure 11 shows the share of net exports in GDP, and the share of exports in total commodity exports, for selected commodities and countries over 1970–2015. It confirms that the importance of specific commodities can vary substantially over time. In the case of Equatorial Guinea, for instance, cocoa was the main exported commodity in the 1970s and 1980s—with net exports exceeding 40 percent of GDP in some years—and the country was a net oil importer. By the early 2000s, however, oil accounted for the lion’s share of its commodity exports, exceeding 90 percent of total commodity exports in some years. The oil trade balance also switched signs over time in the case of Indonesia and the UK. Net exports of coal were substantial in Mongolia in the 2000s, exceeding 16 percent of GDP in 2011, but were insignificant before 2004. Any weighting scheme based on trade flows before 2004 would significantly understate the effect of international coal prices for Mongolia’s terms of trade over the past few years.

Figure 11:
Figure 11:

Weight of Individual Commodities for Selected Countries, 1970–2015

(Percent)

Citation: IMF Working Papers 2019, 021; 10.5089/9781484393857.001.A001

Source: Authors’ calculations based on data from UN Comtrade.Notes: The figures show the time series of commodity weights of indices xm_gdp (blue area, left scale) and x (red line, right scale), as defined in Table 3, for selected countries and commodities.

Figure 12 shows the variability over time at the country level in the share of individual commodities in total commodity trade based on annual data since the 1960s. The variability is very different across commodities, and typically larger for export shares than for import shares. The variability in import shares is notably high in the case of oil—the standard deviation of the share of oil in commodity imports is between about 10 and 20 percentage points for half of the economies in the sample—but it is also high for some food commodities (such as wheat and rice).

Figure 12:
Figure 12:

Variability in Share of Selected Commodities, 1962–2015

(Standard deviation of share in total commodity exports and imports, percentage points)

Citation: IMF Working Papers 2019, 021; 10.5089/9781484393857.001.A001

Source: Authors’ calculations based on data from UN Comtrade.Note: The figure shows the cross-country distribution of the standard deviation of the annual share of selected commodities in total commodity exports (imports) over 1962–2015. The horizontal line inside each box represents the median; the upper and lower edges of each box show the top and bottom quartiles; and the vertical lines denote the range between the top and bottom deciles.

As the suitability of using fixed or time-varying weights may depend on the specific question, we construct all indices using, alternatively, (i) time-invariant weights—based on average trade flows and output over 1980–2015; and (ii) time-varying weights (as in equation [2]).16 In the latter and similarly to Gruss (2014), the weights are based on three-year rolling averages of trade values and output to smooth fluctuations. The weights are also lagged and thus predetermined to price fluctuations, so that changes in index reflect variation in international prices rather than endogenous changes in export or import volumes.

Figure 13 shows the commodity terms of trade over 1980–2018 for selected countries using rolling weights, fixed weights using average trade and output over 1980–83, and fixed weights using average trade and output over a longer period, 1980–2015. There are substantial differences across series, even in the direction of movements in some periods. Take, for instance, the period since mid-2014, characterized by a collapse in commodity prices followed by a partial recovery. The indices of Colombia and the UK using rolling weights and fixed weights based on 1980–83 data move in opposite directions. The index based on weights computed over 1980–83 suggests that Colombia experienced an improvement in its terms of trade when oil prices collapsed in 2014; and that the UK registered a deterioration in its terms of trade. The index based on lagged rolling weights shows the opposite: Colombia registered a negative shock equivalent to a loss in aggregate disposable income of more than 6 percent of GDP, while the UK registered windfall gains of about 1 percent of GDP. The reasons is that Colombia was a net oil importer and the UK a net oil exporter in the early 1980s, but that situation reverted later.

Figure 13:
Figure 13:

Commodity Terms-of-Trade Indices Based on Alternative Weights—Selected Countries

(Index, June 2012 = 100)

Citation: IMF Working Papers 2019, 021; 10.5089/9781484393857.001.A001

Source: Authors’ calculations.Note: The figures show the commodity terms of trade (series xm_gdp in Table 3) constructed using alternative weights. Data for Germany before 1990 correspond to West Germany (see Annex A).

Using only four years to construct fixed weights may provide an unfair comparison. But the index based on average trade flows over 1980–2015 still suggests that the UK registered a negative terms-of-trade shock in 2014. In the case of Colombia, this index comoves with the rolling weights index since 2014—although the magnitudes of the windfall income losses and subsequent gains are different. But the indices moved in opposite directions in other periods, such as between 1980 and 1985.

A more general characterization of the potential differences between alternative weighting schemes is shown in Figure 14. It shows the cross-country distribution of the correlation between the commodity terms-of-trade series at the monthly frequency based on rolling and fixed weights, computed over non-overlapping three-year windows. The results in panel (a) show that the correlation between the rolling and fixed weight series declines for a substantial share of countries in subperiods that are further away from the 1980–83 reference period. While the correlation is about 0.9 or higher for three-fourths of the countries in the sample in the first three windows, the correlation is 0.5 or less for one-fourth of the countries in 2004–06 and 2010–12, and even negative for one-tenth of the countries.

Figure 14:
Figure 14:

Correlation of Commodity Terms-of-Trade Indices Based on Alternative Weights

(Correlation coefficient)

Citation: IMF Working Papers 2019, 021; 10.5089/9781484393857.001.A001

Source: Authors’ calculations.Note: The figure shows the cross-country distribution of the rolling correlation between the country’s commodity terms-of-trade series (xm_gdp in Table 3) constructed using alternative weights. The horizontal line inside each box represents the median; the upper and lower edges of each box show the top and bottom quartiles; the vertical lines denote the range between the top and bottom deciles; and the circles denote the first percentile.

The correlation between the rolling- and fixed-weights series is higher when average trade flows over a longer period are used (panel [b]). But even then, there is a substantial share of countries for which the correlation is relatively low in some subperiods. For instance, the correlation is lower than 0.5 for about one-tenth of countries between 1980 and 1994. And the correlation is negative throughout 1980–2015 for one percent of the countries in the sample.

5 Concluding Remarks

This paper presents a new database of country-specific commodity price indices for 182 economies spanning over 1962–2018. The database includes a commodity terms-of-trade series that weights the change in the international price of up to 45 individual commodities by using trade data at the country-commodity level. The weight of each commodity is given by the share of net exports in aggregate output, so fluctuations in the commodity terms-of-trade index provide an estimate of the windfall gains and losses associated with changes in world prices. We show that commodity terms-of-trade shocks influence key macroeconomic aggregates in a broad panel of economies, and provide evidence suggesting that they can reasonably be considered exogenous from the point of view of individual countries.

Our database also includes a rich set of alternative country-specific commodity price indices that differ on (i) which country-commodity trade flows—exports, imports, or net exports—are used to weight individual commodities; (ii) whether these trade flows are scaled by overall commodity trade or by output; and (iii) whether the weights are time varying or invariant. The different indices provide versatility to tackle a wider set of research questions. For instance, as the mix of commodities traded and the overall importance of commodities in trade and output vary significantly over time, indices based on fixed weights can often provide an inaccurate picture of the relevance of commodity price shocks in empirical exercises spanning over several decades.

The comprehensive nature of our database should encourage research on the impact of international prices. The rich set of country-specific commodity price indices constructed under alternative methodologies should facilitate the analysis of a wide range of analytical questions including, for instance, the influence of world prices on aggregate growth and development, business cycle fluctuations, and credit and asset price cycles, as well as on the role of macroeconomic policies in attenuating the effect of external shocks. Moreover, its global coverage should improve our ability to study the influence of world prices within less developed countries.

References

  • Aghion, Philippe, George-Marios Angeletos, Abhijit Banerjee, and Kalina Manova (2010). “Volatility and growth: Credit constraints and the composition of investment”. In: Journal of Monetary Economics 57.3, pp. 246265.

    • Search Google Scholar
    • Export Citation
  • Aizenman, Joshua, Sebastian Edwards, and Daniel Riera-Crichton (2012). “Adjustment patterns to commodity terms of trade shocks: the role of exchange rate and international reserves policies”. In: Journal of International Money and Finance 31.8, pp. 19902016.

    • Search Google Scholar
    • Export Citation
  • Broda, Christian (2004). “Terms of trade and exchange rate regimes in developing countries”. In: Journal of International economics 63.1, pp. 3158.

    • Search Google Scholar
    • Export Citation
  • Cashin, Paul, Luis F Céspedes, and Ratna Sahay (2004). “Commodity currencies and the real exchange rate”. In: Journal of Development Economics 75.1, pp. 239268.

    • Search Google Scholar
    • Export Citation
  • Cashin, Paul, C John McDermott, and Alasdair Scott (2002). “Booms and slumps in world commodity prices”. In: Journal of Development Economics 69.1, pp. 277296.

    • Search Google Scholar
    • Export Citation
  • Céspedes, Luis Felipe and Andrés Velasco (2012). “Macroeconomic performance during commodity price booms and busts”. In: IMF Economic Review 60.4, pp. 570599.

    • Search Google Scholar
    • Export Citation
  • Chen, Yu-chin and Kenneth Rogoff (2003). “Commodity currencies”. In: Journal of International Economics 60.1, pp. 133160.

  • Collier, Paul and Benedikt Goderis (2012). “Commodity prices and growth: An empirical investigation”. In: European Economic Review 56.6, pp. 12411260.

    • Search Google Scholar
    • Export Citation
  • De Gregorio, José and Felipe Labbé (2011). “Copper, the real exchange rate and macroeconomic fluctuations in Chile”. In: Banco Central de Chile, Documentos de Trabajo No. 640.

    • Search Google Scholar
    • Export Citation
  • Deaton, A and R Miller (1996). “International Commodity Prices, Macroeconomic Performance and Politics in Sub-Saharan Africa”. In: Journal of African Economies 5.3, pp. 99191.

    • Search Google Scholar
    • Export Citation
  • Dehn, Jan (2000). “The effects on growth of commodity price uncertainty and shocks”. In: The World Bank Policy Research Working Paper 2455.

    • Search Google Scholar
    • Export Citation
  • Dumitrescu, Elena-Ivona and Christophe Hurlin (2012). “Testing for Granger non-causality in heterogeneous panels”. In: Economic Modelling 29.4, pp. 14501460.

    • Search Google Scholar
    • Export Citation
  • Erten, Bilge and José Antonio Ocampo (2013). “Super cycles of commodity prices since the mid-nineteenth century”. In: World Development 44, pp. 1430.

    • Search Google Scholar
    • Export Citation
  • Fernàndez, Andrés, Stephanie Schmitt-Grohe, and Martın Uribe (2017). “World shocks, world prices, and business cycles: An empirical investigation”. In: Journal of International Economics 108, S2S14.

    • Search Google Scholar
    • Export Citation
  • Gruss, Bertrand (2014). “After the boom–Commodity prices and economic growth in Latin America and the Caribbean”. In: International Monetary Fund Working Paper 14/154.

    • Search Google Scholar
    • Export Citation
  • Izquierdo, Alejandro, Randall Romero, and Ernesto Talvi (2008). “Booms and Busts in Latin America: The Role of External Factors”. In: Inter-American Development Bank Working Paper 532.

    • Search Google Scholar
    • Export Citation
  • Jordà, Òscar (2005). “Estimation and Inference of Impulse Responses by Local Projections”. In: The American Economic Review 95.1, pp. 161182.

    • Search Google Scholar
    • Export Citation
  • Jordà, Òscar, Moritz Schularick, and Alan M Taylor (2015). “Betting the house”. In: Journal of International Economics 96, S2S18.

    • Search Google Scholar
    • Export Citation
  • Kose, M Ayhan (2002). “Explaining business cycles in small open economies:’How much do world prices matter?’” In: Journal of International Economics 56.2, pp. 299327.

    • Search Google Scholar
    • Export Citation
  • Magud, Nicolás E and Sebastian Sosa (2017). “Corporate Investment in Emerging Markets: The Role of Commodity Prices”. In: Economía 18.1, pp. 157195.

    • Search Google Scholar
    • Export Citation
  • Mendoza, Enrique G (1995). “The terms of trade, the real exchange rate, and economic fluctuations”. In: International Economic Review, pp. 101137.

    • Search Google Scholar
    • Export Citation
  • Raddatz, Claudio (2007). “Are external shocks responsible for the instability of output in low-income countries?” In: Journal of Development Economics 84.1, pp. 155187.

    • Search Google Scholar
    • Export Citation
  • Ricci, Luca Antonio, Gian Maria Milesi-Ferretti, and Jaewoo Lee (2013). “Real exchange rates and fundamentals: a cross-country perspective”. In: Journal of Money, Credit and Banking 45.5, pp. 845865.

    • Search Google Scholar
    • Export Citation
  • Schmitt-Grohé, Stephanie and Martın Uribe (2018). “How Important are Terms-Of-Trade Shocks?” In: International Economic Review 59.1, pp. 85111.

    • Search Google Scholar
    • Export Citation
  • Spatafora, Nikola and Irina Tytell (2009). “Commodity Terms of Trade: The History of Booms and Busts”. In: International Monetary Fund Working Paper 09/205.

    • Search Google Scholar
    • Export Citation

Appendix A. Data

Table A1:

Sample of Economies

article image
article image
article image
Source: Authors’ compilation.Note: Income classifications are according to the IMF World Economic Outlook database and as of October 2018.

Procedure to Address Trade Data Gaps

We follow a multipronged approach to address trade data gaps. We first distinguish gaps due to missing data at the beginning or at the end of the sample period from reporting gaps at the middle of the sample period, and by their length. We then use bilateral trade data at the commodity level to infer the reporting country missing export and import values using those reporter by its trading partners. The procedure is as follows:17

  • Extended data gaps – Export (import) values of each commodity j by country i, for which data are unavailable for 30 or more years between 1962 and 2015, are set equal to the sum of imports (exports) from (to) country i as reported across all trading partners p ≠ i.

  • Gaps at the beginning of the sample18 – For each commodity j that is of primary importance for country i—defined as those that account for 20 percent or more of the reporter country’s commodity exports/imports—we use the variation in trade flows reported by all trading partner p ≠ i to extrapolate backward the country i’s export and import values of commodity j between 1970 and the first year in which country i’s data are available. For other commodities, country i’s trade flows are set equal to those reported across all its trading partners—as described above for extended data gaps. Since the availability of trading partner data is arguably more limited during the 1960s (as shown in Figure 1) data gaps between 1962 and 1970 are filled by extrapolating trade flows backward such that the share of each trade flow in output are constant.

  • Intermediate gaps of up to four years – For gaps of up to fours years at the middle of the sample—that is, when the country does report trade data before and after the data gap—exports and imports of each commodity are computed by linearly interpolating the values in years adjacent to the data gap.

  • Intermediate gaps of more than four years – For gaps in country i of more than four years we use the variation in trade flows reported by all trading partner p ≠ i to infer country i’s export and import values of commodity j during the period with missing data. Bilateral trade flows reported by a country and its trading partners often differ. To ensure that using data reported by trading partners does not introduce breaks in trade values, the trade flows reported by trading partners are thus adjusted such that the cumulative variation over the gap period matches that from the reporter country. The value of exports of commodity j by country i in year t ∈ gap are computed recursively using:
    Δxi,j,t=ΔMi,j,t|ΔMi,j,t|Σtgap|ΔMi,j,t.(ΔgapMi,jΔgapxi,j),withtgap(5)

    where Xi,j,t are exports of commodity j at time t from country i to all trading partners (as reporter by country i); ∆ denotes first differences; gap denotes the cumulative change during the gap period; and . Mi,j,t=Σp=1Pmi,p,j,t is the sum of imports of commodity j at time t by all trading countries p ≠ i from country i (as reported by countries p). The same procedure is applied to imports.

  • Gaps at the end of the sample – For gaps of more than four years, export and import values for each commodity by country i are extrapolated using the change in sum of bilateral trade flows reported by all trading partners p ≠ i. For gaps of up to four years, exports and imports of each commodity are extrapolated such that the share of each trade flow in output remains constant.

Additional Country Notes

Belgium and Luxembourg—Trade for Belgium and Luxemburg in Comtrade are reported jointly under Belgium-Luxemburg (ISO code BLX) up to 1998. The indices reported in this database for Belgium and Luxemburg are thus based on trade data starting in 1999.

Croatia, Slovenia, Macedonia, and Bosnia and Herzegovina—The indices of Croatia, Slovenia, Macedonia, and Bosnia and Herzegovina start after the breakup of Yugoslavia—in 1996 in the case of Bosnia and Herzegovina and in 1992 in the other three countries.

Czech Republic and the Slovak Republic—The indices of the Czech Republic and the Slovak Republic start after the dissolution of Czechoslovakia—starting in 1995 and 1993, respectively.

Ethiopia and Eritrea–The indices for independent Eritrea start in 1993. The pre-1993 data for Ethiopia (reported under ISO code ETF in Comtrade data) is combined with its post-1993 data (reported under ISO code ETH in Comtrade data) to construct the indices that are reported under ISO code ETH in this database.

Former Soviet Union economies—The initial year of indices for the former Soviet Union economies varies slightly, as indicated in the list below, depending on trade and output data availability.

article image

Germany—Comtrade data reported under ISO code DEU before 1990 correspond to West Germany and to reunified Germany thereafter.

Serbia and Montenegro—Comtrade data on Serbia and Montenegro presents a break in 2006 when Montenegro became independent. The pre-2006 data reported under ISO code SCG is combined with the data reported under ISO code SRB from 2006 onward to construct the indices for Serbia (reported under ISO code SRB). The series for Montenegro start in 2006 and are reported under ISO code MNE.

Sudan—Comtrade data on Sudan presents a break in 2012 as South Sudan became independent in 2011. The pre-2012 data reported under ISO code SDN is combined with the data reported under ISO code SUD from 2012 onward to construct the indices that are reported under ISO code SDN in this database.

Yemen—The indices of Yemen start in 1990. Data of North and South Yemen preceding the unification are discarded.

Table A2:

List of Commodities and Price Sources

article image
Source: IMF Primary Commodity Prices database; and authors’ compilation.
Table A3:

Gaps in Trade Data

article image
article image
article image
Source: Authors’ compilation.
*

This paper is part of a research project on macroeconomic policy in low-income countries and is supported by the United Kingdom’s Department for International Development (DFID). The views expressed herein are those of the authors and should not be attributed to the IMF, its Executive Board, or its management, or to DFID. We are grateful to Yan Carriere-Swallow, Oya Celasun, Francesco Grigoli, Genevieve Lindow, Nicolás Magud, Chris Papageorgiou, and Andrea Pescatori, for helpful discussions. Carlos Rondon provided excellent research assistance in the early stages of this project. Any errors are our own. The database presented in this paper is available at https://www.imf.org/external/np/res/commod/index.aspx.

International Monetary Fund, bgruss@imf.org.

International Monetary Fund, skebhaj@imf.org.

1

The database is presented at the monthly frequency, starting in 1980, and at the annual frequency, going back to 1962—the latter is based on 40 commodity prices due to more restricted data availability.

2

The set of countries we consider includes all economies in the IMF World Economic Outlook database that have trade data in the UN Comtrade database, either as reporting or as trading country. See Annex A for country coverage.

3

Using an international manufacturing trade price index as deflator is standard in the literature (e.g., Deaton and Miller, 1996, Spatafora and Tytell, 2009, Collier and Goderis, 2012, and Erten and Ocampo, 2013). It is preferred to the alternative of using consumer price indices from major economies, as these also include nontradables which may distort price trends.

4

The monthly (annual) database corresponds to files ctot_fm and ctot_rm (ctot_fa and ctot_ra) in the online material accompanying this paper. The annual database excludes gold, olive oil, pork, rape-seed oil, and uranium, due to data availability. In the case of olive oil, pork, rapeseed oil, and uranium, the binding constrain is the availability of international prices. In the case of gold, the limitation is trade data since exports and imports of non-monetary gold are not reported in Comtrade SITC Rev 1 data (see https://unstats.un.org/unsd/tradekb/Knowledgebase/50673/NonMonetary-Gold-in-Trade-Classifications-SITC-HS). Trade flows of gold used to weight prices in the monthly database starting in 1980 are from Comtrade SITC Rev 2 data.

5

The spike in missing data in Figure 1 towards the end of the sample is due to delays in reporting by some countries. In those cases, trade flows at the end of the sample are assumed to evolve such that the share of individual commodities in total commodity trade and output remain constant (see Annex A).

6

The weights of individual commodities in total commodity exports or imports computed using a country’s data are highly correlated with those obtained using its trading partners’ data, lending support to this methodological approach. For instance, considering the five commodities with largest export shares over 2000–10, the median correlation between export shares based on reporting and trading partner data across all countries and commodities is 0.92. The corresponding median correlation for import shares is 0.77.

7

Trade flows for all commodities with the exception of oil are constructed by aggregating SITC 5-digit headings. In the case of oil the data are directly downloaded at a higher level of aggregation (3 digits) as, otherwise, overall oil trade flows can be understated for some country-periods.

8

Price variations over the first three years of the sample are weighted using average trade flows over those years rather than lagged flows.

9

Note that, differently from standard measures of the terms of trade, the sum of weights is not constrained to be one and, moreover, can be positive or negative. In a standard terms-of-trade index, if export and import prices increase by the same magnitude, they would cancel out and the index remain unchanged. In the commodity terms-of-trade index, instead, this would not happen—unless commodity trade is balanced.

10

See, for instance, Mendoza (1995), Kose (2002), Izquierdo et al. (2008), De Gregorio and Labbé (2011), Céspedes and Velasco (2012), Schmitt-Grohé and Uribe (2018), and Fernández et al. (2017), for studies on the relevance of terms of trade or world prices for domestic activity.

11

The reaction of consumption will depend on the nature of the commodity sector and its ownership structure. It is likely to be weaker when production is concentrated in a small number of firms—which is common in the mining and energy sectors—than when ownership is spread among a large number of atomistic producers—as is common in the case of agricultural commodities. It will also depend on whether the price change is deemed to be permanent or transitory. If it is considered to be purely transitory, the windfall income gain would tend to be saved rather than spent, with a lesser effect on aggregate demand and output.

12

Real GDP, real domestic absorption, and real consumption series are from Penn World Table version 9.0 (series rgdpna, rdana, and rconna, respectively).

13

Another difference between commodity and standard terms-of-trade series is that the former implicitly controls by trade openness—since in xm_gdp each commodity is weighed by its net exports over GDP. However, additional estimates not reported here show that the relationship with macro aggregates is also positive and statistically significant when commodity price variations are weighted by the relevance of each commodity in overall commodity trade, as in series xm described in Section 4.2 and in Table 3.

18

The test is performed on balanced panels that include, in total, 113 economies. An alternative is to test Granger causality between exports or imports and commodity terms of trade. But data on real exports and imports over 1970–2014 are available for fewer countries.

19

In the case of commodity export and import indices—series x and m in Table 3, respectively—individual weights add up to one, similarly to standard price indices. This is not the case in the xm series (as net exports are weighted by the sum of aggregate commodity exports and imports) nor in any of the series in which individual commodity flows weighted by output (series X_gdp, m_gdp, and xrri_gdp)

16

The database based on time-varying (time-invariant) weights corresponds to files ctot_rm and ctot_ra (ctot_fm and ctot_fa) in the online material accompanying this paper.

17

A well-known feature of trade data is that trade flows form reporter and partner countries generally do not match. The approach followed attempts to use as much as possible the information reported by the country, using trading partner data only to approximate the variability of trade flows during years with missing data—rather than simply using the data reported by trading partners. When changes in exports/imports by trading countries are used to extend trade flows of the reported country, they need to be re-scaled accordingly so that the trend is preserved.

18

If the first 20 years of data are missing for reporter country i, trade flows reported by all its trading partners p ≠ i are used instead—as it is the case with extended data gaps.

Commodity Terms of Trade: A New Database