represented as U.S. dollars per metric ton. All prices are converted into real terms by using the U.S. consumer price index obtained from the Bureau of Economic Analysis. World oil production, obtained from the International Energy Agency, is measured as millions of barrels. Figure 1 plots the growth of oil price and production over the period 1992-2022.

Country-specific real GDP series are obtained from Haver Analytics or International Financial Statistics (International Monetary Fund), and are measured in billions of U.S. dollars, at 2010 prices and exchange rates. Current account balances (as percentage of GDP) are calculated using net current account balances data (excluding exceptional financing) from the International Financial Statistics database in U.S. dollars and gross domestic product data in U.S. dollars (from Haver Analytics). Country-specific real effective exchange rates are obtained from the World Bank.

Since we would like to distinguish between the effects of energy price shocks on current account balances of commodity exporters and commodity importers within EMDEs, we identify countries as oil exporters or oil importers by using the World Bank criteria. Specifically, a country is classified as an oil exporter when, on average in 2017-19, exports of crude oil accounted for about 20 percent or more of total exports. Countries for which this threshold is met because of re-exports are excluded.<sup>8</sup> When data are not available, judgment is used. Other countries are considered as oil importers. Natural gas exporters are identified as those having natural gas exports account for at least 5 percent of their total exports based on data obtained from the United Nations Comtrade database; other countries are considered as natural gas importers. Similarly, coal exporters are identified as those having coal exports account for at least 5 percent of their total exports based on data obtained from the United Nations Comtrade database; other countries are considered as coal importers.

Current account surplus countries are identified as those having a positive median current account balance over the sample period; other countries are considered as current account deficit countries. Countries with larger service sectors are identified as those in which the service sector as percentages of GDP (obtained from the World Bank) over the sample period (measured by the median over time) is larger than the median country; other countries are considered as those with smaller service sectors. Countries with more capital account openness are identified as those having capital account openness (obtained from the Chinn-Ito index) over the sample period (measured by the median over time) higher than that of the median country; other countries are considered as those with less capital account openness.

Based on this database, current account balances (as percentages of GDP) are shown for different country groups of EMDEs in Figure 2. Three stylized facts stand out. First, oil exporters and gas exporters have historically higher current account surpluses compared to oil importers and gas importers, respectively, whereas there is no significant difference between current account balances of coal exporters and coal importers. Second, larger service-sector sizes are associated with current account deficits, whereas countries with smaller service-sector sizes can have positive or negative current account balances. Finally, current account deficits are more prevalent in countries with more open capital accounts compared to countries with less open capital accounts. Although these descriptive statistics provide evidence on the pattern of current account balances of certain country groups, they are silent about the effects of energy price shocks on current account balances, which we focus on next.

> 8 Note that this taxonomy results in the classification of some well-diversified economies as importers, even if they are exporters of oil.

10