{'fraction_non_alphanumeric': 0.031643637977914654, 'fraction_numerical': 0.012901614782753455, 'mean_word_length': 4.683144118574583, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
THE US-CHINA TRADE WAR AND GLOBAL REALLOCATIONS

We study global trade responses to the US-China trade war. We estimate the tariff impacts on product-level exports to the US, China, and rest of world. On average, countries decreased exports to China and increased exports to the US and rest of world. Most countries export products that complement the US and substitute China, and a subset operate along downward-sloping supplies. Heterogeneity in responses, rather than specialization, drives export variation across countries. Surprisingly, global trade increased in the products targeted by tariffs. Thus, despite ending the trend towards tariff reductions, the trade war did not halt global trade growth.


Introduction
In 2018 and 2019, the world's two largest economies-the US and China-engaged in a trade war, mutually escalating tariffs that ultimately covered about $450 billion in trade flows. The US also imposed tariff increases on steel and aluminum imports from nearly all countries, and China cut its tariffs across sectors for all countries except the US. These policies upended a decades-long trend toward reducing global trade barriers, with many of the escalated tariffs persisting beyond 2021.
A recent body of work has studied the impacts of the trade war on the US and China, showing that the trade war reduced trade between these countries. In this paper, we shift attention to patterns of trade reallocation across the world. How did the trade war affect the exports of "bystander" countries? Studying the export responses to the trade war of countries other than the US and China provide an opportunity to uncover the economic forces that shape global trade.
A natural hypothesis is that some countries had the good fortune to specialize in products targeted by the trade war, and thus benefited from US and Chinese substitution into those countries' exports. Alternatively, countries with similar comparative advantages across products could have responded differently. On the demand side, buyers may perceive some origins as close substitutes to Chinese or US varieties, and others as complements. There may be further demand-side mechanisms involving supply chains: as the US and China trade less among themselves, they may also import fewer intermediate goods from other countries. On the supply side, the resulting changes in the scale of production may have impacted marginal costs.
Countries gaining scale in the US or China would reallocate away from the rest of the world under conventional upward-sloping supply curves, but the opposite would be true if the supply curves slope downward. In that case, countries would increase their exports not only to the US or China but also to the rest of the world.
The empirical analysis is guided by a Ricardian-Armington model that captures these forces by including flexible demand (specifically, asymmetric translog) and supply elasticities. We derive an estimating equation in which the product-level export growth of each country to the U S, CH, and the rest of the world (RW ) varies with the product-level tariffs that the US and China impose on each other. Conditioning on origin-destination-sector fixed effects that capture general-equilibrium shifters, the combined country-specific response elasticities from these specifications identify whether the exports from each country substitute or complement the US and China, and whether each country operates along downward or upward-sloping supply curves. For example, consider the US tariff increases on China. These tariffs reduce Chinese exports to the US, and shift US demand towards the exports of countries selling varieties that substitute China. At the same time, these tariffs may also shift US demand away from countries selling varieties that complement China. For countries that substitute China, an increase (reduction) in exports to the rest of the world in products more heavily taxed by the US reveals a downward (upward) supply curve. We implement the model-implied estimating equation on global bilateral HS6-level trade data.
As a starting point, we estimate the average export responses of the US, China, and remaining 1 countries to the trade war tariffs, imposing common elasticities across the bystanders. Trade between the US and China declined because of the tariffs, with each country not only reducing imports of the products where it imposed higher import tariffs (as would be expected), but also reducing exports of those products.
On average, the bystander countries of the trade war (i.e., countries other than US and China) increased their exports to the US in response to the US tariffs, but reduced their exports to China in response to the Chinese tariffs. In addition, these countries increased their exports to the rest of the world in products with higher US-China tariffs. Thus, even though US and China largely taxed each other, the countries in the rest of the world, on average, increased trade amongst themselves in the targeted products. We aggregate these responses using the importance of each origin-destination-product trade flow in initial trade and find that bystander countries increased their global exports in response to the trade war. 1 Next, we estimate more flexible regression specifications that allow countries to respond heterogeneously to the tariffs. Across countries, we find substantial cross-country variation in export elasticities to each destination in response to the tariffs. Through the lens of the model, these results suggest significant heterogeneity across countries in their demand substitutability or complementarity with the US and China, and in whether they operate along upward or downward supply curves. For example, 8 countries increased exports to U S, CH, and RW in response to US-China's bilateral tariffs; revealing these countries to export substitutes to US and Chinese varieties, and to operate along downward supply curves.
These dimensions of country heterogeneity are not present in standard quantitative trade models in the style of Eaton and Kortum (2002) or Anderson and Van Wincoop (2003) that underlie typical general-equilibrium analyses of trade shocks. However, incorporating both of these margins rationalizes the patterns that we observe in the trade war. Therefore, our empirical results concerning the heterogeneity in response elasticities across countries give support to gravity models with non-constant elasticities of substitution studied by Adao, Costinot, and Donaldson (2017) and Lind and Ramondo (2018).
The estimation with country-specific responses yields a standard deviation across countries in predicted global export growth of 4.4%, compared to just 1.3% from the estimation that imposes a common response across bystander countries. This contrast implies that specialization patterns cannot explain the export winners and losers from the trade war. Instead, the responses were largely driven by heterogeneity in the export response elasticities across exporters. When accounting for the precision of the estimated responses, the tariffs raised global exports for 19 countries and reduced exports for 1 country; and we cannot statistically reject that the tariffs had no impact for the remaining 28 bystander countries.
Overall, the empirical analysis yields five key takeaways. First, the US and China reduced trade with each other. Second, many countries reallocated exports into the US and away from China, and increased their exports to the rest of the world. Third, the growth in total exports induced by the trade war was heterogeneous across countries. Fourth, this heterogeneity was due to country-specific elasticities, rather than product-level specialization patterns. Fifth, when we aggregate the responses globally, the trade war raised global trade by 3.0% (with a bootstrapped standard error of 0.7%). This result suggests that the trade war created new trade opportunities in aggregate and did not simply reshuffle trade flows. While the trade war reversed decades-long trends towards tariff reductions, our results suggest that globalization, as measured through export growth, has not come to a halt.
A growing body of research has studied the effects of the trade war, focusing primarily on its impacts on the US economy. 2 Our contribution is to estimate how the tariffs impacted exports from the world's largest exporters. We estimate heterogeneous responses to tariff-driven demand shocks across countries and provide evidence supporting significant heterogeneity across countries in substitutability or complementarity with the US and China, as well as in the slopes of the product-level supply curves that determine the adjustment to these demand shocks.
Identifying sector-level scale economies has been a focus of empirical research in trade since at least Antweiler and Trefler (2002) and, more recently, Costinot, Donaldson, Kyle, and Williams (2019). 3 These analyses show that cross-sectional differences in domestic and foreign market sizes may identify supply slopes. Through the lens of a trade model with flexible demand substitution, our analysis shows that the patterns of export responses to both the countries imposing tariffs and the rest of the world identify the sign of supply curves. 4 In our analysis, the export responses are identified over the medium run (two years) across HS6 products. At the firm level, Albornoz, Brambilla, and Ornelas (2020) show that Argentinean firms exiting the US due to increased trade barriers also exit other destinations, while Almunia, Antràs, Lopez Rodriguez, and Morales (2018) show that Spanish firms facing domestic demand reductions during the Great Recession reallocate into exporting. 5 We do not take a stance on the microfoundation of the supply curves. Recent research offers plentiful explanations, including Marshallian external economies of scale as in Grossman and 2 See Amiti, Redding, and Weinstein (2019), Cavallo, Gopinath, Neiman, and Tang (2021), Fajgelbaum, Goldberg, Kennedy, and Khandelwal (2020), Flaaen, Hortaçsu, and Tintelnot (2020, Flaaen and Pierce (2019), and Waugh (2019), among others. Fajgelbaum and Khandelwal (2021) review the research that has examined the economic impacts of the trade war.
3 See also Bartelme, Costinot, Donaldson, and Rodriguez-Clare (2019), Farrokhi and Soderbery (2020) and Lashkaripour and Lugovskyy (2017). Consistent with downward-sloping supply for US producers. Breinlich, Leromain, Novy, and Sampson (2021) show that the reduction in tariff uncertainty after the US granted of normal trade relations to China, which had been shown to raise US imports and reduce employment in the sectors where the uncertainty reduction was larger (Pierce and Schott, 2016), prompted a reduction in US exports in those sectors. 4 We find evidence that the elasticities of substitution between the goods produced by each exporter and the US and China vary by exporter. This evidence is consistent with the translog demand system with asymmetric substitution patterns that we use. Existing studies in international trade using variants of translog or its non-homothetic extension (the almost-ideal demand system), such as Novy (2012), Kee, Nicita, and Olarreaga (2008), Feenstra and Weinstein (2017), and Fajgelbaum and Khandelwal (2016), impose symmetric substitution elasticities across origins. 5 Ahn and McQuoid (2017) and Morales, Sheu, and Zahler (2019) provide further firm-level evidence of interactions across destinations.
3 Rossi-Hansberg (2010) and Kucheryavyy, Lyn, and Rodríguez-Clare (2016), firm-level increasing returns with monopolistic competition as in Krugman (1980), and increasing returns through reorganization (Caliendo and Rossi-Hansberg, 2012) or greater division of labor (Chaney and Ossa, 2013), among other possibilities. 6 Differentiating among these potential mechanisms may be possible as firm-level data across countries becomes available during this period.
The next section presents the framework that guides the estimation and interpretation of the results. Section 3 describes the data and presents a visual analysis of global reallocation from the tariffs. Section 4 presents the main results. Section 5 explores some further results and robustness checks. Section 6 concludes.

Framework
This section presents the framework that guides the empirical analysis.

Environment
There is a set I of countries (indexed by i for exporters and n for importers) and a set Ω j of products (indexed by ω) in sector j = 1, ..., J. We let p iω be the price received by competitive producers of product ω in country i. In each country there is a translog aggregator of imported and domestic varieties of each product ω used as an input in production or for final consumption. Specifically, in country n, the share of (tariff-inclusive) spending in product ω produced by country i is where p n iω is the tariff-inclusive price in country n. The parameter a n iω captures an idiosyncratic demand of country n for the variety iω.
The semi-elasticities σ i i are common across importing countries and sectors. They capture the substitutability between products from i and i . When σ i i > 0 (σ i i < 0) it means that that varieties i and i are substitutes (complements), as an increase in the price of either leads to increase (reduction) in any country n's expenditure share (and quantity) purchased in the other variety.
The inverse demand elasticity (defined as the elasticity of the variety's price to expenditure) is s n iω σ ii . Additivity and symmetry of the substitution matrix require that ∑ N i=1 a n iω = 1 for all n and ω, as well as: 6 As shown by Flaaen, Hortaçsu, and Tintelnot (2020) for washing machines, a consequence of the trade war has been a reallocation of supply chains whereby product-specific capital migrates from China to other countries, such as Korea, that serve as export platforms to the US. Our finding of an increase in exports from countries in the rest of the world to other countries in the rest of the world in products where the US or China impose higher tariffs may be explained by these types of reallocations, as long as some of the previously enumerated forces are also at work. For example, a natural explanation à la Krugman (1980) We further assume 7 Trading frictions are of two kinds. There are iceberg trade costs, so that τ n iω units of variety iω must be shipped to n for one unit to arrive. Also, country n imposes ad-valorem tariffs t n iω on imports of good ω from i. Letting p iω ≡ p i iω be the domestic price of variety iω and assuming competitive pricing, the tariff-inclusive prices faced by consumers in country n are where T n iω ≡ 1 + t n iω is one plus the ad-valorem tariff. The translog aggregator is used either for production or final consumption. The total sales of ω in sector j from country i are: where b i the inverse supply elasticity defined as the elasticity of price of total sales. The supply shifters are partitioned into two components: an endogenous country-sector component A ij and an exogenous cost shifter Z iω . The former captures factor and input prices that are common to different products within a sector, which may respond endogenously to tariffs. The supply curve is potentially downward sloping (b i < 0). We show a standard micro-foundation of this supply in Appendix B.1. 8 The previous expressions determine supply and spending across origins and products. A world equilibrium is given by prices {p iω } such that markets clear; i.e., the aggregate sales X iω given by (6) equal aggregate expenditures where E n ω are country-level expenditures in product ω. To complete the description of a fully-specified general equilibrium model, one would need to determine how the country-sector supply shifters and demand shifters are determined. However, for the purposes of our empirical analysis, we do not impose additional restrictions. These shifters can respond to tariffs, and the empirical analysis will control for them using fixed effects in the econometric specifications. As a result, our analysis is consistent with a range of assumptions about internal and international factor reallocation. At the same time, our estimations of a country ranking of export growth keeps the fixed-effects constant, and therefore only captures the impact 7 The tariff variation from the trade war does not offer enough variation to incorporate in our regressions a flexible σ ii for country pairs that do not include the US or China. 8 This formulation imposes that different products in ω use the same bundle of inputs. As discussed further below, some of our findings could be consistent with a specific shape of input-output linkages within 6-digit product codes, such that the taxed products use themselves as inputs in production at this 6-digit level. In that case the supply curve would include an additional ω-specific component that captures the intensity of this force. 5 of tariffs given those shifters.

Impact of US-China Tariffs on Exports across the World
Consider an increase in the US tariffs on the imports of a given product ω from China, ∆ ln T U S CH,ω . How do these shocks affect the exports of countries other than the US and China (i = CH, U S) to the US, and the rest of the world (n = U S, CH, RW )?
Taking a first-order approximation around an initial equilibrium of the model described in the previous section, the impact of tariffs can be expressed in the reduced form as: is the log-difference between the post-tariff equilibrium Y and pre-tariff equilibrium Y of a given variable andβ n 1iω is the response to US tariffs on China of country i's exports of product ω to destination n. The omitted terms include the changes in Chinese tariffs on the US, as well as the changes in tariffs that the US and China imposed on all other countries. We discuss these additional terms in the next subsection, and we include them in the empirical analysis.
The tariff response elasticitiesβ n 1iω andβ n 2iω depend on general-equilibrium interactions and are therefore a function of all the model parameters. We will run versions of (8) that impose varying degrees of flexibility on these response elasticities. To interpret these upcoming regressions, we now focus on a special case where some channels are muted and we can obtain a closed-form specification.
Specifically, similar to Costinot, Donaldson, Kyle, and Williams (2019), we take the first-order approximation in (8) around an equilibrium with symmetric distributions of sales and expenditures. 9 We take the approximation around a point s n iω = s i , such that all countries have the same import composition but exporters may have different shares of world trade. This approximation guarantees that country-level shifters affect the exports of variety iω differentially across exporters, but in the same way across products within an exporter-product. With this assumption, as implied by Appendix B.2, equation (8) can be re-written as follows: where To obtain this expression, we find the value of ∆ ln p iω , the change in the price of variety iω, that clears the world market for that variety when tariffs change, given the remaining price changes in the economy and the changes in demand and supply shifters.
Compared to (8), equation (9) includes two key differences. First, many general-equilibrium effects from the tariffs are absorbed by constants α n ij that vary by importer, exporter, and sector.
These constants capture the previously defined changes in aggregate demand by importer and sector, E n j , and in sector-level supply by exporter, A ij , as well as sector-level components of price changes in China and the US. In our empirical analysis, these effects are absorbed by fixed effects that vary by origin, destination and sector.
Second, due to assuming an approximation around a symmetric equilibrium, the tariff response elasticities in (9) no longer vary by product. Instead, the coefficient β n 1i vary by exporter-importer, and so do the coefficients corresponding to the remaining tariff changes not shown in (9). The heterogeneity in the responses across countries can be mapped in a straightforward way to the demand and supply drivers of trade in a way that reveals the substitutabilities and scale economies. Specifically, using the closed-form expressions in (10) and (B.38) we can interpret the elasticities estimated in the next sections as follows: Proposition 1. When the US imposes a tariff on China in product ω, then: (i) assuming a large number of countries ( N N −1 ≈ 1), exports from i to the US increase (decrease) iff σ CHi > 0 (σ CHi < 0), implying that country i's products are a substitute (complement) of Chinese of Chinese products and exports increase (decrease) from i to the rest of the world, then supply is negatively The proposition yields a taxonomy whereby the responses of a country's exports to the US and to the world when the US taxes China reveal both the substitutability between that country's products and Chinese varieties and the slope of supply curves. While the proposition describes the results using a US tariff on Chinese products, a similar logic applies for Chinese tariffs on US imports. In that case, the results would reveal the substitutability between a country's products and US varieties. Due to the linear nature of the approximation, whether the omitted terms in (9) corresponding to the additional tariffs are included in the empirical specification does not affect the structural interpretation in (10) that underlies the proposition. 10 Table 1 shows the possible cases. As implied by part (i) of the proposition, when the US taxes imports from China then an increase in country i's exports to the US reveals country i as a substitute for China. In that case, the tariff translates into a positive demand shock for country i's production of good ω. Conversely, a reduction in country i exports to the US reveals country i as a complement with China, and in that case the tariff implies a negative demand shock. 10 If we followed the same steps with a standard constant-elasticity (CES) demand with substitution parameter σ across origins of a given variety, instead of (10) we would obtain β n,CES Under CES, the tariff elasticity that we estimate would only vary across countries according to the supply slope parameter and every country would have the same demand substitution with China. As we show below, the estimates reveal cross-country heterogeneity in demand substitution in China (and the US), including variation in whether countries sell products that are complements or substitutes.
Notes: of the proposition, given negatively sloped demand, an increase in exports to countries other than US reveals downward-sloping supply (b i < 0). In this case, the positive demand shock in the US market increases supply and lowers the price, leading to an increase in exports to rest of the world. 11 Conversely, a reduction in exports would be consistent with a standard neoclassical world, where a demand shock to one destination reallocates resources away from others. Similarly, in the China-complements case, where US tariffs on China lead to a decrease in exports of country i to the US, the downward-sloping supply is revealed by a reduction in exports to the rest of the world.
We conclude that a downward-sloping supply (b i < 0) is consistent with observing either an increase in exports to both the US and the rest of the world, or a decrease to both. Of course, a similar logic applies when we consider exports to China and to the rest of the world in response to China's tariffs on the US. In that case, the pattern of exports to China reveals substitutabilities or complementarities with US products.

Specification With All Tariffs
In order to proceed to the empirical analysis, we complete the presentation of the main estimating equations when all the tariffs are included. As implied by (B.36) in the Appendix, the change in exports from i = U S, CH to destination n = U S, CH, RW is The term β n 1i corresponding to the US tariff on China was already presented in (10). The additional terms are a function of the remaining parameters (σ ii , σ RW ) and of initial expenditure shares, as shown in ( The full empirical specification implied by the model in expression (11) includes an additional term, η n iω , that varies at the product level. 12 This term captures the impact that the tariff-driven price changes of all the varieties other than iω have on the demand for iω in destination n, after controlling for the fixed effects. These price changes may lead to differential outcomes by exporter and product due to exporter-specific bilateral substitution patterns. This component could pose an identification challenge. However, this effect is weak under reasonable restrictions. Specifically, η n iω ≈ 0 under: i) vanishing substitution across varieties not originating in the US or China (σ RW → 0); and ii) small differences in price changes for US products within each sector, and the same for China (p iω ≈p iω for ω, ω ∈ Ω j for i = CH, U S). 13

Data and Summary Statistics
This section describes the data sources, presents summary statistics, and provides a visual analysis of the impacts of the US-China tariffs on global trade.

Data
We obtain global bilateral trade data from the International Trade Centre (ITC). These data track monthly trade flows from January 2014 to December 2019 at the HS6 product level. We focus on long-run outcomes by aggregating into biennial (24-month) intervals (2014/2015; 2016/17; 2018/19). For ease of notation, we refer to each 24-month period by its ending year (and so, for example, we refer to the 24-month period from 2018-2019 as "2019"). We restrict our sample to the top 50 exporting countries (including the US and China), excluding oil exporting countries. 14 The resulting sample covers 95.9% of global trade. We analyze exports from each of these countries to three destinations, {U S, CH, RW }, where RW is an aggregate of all destinations except the US and China. 15 We classify HS6 products into 9 sectors: agriculture, apparel, chemicals, materials, machinery, metals, minerals, transport, and miscellaneous. Table 2 provides summary statistics on global exports by sector. We consider four sets of tariff changes as part of the US-China trade war. The first set includes the HS6-level tariff increases imposed by the US on China (the "US tariff"), which following the framework's notation we denote as T U S CH,ω , where ω denotes an HS6 product code. The second set includes the tariff increases imposed by China on the US, T CH U S,ω (the "China tariff"). The third set includes the product-level tariff changes that the US imposed on each country i other than China, denoted T U S i,ω ; for example, steel tariffs on Mexico and Europe. These three sets of tariffs are taken from Fajgelbaum, Goldberg, Kennedy, and Khandelwal (2020) and extended through the end of 2019. 16 The fourth set corresponds to most-favored-nation (MFN) tariff changes implemented by China and affecting all countries but the US, denoted T CH i,ω . We obtain these tariff changes from Bown, Jung, and Zhang (2019). We scale tariff changes in proportion to their duration within a 24-month interval such that, for example, a 20% tariff that is implemented for 12 months would 14 These countries are: Algeria, Angola, Congo, Equatorial Guinea, Gabon, Iran, Iraq, Kuwait, Libya, Nigeria, Norway, Saudi Arabia, the United Arab Emirates, Venezuela, and Qatar. Throughout, we measure all trade flows based on countries' reported imports rather than reported exports due to more complete country coverage of the former. 15 A country's global exports are therefore the sum of exports to U S, CH, and RW . We consider all countries in the rest of the world as a single destination, RW , because we estimate differential responses to each destination, and it would be intractable to estimate separate responses to each country within RW . 16 The US tariffs are available at the HS10 level. We aggregate the tariffs from the country-monthly-HS10 level to the country-biennial-HS6 level using pre-trade war export weights, where the weights represent the share of each HS10 variety in total HS6-variety-level exports. China imposed tariffs at the HS8 level, and we collapse to the HS6 level using pre-trade war export weights from HS8-level China trade data. be assigned a tariff rate of 10% = (20%*12/24). This scaling generates variation in tariff changes across products due to both variation in the magnitude of the rate changes as well as variation in the timing of when the tariff changes were implemented. 17  17 Our analysis does not include pre-determined staged tariff changes that went into effect during this period as part of the trade war tariffs. Bown, Jung, and Zhang (2019) document how China's MFN tariff cuts were likely influenced by the trade war with the US, and so we treat these tariff cuts as part of the trade war. However, we exclude other countries' retaliatory tariffs on the US from the analysis. This is because we aggregate all destinations other than the US and China into a single RW destination, and the retaliatory tariff increases within this aggregated destination are small: we estimate the average tariff change to be about 0.002 (= 0.2 percentage points) using tariff data from Fajgelbaum, Goldberg, Kennedy, and Khandelwal (2020). Including these retaliatory tariffs imposed by countries other than the US and China would come at a high cost in tractability without providing sufficient additional empirical variation for estimation. The black dots indicate the median tariff increase, the boxes denote the 25th and 75th percentiles, and whiskers show the 10th and 90th percentiles. post-period. The plots in panels A and B, which respectively examine exports from the US to China and from China to the US, residualize sector fixed effects. The plots in panels C-F, which examine the exports of bystander countries, residualize country-by-sector fixed effects. 18 We observe broadly flat and statistically insignificant coefficients in the pre-period, suggesting that targeted and untargeted varieties were on parallel trends prior to the trade war. An exception is Panel B, where we observe a positive correlation between 2015-17 US export growth and the 2017-19 Chinese tariff changes, and a more modest pre-trend in Panel F. We address potential concerns with pre-trends in Section 4.

A First Look at Tariffs and Export Growth
In Panels A and B, we first confirm that trade flows between the US and China declined in response to the tariffs that each applied against the other, consistent with evidence from several existing studies (see Fajgelbaum and Khandelwal (2021)). In the remaining panels, we build on these results to introduce visual evidence of two novel facts that are suggestive as to how the trade war tariffs affected bystander countries.
First, the upward-sloping trend line in Panel C shows that, on average, countries in the rest of the world increased exports to products with high US tariffs on China, and differentially so compared to the pre-period. However, Panel D shows that these countries did not (differentially) reallocate exports into China in response to China's tariffs. Second, Panels E and F show that bystander countries increased their exports of trade war targeted products to the rest of the world, providing suggestive evidence of downward-sloping supply curves.
These patterns motivate the systematic empirical investigations in Section 4. There, we provide evidence that the empirical patterns in Figure 2 are robust to controlling for changes in other tariffs (such as the tariffs that the US and China imposed on other countries) and pre-existing trends in export growth. We further show that Panels C-F of Figure 2 mask economically meaningful country-level heterogeneity in patterns of export reallocation and world export growth.
18 Figure A.2 shows that these patterns are also evident in the raw data without fixed effect controls.

Panel F Bystanders' Exports to RW
Notes: The panels show binscatter plots of countries' export growth (on the y-axes) against changes in tariffs due to the trade war (on the x-axes), after residualizing sector fixed effects (in Panels A and B) or country-sector fixed effects (in Panels C-F). Below each panel we report the corresponding OLS coefficients (standard errors clustered by product in Panels C-F). Figure A.2 reports the that the same patterns are also present in the raw data without controlling for fixed effects.

4 Empirical Analysis
Building on the patterns from Section 3.3, we now move to a more systematic empirical investigation of the effects of the trade war on global trade. Our initial analysis relies on the following specification, motivated by (11), that estimates how the trade war tariffs affected the exports of country i to each of three destinations, n = {U S, CH, RW }: In words, equation (12) regresses the 2017 to 2019 log change in exports from country i in product ω to destination n, ∆ ln X n iω , on the log change in tariffs over the same period. For example, for n = U S, we consider how country i's exports of product ω to the U S change in response to: (i) the US tariff increase on China in that product (∆ ln T U S CH,ω ); (ii) China's tariff increase on the US (∆ ln T CH U S,ω ); (iii) the US tariff increase on exporter i in that product (∆ ln T U S i,ω , which, as shown before in Panel A of Figure 1, mainly affected countries' exports of metals to the US); and (iv) China's changes in MFN tariffs (∆ ln T CH i,ω , which as shown in Panel B of Figure 1 is mostly negative, implying improved market access to China for the bystander countries). 19 Consistent with the assumptions underlying the derivation of (11), which is derived for continuing varieties, this specification is restricted to the intensive margin of exports (that is, it only includes varieties iω that were exported to n in 2017 and 2019). We discuss extensive margin responses in Section 5.
Each specification includes exporter-by-sector fixed effects, α n ij , to control for secular trends in demand as well as for supply shocks affecting all products within a given country-sector, as discussed in the previous section. Intuitively, the elasticities are identified from a comparison of export responses across products within the same sector and exporter. For example, if β U S 1i > 0 for countries i = U S, CH, then countries in the rest of the world on average increased exports to the US in products where the US imposed greater tariff changes on China.
The identifying assumption underlying this empirical strategy is that, within country-sectors, potential outcomes in 2017-19 export growth across products would have been the same in the absence of the trade war. We can assess the plausibility of this parallel trends assumption by testing for differential trends in export growth in the years prior to the trade war. We previously showed evidence in Figure 2 that bystander countries' pre-war export growth is uncorrelated with the future changes in tariffs. Table A.1 further probes this evidence with a more systematic evaluation by regressing lagged exports, ∆ ln X n iω,t−1 , on the future tariff changes (controlling for 19 Our benchmark specifications set β n 5i and β n 6i in (11) to zero. While theoretically justified, the tariff summation terms that identify these coefficients are highly correlated with the underlying bilateral tariffs from which they are constructed. I.e., since China changed tariffs on an MFN basis to third countries, the ∑ i =CH,U S,i ∆ ln T CH i ,ω term is ∆ ln T CH i,ω times the number of exporters (excluding US, China, and i) in product ω, so β n 5 is identified only through variation in the number of exporters across products. The correlation between ∑ i =CH,U S,i ∆ ln T CH i ,ω and ∆ ln T CH i,ω is 0.996. A similar issue arises for the ∑ i =CH,U S,i ∆ ln T U S i ,ω term because when the US did change tariff rates on third countries, it often raised rates on by a similar amount. The correlation between ∑ i =CH,U S,i ∆ ln T U S i ,ω and ∆ ln T U S i,ω is 0.852. Section 5.3 examines the full specification and demonstrates that the main results are not sensitive to setting β n 5i and β n 6i to zero. country-sector fixed effects and clustering by HS6 product). The results suggest pre-trends in 5 of the 12 coefficients. To ensure that these pre-existing trends do not drive our results, our main specifications directly control for them through the ∆ ln X n iω,t−1 term in (12). 20

Export Responses of the US and China
We first estimate (12) for the US and China as exporters. 21 Columns 1-2 of Table 3 examine China's product-level exports to the U S and RW in response to the US-China tariffs, and columns 3-4 examine US's exports. The main novelty of these two columns is that we consider the impact of each country's imports tariffs on its own exports to the other country and to the rest of the world.
Previous papers such as Amiti, Redding, and Weinstein (2019), Fajgelbaum, Goldberg, Kennedy, and Khandelwal (2020), Cavallo, Gopinath, Neiman, and Tang (2021) have analyzed the effects of the US import tariff on the imports from China relative to other origins within products. 22 As expected, the US tariffs reduce China's exports to the US (first row of column 1), with a β U S 1CH elasticity of -1.15 (se 0.25); and the Chinese tariffs reduce US exports to China (second row of column 3), with a β CH 2U S elasticity -1.53 (se 0.33). In response to the foreign tariffs, both the US and China reallocate their exports into the rest of the world (first row of column 2, β RW 1CH , and second row of column 4, β RW 2U S , which is noisy). Since the foreign tariff is a negative demand shock, this reallocation into RW implies either infinitely elastic or upward-sloping supplies at the product level.
The Chinese tariffs also reduce China's exports to the U S (the coefficient β U S 2CH in the second row of column 1) and the US tariffs reduce US exports to CH (the coefficient β CH 1U S in the first row of column 3). These results are consistent with two complementary explanations. The first one is a standard Lerner symmetry effect that arises in our model under standard upward sloping or infinitely elastic supplies by product, whereby import tariffs act like export taxes. As the US taxes China and imports from that country fall (as shown above), US demand is reallocated in part towards domestic varieties, reallocating domestic production away from China. The second explanation relies on supply chains: if the production of the taxed products requires varieties of those same products as inputs (i.e., if input-output matrixes are heavy on the diagonal at the product level) then the US tariff reduces the demand for US products, because the lower Chinese exports to the US reduces China's demand for US inputs. 23 Both explanations reinforce each other: the Lerner effect reallocates US demand to US goods, and the value-chain effect shifts demand away from US goods or supply away from the taxed products. Similar forces on the Chinese side may explain explain why China's tariffs reduces its exports to the US, but β U S 2CH is not precisely estimated.
Finally, each country's own tariffs increase their exports to the rest of the world (second row of column 2, a noisy β RW 2CH , and first row of column 4, a more precise β RW 1U S ). To the extent that they resulted from greater US or Chinese domestic scale stemming from greater protection, these estimates could be suggestive of a downward-sloping supply. 24 However, as we have just discussed, US and China reallocated into the world in response to the foreign tariff; and, the greater domestic scale in China and particularly the US led to lower exports to the other country.
These results are broadly suggestive of horizontal or upward-sloping supplies at the product level.
We can reconcile the increase in exports to RW in response to the own tariffs with horizontal or upward-sloping supplies if, as argued in the previous paragraph, a strong enough value-chain component led to lower Chinese demand for US goods, and vice-versa. This suggests that standard Lerner forces may be operating alongside lower demand, leading to lower exports from the US to China and vice-versa, and to more exports of both countries to RW .
To summarize, columns 1-4 demonstrate three findings. First, US and China exports to each other fall in response to the foreign tariff, which is consistent with a standard reallocation away from taxed imports. Second, their exports to each other also fall with their own tariff, which is consistent with standard horizontal or upward-sloping supply curves at the product level leading to reallocation towards home production as imports from the targeted country decline (i.e., Lerner), and with negative foreign demand shifts if supply chains operate within products. Third, exports to RW rise (although noisily for China), which is consistent with the negative demand shock being strong enough to offset the reallocation away from RW due to greater US demand.

Export Responses of Bystanders (Pooled Specification)
We now examine the export responses of bystander countries (i.e., all countries in the sample except for the US and China). Here, we pool over these exporters in (12) and estimate common elasticities across countries, as would be standard. We cluster the standard errors by HS6 product, which is the level at which our treatment varies (Abadie, Athey, Imbens, and Wooldridge 2017). restrict attention to single-product exporters, 9.4% of these exporters import the same good they export. These statistics suggest that the production of Chinese HS6 products indeed use imports in the same category as inputs. 24 For the US, this result echoes Breinlich, Leromain, Novy, and Sampson (2021), who show that a reduction in tariff uncertainty of Chinese exporters to the US, previously shown to increase Chinese exports (Pierce and Schott, 2016;Handley and Limão, 2017), also led to lower US exports in the most affected sectors. The results are shown in columns 5-7 of Table 3. In the model, exports to RW are mediated by countries' exports to U S and CH. It is therefore useful to examine bystander exports to the three destinations for a given tariff by moving across columns 5-7 along a row.
First, consider the response to the US tariff. The first row examines how bystanders' exports respond to each destination: β U S 1RW , β CH 1RW , and β RW 1RW in (12). Consistent with the patterns in Figure  2, column 5 shows that US tariffs increased exports of the targeted product from countries in the rest of the world to the US by a β U S 1RW elasticity of 0.25 (se 0.09). According to Proposition 1, this result suggests σ CH,RW > 0: since the average bystander country is a substitute for Chinese varieties, the reduced market access for China raises its access to the US. Hence, the typical country increased exports to the US in the products that the US taxed from China.
Simultaneously, the first row of columns 6 and 7 imply that the typical country lowered exports to China and increased exports to the rest of the world in the products with higher US tariffs on China: β CH 1RW is -0.43 (se 0.13) and β RW 1RW is 0.15 (se 0.07). In light of Proposition 1, these results seem to contradict each other. As countries grow in the US, they should either shrink in both China and other destinations if there are product-level upward-sloping supplies, or grow in both if there are product-level downward-sloping supplies. However, as with the US export responses to the US tariffs, both results are consistent with a (specific form of) value-chain driven reduction in Chinese demand: even if countries operate under downward-sloping supplies, exports to China of a given product may fall if China demands less inputs in that same product category as a result of its shrinking exports to the US.
The second row of columns 5 to 7 shows the β n 2RW coefficients for the changes in bystanders' exports in response to the Chinese tariffs. The export response to China is negative (β CH 2RW is -0.14 (se 0.14). The point estimate suggests that the typical country produces goods that complement US varieties in China (σ RW ,U S > 0), but is quite imprecisely estimated. As in the US case, we find a precisely estimated increase in exports to RW (β RW 2RW > 0). 25 These patterns are consistent with the descriptive evidence in Section 3.3 and suggest the following explanation of global reallocations in response to the US-China trade war: the average country in the rest of the world substitutes China in the US (that is, its exports to U S grow with the US tariffs on China) and complements the US in China (that is, its exports to CH shrink with the Chinese tariffs on the US, although this effect is imprecisely estimated). The products taxed by the US (China) operate largely under downward-sloping (upward-sloping) supplies, which explains the growth in trade from the rest of the world into itself in response to the positive (negative) demand shock. Therefore, the reallocations triggered by the US-China trade war did not occur at the expense of exports to other countries. Instead, the US-China trade war created trade opportunities.

Aggregate Export Responses (Pooled)
Using the predicted values from these regressions, we can aggregate over products and destinations within each exporter to obtain a country-level increase in exports. An important caveat to these results, as noted earlier, is that they do not incorporate the potential effect of the tariffs on the exporter-destination-sector fixed effects α n ij . However, as discussed in the context of Proposition 1, they do include the general-equilibrium impacts corresponding to the change in the price of the varieties exported by country i that clear international markets, keeping constant the aggregate shifters absorbed by α n ij . We generate the predicted exports using the coefficients from Table 3: where i = U S, CH, RW . 26 Next, we aggregate these product-level export responses to the country level, weighting each variety by its time invariant export share to each destination as follows: where λ n Xiω is product ω's pre-war share of country i's exports to destination n = U S, CH, RW . 27 Pre-war specialization therefore drives the variation in exports to each destination. 28 Predicted 25 If countries operate along downward-sloping supplies, as implied by β U S 1 > 0 and β RW 1 > 0, then the reduction in scale due to lower exports to China should lead to less exports to RW. The results can be reconciled if the set of products taxed by China and the set of products taxed by the US operate with different supply elasticities. 26 We use the four tariffs to predict export growth since we consider all four tariffs as part of the trade war. As a result, it is not necessarily the case that β n 1i , β n 2i > 0 implies ∆ ln X n iω > 0. 27 The λ n Xiω shares are defined as the export values in t − 1 for continuing products divided by total country exports in t − 1. Section 5 extends the analysis to include the extensive margin. 28 An additional source of variation across countries comes from ∆T U S iω , but this will be small relative to differences in specialization. aggregate exports to the world from each country are a weighted average of the (pre-war) export responses to the three destinations: where λ n Xi is destination n's share of country i's exports to the world. Panel A of Table 4 aggregates the predicted export responses across exporters. This provides an easier way to digest the large number of coefficients in Table 3 and re-emphasizes the key takeaways. 29 First, the trade war reduced US exports to China by 26.3% (se 3.9%) and raised exports to RW by 2.2% (se 1.9%). On net, US exports to the world do not change much, falling by a statistically insignificant 0.9% (se 1.8%). We observe a similar pattern for China: aggregate exports to U S decline by 8.5% (se 2.7%), rise to RW by an imprecise 5.5% (se 5.5%), and are also statistically flat 29 We construct bootstrapped standard errors to each aggregate response by block bootstrapping specifications (12). We sample with replacement within country-sector pairs, estimate the specifications in (12), construct the aggregate predicted exports to the each estimation using (13)-(15), and repeating 100 times. to the world, 1.8% (se 4.1%). 30 Second, we find that the rest of the world's exports increase to the U S but decline to CH. Third, on net, the rest of the world exports to RW respond strongly, increasing by 4.8% (se 1.0%). This large response for the rest of world drives an overall net increase in global trade by 2.5% (se 0.8%).

Export Responses of Bystanders (Heterogenous Specification)
We now relax the homogenous response assumption among bystander countries, and estimate heterogeneous tariff responses across countries. This is a substantially more flexible specification since it allows for a country-specific response to each tariff. We implement this by estimating (12) separately for each country i to each destination n. The specifications include sector fixed effects, thus the identifying variation continues to leverage variation across products within country-sectors.
Tables A.2-A.4 report the coefficients for each regression. We find large variation across countries within the rest of the world in how product-level exports grew to the U S, CH, and the RW in response to the US-China tariffs. In response to the US tariffs imposed on China, countries' export elasticity to the US range from -1.43 to 1.61 (sd 0.62). The analog export elasticity to CH in response to China's tariffs imposed on the US ranges from -2.81 to 1.42 (sd 0.88).
Given the large number of coefficients, it is helpful to visualize and interpret the coefficients through the taxonomy in Table 1. The results also reveal heterogeneity in the precision of these coefficients across countries and tariffs which are difficult to summarize, but will be addressed below when discussing the aggregation of these coefficients. For now, we simply focus on the signs of these coefficients.
To do so, we plot the estimated coefficients from Tables A.2-A.4 in Figure 3 in Panel A  Panel A of Figure 3 shows that most countries lie to the right of the vertical line at zero, and β RW 2i . The overall impact of exports to RW depends on the relative magnitude of the coefficients and the underlying patterns of specializations.

FIGURE 3: PATTERNS OF SCALE AND SUBSTITUTION
The key message from these regressions and figure is that allowing for country-specific response reveals heterogeneity in the substitution patterns with respect to US and Chinese varieties, and the potential scale implications across countries. We now show that this heterogeneity in responses generates substantial heterogeneity in predicted export growth.

Aggregate Export Responses (Heterogenous)
We can again predict export responses and construct overall impacts of the tariffs on countries' exports using (13), but now using the full heterogeneity of the responses. As noted in footnote 26, we predict the export responses using all four tariffs, so it is possible that a country's exports to the world to decline even if it in the North-east quadrant in both panels in Figure 3. Figure 4 plots aggregate predicted export responses for the three destinations by country (sorted by the aggregate predicted response to the entire world). 31 31 We report bootstrapped confidence intervals for ∆ ln X W D i . These are constructed by implementing (12) on 100 bootstrap samples, constructing (13) for each bootstrap run, and taking the standard deviation. Below, we further obtain bootstrapped standard errors for aggregate world trade that aggregates across countries' predicted responses to the three destinations.  The figure reveals two messages. First, there is variation across countries in the impact of the trade war on export: on average, countries' exports to the world increase by 3.1%, which is similar to the average response in the homogeneous specification, but with a large standard deviation of 4.4% (compared to 1.3% from the homogenous specification). Second, this variation is driven by the heterogeneous responses, rather by than differences in countries' export baskets.
To further see this, Figure 5 plots the predicted winners from the pooled specification against the predicted winners from the heterogenous regression. Recall that the only variation from the pooled specification stems from differences in specialization patterns, while the predictions from the heterogenous regression also reflect variation in tariff elasticities across countries. The figure reveals much larger variation from this more flexible specification, and hence reveals substantially heterogeneous responses of bystander countries to the trade war tariffs. When accounting for standard errors around this prediction, we estimate that the trade war increased world exports for 19 countries and reduced exports for 1 country. We cannot reject that the trade war had no impact for the remaining 28 of the 48 bystander countries. Database and Refinitiv; the share of exports covered by bilateral "deep" trade agreements as defined in Mattoo, Rocha, and Ruta (2020); and, the World Bank's doing business trade score.
These characteristics capture variation in countries by geography (distance), size and income (GDP, GDPPC), efficiency and flexibility of operating businesses (labor market efficiency, doing business), and two measures of deeper trade and market integrations (FDI, trade agreements). The first three sets of characteristics are not significantly correlated with export growth from the trade war. However, the two measures of deeper integration are more precisely estimated. Countries with higher FDI stocks and a larger share of exports covered by trade agreements responded with stronger export growth as a result of the trade war. One possible interpretation is that trade agreements reduce fixed costs for exporters to expand in foreign markets and/or offset uncertainty generated by the trade war. Higher FDI stocks may proxy for greater social, political, and economic ties to foreign markets that may also facilitate export expansion.
When further aggregating country-specific responses globally in Panel B of Table 4, the patterns remain quite similar to Panel A (which is generated from the pooled responses). We continue to observe that bystander countries in aggregate raised exports to the U S, lowered exports to CH, and strongly raised exports to RW . On net, the heterogenous specifications reveal that net global trade increased by 3.0% (se 0.7%). Thus, this procedure reveals that the trade war increased aggregate global trade rather than simply reshuffling trade flows across destinations.

Additional Results and Robustness
This section further examines export responses, and examines sensitivity to various robustness checks.

Prices
Through the lens of the model, countries in the rest of the world increase exports to the rest of the world through downward-sloping supplies and lower prices. To investigate this mechanism, we examine price responses, as measured by unit values, to the world using the following regression estimated, separately by country: where p iω is the global export price of product ω by exporter i. We examine a global export price, constructed as the ratio of world export values divided by world export quantities, since the model assumes that price changes by origin-product are common across all destinations. The results are reported in Table A.5.
As before, we can aggregate the predicted responses to the country level using the estimated β's from (16). In our framework, countries that are classified as demand substitutes to US and China (because their exports to China and US increase with the tariffs, respectively) receive a positive demand shock from the tariffs. If these countries also increase their exports to the rest of world, they are interpreted to be operating along downward-sloping supply curves, and their export prices should fall. The estimates in Panels A and B of Figure 3 indicate that 8 countries would be classified in this region of the parameter space (that is, the North-East quadrant of Table 1)

Extensive Margin
Our main analysis sample is comprised of continuing varieties-that is, varieties that were exported to a given destination in both 2017 and 2019. On average across countries, these varieties account for 99.7% of total exports across countries. Therefore, continuing products dominate countries' trade and aggregate responses over the horizon we examine. For a more complete understanding of how the trade war tariffs affected global trade, we analyze the extensive margin responses.
To do so, we consider the following linear probability regressions that projects entry and exit dummies on the tariffs, controlling for country-sector fixed effects: where χ n iω = EN n iω for the entry margin and χ n iω = EX n iω for the exit margin. We define the entry margin among potential entrants (iω varieties that did not export in t − 1 to n) as a dummy variable EN n iω that switches on for varieties that appear in t. We define the exit margin among potential exiters (iω varieties that exported in t − 1 to n) as a dummy variable EX n iω that switches on for varieties that disappear in t. For countries in the rest of the world, we cluster the regressions by product.
Panel A of Table A.6 reports the entry and exit results for the US and China. The overall pattern suggests two findings. First, although as shown before the tariffs reduced the export values of continuing products between US and China, we observe that net entry rates between these countries increased with the tariffs. Second, the increase in US and China's exports to RW documented above is also complemented by an increase in net entry to RW . Table A.6 reports entry and exit results for RW . Exporters from bystanders on average increase entry to the US with the US-China tariffs (column 1) and have slightly lower exit rates (column 2), suggesting an increase in net entry to the US market. Columns 3-4 examine entry and exit to China. We previously showed that RW, on average, reduced exports of continuing products to China. However, columns 3-4 indicate a positive net entry response. Finally, columns 5-6 indicate an increase in net entry into the RW market. Thus, the overall message of Panel B is that the trade war increased net entry into the three destinations for the average variety exported from RW . This pattern reinforces the key finding that the trade war increase RWs' exports to RW .

Panel B of
Since continuing products account for the vast share of exports, including the extensive margin in the aggregation exercise performed above does not overturn the main findings. To demonstrate this, we obtain the predicted entry and exit rates from running heterogenous country-by-country versions of (17). We aggregate to form an overall contribution of the entry margin by weighting the predicted probabilities of potential entrants by the average export value (for each country) in t = 1. The overall contribution of the exit margin is analogously computed by weighing the predicted exit probabilities by the values of potential exiters in t = 0. We then add the entry and subtract the exit aggregates to Panel B of Table 4 (which used the weights of continuing products) to form the overall trade response in Table A.7. For the US and China aggregates, including the contributions of the extensive margin does not meaningfully change the predicted export shares to the three destinations. For rest of the world, the exports to China fall by slightly less than the prediction using solely the continuing products. But, the key takeaway obtained from intensive margin analysis remain qualitatively the same: keeping the fixed effects of the regression constant, the trade war increased overall world trade by 3.1%.

Additional Robustness Checks
In Table 5 we show that our main result that bystander countries increase exports to the world in response to the trade war tariffs is robust to a battery of alternate estimation and specification choices. Column 1 shows the benchmark specification (the same as column 7 from Table 3); column 2 winsorizes the top and bottom 1% of the outcomes; column 3 removes the pre-trend control; columns 4-7 respectively use country-by-HS2, industry, country, and no fixed fixed effects; column 8 estimates responses using only tariffs imposed by the US and China on each other; and column 9 controls for changes in other countries' market access due to the trade war (that is, includes estimates of β 5 and β 6 from (11)). Across all specifications, the US-CH and CH-US tariff coefficients are stable and precisely estimated.  Notes: Table shows alternate specifications that estimate the effect of the trade war tariffs on bystander countries' exports to RW. Column 1 is the benchmark specification (identical to column 7 of Table 3). Column 2 winsorizes the top and bottom 1% of the outcomes. Column 3 removes the pre-trend control. Columns 4-7 respectively use country-by-HS2, industry, country, and no fixed fixed effects. Column 8 estimates responses using only tariffs imposed by the US and China on each other, and column 9 controls for changes in other countries' export market access (i.e., estimates β 5 and β 6 from equation 11).
In Appendix C.1, we present a complementary analysis and discussion of results using an instrumental variables estimation approach in which we instrument exports to RW with exports 28 to the US and China. While the identifying assumptions necessary for unbiased IV estimation are unlikely to strictly hold in our setting due to violations of the monotonicity assumption, we view the evidence as broadly consistent with our main results.
Our approach has assumed that responses vary by country. In Appendix C.2, we implement regressions that allow export responses to be sector-specific, but common across countries.
The analysis reveals substantially greater variance in predicted export growth due to country heterogeneity relative to sector heterogeneity. That is, if demand and supply elasticities are allowed to be sector-specific, differences in specialization patterns across sectors do not go nearly as far in generating differential export responses across countries as when we allow for country-specific elasticities. Hence, country-specific demand and supply elasticities, rather than specialization patterns coupled with sector-specific elasticities, are the main driver of international differences in export growth from the trade war.

Conclusion
The US-China trade war raised concerns that the era of global trade growth would come to an end.
Our results provide little support for this view, at least for the medium-run time horizon that is the focus of our analysis. Indeed, trade between the two largest economies, the US and China, declined significantly. However, we also find that trade among indirectly affected bystander countries, as well as trade between these countries and the US, increased substantially. As a result, global trade increased in the products targeted by the tariffs. Rather than merely reallocating global trade flows, the trade war appears to have created new trade opportunities for many countries.
A natural focus for future research would be to explore the forces driving countries' heterogenous substitution patterns and supply responses. While the product-level global trade data that we have used are useful to uncover broad reallocation patterns, firm-level data would be valuable to explore the underlying micro-economic forces-such as firm investments, supply chain reallocations, and entry and exit-driving these country-specific elasticities. We anticipate further research on these mechanisms when the appropriate data becomes available. Notes: Figure reports countries' pre-war export shares by sector. Pre-period: β=-0.05 (0.10). Post-period: β=0.24 (0.08).

Panel F Bystanders' Exports to RW
Notes: The panels show binscatter plots of countries' export growth (on the y-axes) against changes in tariffs due to the trade war (on the x-axes). Unlike Figure 2, these figures do not control for fixed effects. Below each panel we report the corresponding OLS coefficients (standard errors are clustered by product in Panels C-F).          Table 3 and extensive margin responses in Table A.6. residual by product,ê n ω , 32 the general-equilibrium interactions are captured by GE n iω = α n ij + η n iω , where Suppose further that we start around an equilibrium such that, within each sector, countries split their shares equally across destinations (X n iω /X iω = λ n iω = 1 N ) and expenditure shares across source countries within an importer vary only by source country (s n iω = s i ). As a result,λ n iω = λ j i ≡ 1 N s i . Then, (B.36) adopts the functional forms in (9) and (11), with the coefficient β n 1i given in (10), and with remaining coefficients as follows: To show the proposition, using (10) we get that, if σ CHi > 0 then, for n = U S, ∂X n iω ∂T U S,CH,ω > 0 ∂T U S,CH,ω < 0 given these conditions. When n = U S, if σ CHi > 0, then ∂X n iω ∂T U S,CH,ω > 0 ↔ s i σ ii b i > 1, implying that either: i)

C.1 Instrumental Variables Approach
Here we present a complementary approach to studying how bystander countries' exports responses to the US-China tariffs. In our theoretical framework, downward-sloping supply curves 32 If aggregate demand within sectors is Cobb-Douglas across products with same shares for consumers and producers, thenê n ω = 0.

44
imply that a change in exports to the rest of the world due to these tariffs must be mediated by a change in exports to the US and/or China. This logic naturally suggests an instrumental variables (IV) approach, where we regress countries' product-level export growth to the rest of the world on their product-level export growth to the US and China, instrumenting with the tariffs.
Before examining the results from this approach, we consider the four key assumptions that must be satisfied to ensure unbiased IV estimation with heterogenous treatment effects (Imbens and Angrist, 1994). First, we have argued earlier that the tariff changes are plausibly exogenous.
Second, the exclusion restriction requires that the tariffs must only affect countries' export growth to the rest of the world via changes in exports to the US and China. While this assumption strictly holds in our theoretical framework, in reality it may be violated if, for example, expectations change about the likelihood of additional tariffs, or tariffs broadly increase uncertainty about the future path of government policies. In other words, it is possible that the tariffs directly influence bystander countries' exports to RW , rather than influence exports to RW through changes in exports to U S and/or CH. Third, there should be a strong first stage between the tariffs and exports to the US and China, which we can assess empirically. Finally, the monotonicity assumption requires that all countries respond to the tariffs in the same direction in the first stage.
This assumption is likely violated since, as we show in Figure 3, some countries' exports are complements with US and China, rather than substitutes. Notwithstanding these caveats, we view the IV analysis as a useful and informative complement to the evidence we have provided in the main text.
We turn now to the regressions, and trace the logic of our theoretical framework through the results. First, column 1 of Table C.1 regresses Chinese export growth to the US on the US tariff on China with industry fixed effects, and again confirms that the trade war caused a sharp and statistically significant decline in US imports of Chinese products. 33 Column 2 shows that the US tariffs on China simultaneously caused third-party countries to increase their exports of those targeted products to the US. Column 3 regresses bystanders' export growth to the rest of the world on their export growth to the US, instrumenting with the US tariff on China. The IV coefficient in column 3 implies that, on average, a 1% increase in exports to the US due to the trade war tariffs further induced a 0.70% increase in exports to the rest of the world.
Columns 4-6 show analogous regressions from the Chinese side. Column 4 demonstrates that US exports of targeted products to China declined sharply. Column 5, which is the first stage of column 6, shows that bystanders do not increase their exports of targeted products to the China, consistent with the main results (the point estimate is negative and noisy). This first stage is weaker than in column 3, perhaps reflecting modestly more prevalent violations of the monotonicity assumption, which would be consistent with the results from Figure 3 showing that bystander countries' exports are more likely to be complements with China than with the US. Column 6 shows the IV specification, regressing bystanders' export growth to RW on their export growth to China, instrumented with the China tariffs. The resulting IV coefficient is imprecisely estimated, and difficult to interpret given the weak first stage.
In sum, the evidence from these IV specifications supports the main evidence that the trade war tariffs increased the exports of bystander countries to the US and to the rest of the world and decreased exports to China. Notes: Column 3 (6) examines rest of the world exports to rest of the world regressed on exports to the US (China) which are instrumented with the US (China) tariffs on China (US). Standard errors clustered by product in columns 2-3 and 5-6.

C.2 Sector vs Country Heterogeneity
Our main empirical analysis in Section 4.3 allows for different countries' exports to respond heterogeneously to the trade war tariffs. Here, we further explore whether the data suggest an important role for sector heterogeneity as well. Specifically, we estimate a slight variation on equation (12), regressing the log change in exports each of each variety in sector j to each destination n and including a country fixed effect: ∆ ln X n iω = α n i + β n 1j ∆ ln T U S CH,ω + β n 2j ∆ ln T CH U S,ω + β n 3j ∆ ln T U S i,ω + β n 4j ∆ ln T CH i,ω + π n j ∆ ln X n iω,t−1 + n iω (C.43) Since we estimate (C.43) separately by sector and include country fixed effects, the identification, as before, leverages variation across products within country-sectors. However, here the tariff elasticities are permitted to vary by sector, rather than by country. We use the estimated coefficients to generate predicted values for each country exactly as in equation (13), and aggregate to the country level exactly as in equation (14).
Figure C.1 plots the predicted values from the sector-heterogeneous regressions against the predicted values from the country-heterogeneous regressions (taken from Figure 4). Recall that the standard deviation in predicted responses from the country-heterogenous regressions is 4.4%, while in contrast the standard deviation in predicted responses from the sector-heterogenous regressions is 1.80%. We thus observe greater variance in predicted exports due to country heterogeneity than due to sector heterogeneity. While it is possible that an analysis with greater statistical power and/or a longer time horizon could identify a distinctive role for both countryand sector-specific heterogeneity, the results support the decision to focus on country-specific responses. Notes: Figure plots predicted country-level export growth from regression specifications that allow for country heterogeneity (x-axis, taken from Figure 4) versus specifications that allow for sector heterogeneity (y-axis).