Trade Policy and Exporters’ Resilience: Evidence from Indonesia ∗

How does trade policy aﬀect exporters’ ability to source intermediate inputs and adjust exports in response to foreign shocks? Faced with a sudden change in the demand for their goods, exporting ﬁrms must adjust their production inputs and/or sources optimally. This paper tests whether a country’s trade policy makes such adjustments harder for ﬁrms relying on imported inputs. The analysis exploits new time-varying data on non-tariﬀ measures (NTMs) faced by Indonesian ﬁrms. In response to a depreciation of the Yuan which makes Chinese exports more competitive in third markets, Indonesian ﬁrms facing NTMs on their inputs see a much larger drop in their export values compared to ﬁrms that do not face any NTMs, with the magnitude of this eﬀect varying depending on the type of NTM. We show that this diﬀerence can be explained by the inability of ﬁrms facing NTMs to take advantage of cheaper intermediate inputs from China in the face of depreciations of the Yuan.


Introduction
Global events such as the Covid-19 crisis, US-China trade war and the Russia Ukraine war have renewed the interest of economists in the determinants of firms' ability to adjust to economic shocks.A relatively large literature has analyzed different types of firm-level characteristics such as innovation activities, management practices, and market power that determine the extent of adjustment to such shocks (Gupta, 2020; Hyun et al., 2020; Ding  et al., 2021).Despite yielding important findings on firms' resilience to shocks, these studies may provide limited guidance to policy-makers as many factors that are not directly affected by policies can explain the variations in these characteristics across firms. 1 In this respect, the role of trade policy is a particularly important gap in the literature, given the increasing connectedness of firms through global value chains.Access to foreign intermediate inputs can increase the amount and quality of firm-level exports by exposing firms to new inputs and technologies (Goldberg et al., 2010; Fan et al., 2015; Halpern et al.,  2015; Feng et al., 2016).As a result, a firm that is an exporter is also more likely to be an importer.Faced with a sudden change in the demand for their goods, exporters need to optimally change their inputs and/or input sources.To the extent that trade policy measures such as non-tariff measures (NTMs) change the relative costs of such adjustments, these measures could have a prominent impact on the resilience of firms to shocks.
This paper helps to fill this gap by examining the role of trade policy, in particular, nontariff measures (NTMs), in affecting the resilience of exporters to exchange rate shocks that affect both the final demand for their products as well as the competitiveness of the inputs they source.Specifically, in our main analysis we focus on how exchange rate shocks in the Chinese Yuan affect Indonesian firms' exports to Japan, the largest regional trading partner for Indonesia (after China) and the export destination during 2014-2018 for 1,177 Indonesian importer-producer firms. 2 In an extension, we show that results hold when we focus on Indonesia's top-5 export destinations (excluding China).In response to a depreciation of the Yuan which makes Chinese exports more competitive in Japan, firms facing NTMs on their inputs see a much larger drop in their export values compared to firms that do not face any NTMs, with the magnitude of this effect varying depending on the type of NTM.We show that this difference can be explained by the inability of firms facing NTMs to take advantage of cheaper intermediate inputs from China in the face of depreciations of the Yuan.We explain this via a theoretical model à la Halpern et al. (2015) where NTMs act as additional fixed costs associated with importing an additional foreign intermediate input.
This study is possible by matching novel data on Indonesia's trade policy measures at a highly disaggregated product level with data on the universe of Indonesian producers who are also exporters.We focus only on producers as opposed to wholesalers and retailers because the mechanism via which NTMs affect firms' ability to source intermediate inputs and produce and export is only relevant for firms who are producers.A key innovation of this paper is the extensive coverage of NTMs, which represent increasingly important but still under-researched trade policy instruments (Nicita, 2012; Bacchetta and Beverelli, 2012).Specifically, we address the data limitation by assembling a novel hand-collected database of NTMs from different regulatory agencies in Indonesia for 2014-2018.We then link these NTMs (as well as tariffs) to firm-level customs data at the 10-digit HS level, the most detailed product classification available.Using these data and highly disaggregated information on import tariffs for the same period, we analyze how different trade policy interventions affect the ability of Indonesian exporters to adjust to sudden changes in foreign demand.
Indonesia provides a suitable context for the analysis for several reasons.First, it fits remarkably well the general pattern of trade policy in developing countries over the past three decades, namely, import tariff liberalization since the 1990s and a contemporaneous increase in NTMs.Second, many of these NTMs are applied on intermediate inputs and have been changed frequently over time, thus providing a rich source of variation for our analysis.Specifically, merging customs and policy information allows us to build a unique dataset on the universe of producers that are also exporters and their imported inputs with precise timevarying data on trade policy at a detailed product level.Finally, many Indonesian exporters compete with Chinese producers in third markets, particularly Japan.Importantly for our analysis, Indonesian exports are denominated in USD.These characteristics allow us to exploit the significant changes in the Yuan/USD exchange rate (Yuan per unit of USD) in the 2010s as an exogenous demand shock to Indonesian exporters to Japan.
The demand shocks we use are monthly variations in exchange rates between the Yuan and the USD.Such exchange rate movements-out of the control of Indonesian firms-affect their exports by changing the relative prices of Indonesian and Chinese goods in Japan, where the largest share of imports are from China.Consider a depreciation of the Yuan versus the USD, which is the case for most of our sample period.One of the key strategies through which an Indonesian exporter could counter the increase in Chinese competition in third markets associated with this exchange rate shock is to source more intermediate inputs from China.Import measures can affect the exporters' ability to switch inputs and -hence -to respond to the shock.By increasing the fixed cost per shipment of new import varieties, NTMs would typically raise the cost of switching intermediate inputs.That is not the case for import tariffs, which raise the cost of the imported inputs proportionately to their value.Our theoretical model underscores this key difference between the effects of NTMs and tariffs by modeling NTMs as an extra fixed cost for importing a new variety of intermediate input.
To test these hypotheses, we employ a differences-in-differences approach.Specifically, we study how firms facing different levels of NTMs and import tariffs on their inputs and different levels of exposure to Chinese competition in the Japanese market respond to exchange rate shocks in the Yuan.This approach builds on the theoretical framework of Feenstra et al.  (2018) and Mattoo et al. (2017), who analyze how depreciation in the Yuan affects exports from third-country markets.Differently from these papers, we analyze the export response of Indonesia at the firm level and focus on how trade restrictions on inputs affect this response.Intuitively, this strategy captures the differences in the elasticity of exports to exchange rate shocks between two firms that face exactly the same level of Chinese competition but different levels of NTMs and tariffs.
We find that NTMs negatively affect firms' resilience.In response to depreciations of the Yuan, we find that firms that face NTMs on their inputs see a much larger drop in their export values compared to firms that do not face any NTM.If we compare two firms facing the same (mean) level of Chinese competition, the firm at the 75th percentile of NTM exposure will see a 4.1% larger fall in exports than the firm at the 25th percentile of NTM exposure.We find no significant effect of tariffs.We then explore how different NTMs affect exports without bundling all the NTMs into a single measure.We study the impact on exporters' resilience to shocks of the most prevalent NTMs and find negative and significant impacts of three of these NTMs on exporters' responses.On the import side, using a differences-in-differences strategy, we show that the key mechanism driving the poor export performance of firms facing NTMs is their inability to source newer imported input varieties from China compared to firms who do not face NTMs.While our main analysis focuses on exports to Japan, our results are robust to using data for Indonesia's top-5 export destinations (excluding China).
Our estimates of the effects of NTM exposure of imports on firms' exporting behavior could be biased if the same time-varying unobservables affect trade policy measures and export responses.For example, a common concern in the trade protection literature is that certain firms or industries can lobby with the government and influence trade policy in their favor.We address the potential endogeneity of trade measures in various ways.First, our model employs an extensive set of firm-product, product-time, and firm-time fixed effects that control for any time-varying shocks at the firm or product level that may drive both export outcomes and our identifying variables.Similarly, such controls also address possible reverse causality issues, including firm-or sector-level lobbying efforts.Second, as further robustness checks, we add baseline export-product characteristics interacted with time effects and exclude the dominant exporters in specific products.Third, we construct the trade exposure measures using time invariant weights based on the firms' import shares at baseline.Using the baseline import shares addresses the concern that if firms substituted away from imports subject to NTMs for imports that were not, we would be underestimating the firms' exposure to NTMs.
This paper relates to three strands of recent literature.The first is the literature on the economic effects of trade policy (Goldberg and Pavcnik, 2016; De Loecker et al., 2016; Amiti  and Konings, 2007; Handley et al., 2020; Fan et al., 2015; Amiti et al., 2019; Handley et al.,  2020; Fajgelbaum et al., 2020) and non-tariff measures in particular (Ederington and Ruta,  2016; Fontagné et al., 2015; Grundke and Moser, 2019; Kruse et al., 2021).A key message from this literature is that, as NTMs have progressively replaced tariffs as a determinant of trade costs, an analysis focused on NTMs is needed to precisely assess the impact of trade policy.In turn, this requires having more detailed information on the exact type and content of NTMs.This paper is the first to compute a firm-level NTM exposure measure by utilizing the information on NTMs imposed on the imports of an exporter at the firm level, which allows to establish a causal relation between NTMs and firm response to shocks.Similarly to work on tariffs and firms' performance (Amiti and Konings, 2007), we find that NTMs on imported inputs can reduce the ability of firms to adjust to shocks.
A second related literature is the body of work that studies the determinants of firms' resilience to shocks, particularly through global value chains.Recent papers exploit natural disasters such as the Tōhoku earthquake off the coasts of Japan in 2011 to analyze how shocks transmit through firms' operations either domestically (Carvalho et al., 2016) or internationally (Boehm et al., 2019).A second group of studies focuses on the impact of the COVID-19 shock, and the related lockdown measures, on firm-level trade (Espitia Rueda  et al., 2022; Berthou and Stumpner, 2022; Lafrogne-Joussier et al., 2021; Fujiy et al., 2022).Finally, another group of recent studies investigates how firms re-organize production in response to different types of economic and policy shocks (Navaretti et al., 2019; Caliendo  et al., 2020).Our paper contributes to this literature by providing novel evidence on the role of policy factors, particularly the stringency of NTMs and tariffs, mediating the impact of economic shocks.
Finally, our paper relates to the voluminous literature on exchange rate shocks and trade (Berman et al., 2012; Amiti et al., 2014).The large majority of this work focuses on the impact on a country's exports when its currency becomes more volatile or changes in level (either appreciates or depreciates).As discussed above, our approach is similar to Mattoo  et al. (2017) which studies the impact of a change in the Yuan on third countries' trade.We contribute to this literature by documenting the sensitivity of exports to the exchange rate shock of a competitor country but at the firm level and showing how this sensitivity is affected by the countries' own trade policy.In addition, we document a key mechanism which affects firm-level export response to exchange rate shocks-the inability of firms facing NTMs to switch to newer varieties of intermediate inputs that are rendered cheaper due to exchange rate shocks.
The rest of the paper is organized as follows.Section 2 describes how trade policy affects firms' resilience to export demand shocks.Section 3 discusses the empirical context of the paper, including the exchange rate shocks and the Japanese export market, and our data sources.In Section 4, we present our main empirical strategy and identifying assumptions.In Section 5 we illustrate the results, including evidence for the main mechanism underlying our findings and different robustness checks.Lastly, Section 7 concludes with a discussion of the policy relevance of our findings.

Conceptual framework: How import measures can affect firms' resilience
This section seeks to clarify how NTMs on imports affect a firm's ability to adjust its sources of input supply when faced with a negative demand shock.The negative demand shock is a reduction in demand for Indonesian products due to a depreciation of the Yuan in markets facing a high degree of competition from Chinese products.However, Indonesian firms can in principle also take advantage of a a depreciation of the Yuan to source more Chinese imported inputs that are now cheaper, thereby buffering its exports from some of the negative consequences of depreciation.How easily a firm is able to source inputs from China in the face of depreciation depends on the additional cost of importing the new input compared to the additional gain from importing.
We borrow the conceptual framework from Halpern et al. (2015) and Gopinath and  Neiman (2014) to analyze how firms choose the optimal quantity and variety of foreign inputs, and to understand the impact of increased import usage on each firm's production, and subsequent export activities.We augment the framework with the presence of NTMs on certain inputs that impose additional fixed costs of importing.The model considers the decisions made by firms that are heterogeneous in their productivity, and use multiple intermediate inputs to produce a single product.The intermediate inputs chosen could be sourced from domestic and foreign suppliers, each of which involves different costs.Specifically, sourcing products from foreign suppliers involve paying some fixed costs.Additionally, some of the foreign inputs maybe subject to NTMs, which imposes an additional fixed cost of imports for these firms.While import tariffs entail an increase in the cost of imports proportionate to the imported value, NTMs entail an increase in the cost of importing which is usually not related to the value of imports and may vary depending on the nature of the compliance implied by the measure.For instance, a pre-shipment inspection (PSI)-one of the most widespread NTMs during our analysis-involves a third party verifying that the containers' products are correctly identified in the import declaration.This verification generates a monetary cost per shipment.3More broadly, NTMs generate various compliance costs primarily because authorities have discretion in verifying compliance with each measure which can give rise to uncertainty on the timing of clearance for each shipment. 4n the model, domestic inputs are not subject to any fixed costs.Foreign inputs can augment productivity and potentially bring in more savings (resulting in potentially higher quality adjusted price) but also entail fixed costs.Foreign inputs that face NTMs face an additional fixed cost of import.To fix ideas, let us assume a depreciation of the Yuan versus the USD, which is the case for most of our sample period (Figure 1).This exchange rate shock reduces the quality adjusted relative price of imports from China while reducing the export demand facing Indonesian exporters in Japan who invoice in USD and who face a high degree of Chinese competition.Consider two inputs that cost the same in equilibrium, one facing NTM and the other not facing any NTM, and both facing the same percentage reduction in prices due to a depreciation of Yuan, such that the incremental gain from importing either input is the same.But since the fixed cost of importing the additional input with NTM is higher than the one without, for the same incremental gain, firms facing NTMs on inputs may not find it profitable to import the additional input while firms facing no NTMs find it profitable.Therefore, NTMs prevent firms from sourcing more foreign inputs from China when Chinese inputs witness an increase in quality adjusted prices.This leads to a greater reduction in production, and hence exports for firms facing NTMs compared to firms who do not face any NTM.Since tariffs do not affect the fixed costs of production, the presence of tariffs do not prevent firms from sourcing new inputs in response to reductions in input prices driven by depreciations.Our theoretical framework, outlined in Appendix A1.1 leads to two predictions: First, facing the same negative export demand shock in the product market, importer-producer firms who face NTMs would have a larger fall in exports compared to firms who do not face any NTMs.Second, given that importing an extra input involves additional fixed costs in the presence of NTMs, firms facing NTMs on inputs source from a smaller number of countries compared to firms who do not face any NTMs.

Data and context
To carry out the analysis, we make use of two main novel sources of data.The first is monthly data on the universe of Indonesian exporters and importers which was confidentially shared by the Indonesian Directorate General of Customs and Excise (DGCE, referred to as DG Customs in the paper) within the Ministry of Finance. 5 The second is a time-varying data of NTMs at a highly disaggregated level of sectoral classification (HS-10 digit), which was assembled and maintained for Indonesia by the World Bank.This data was compiled based on extensive regulatory checks and varies monthly at 3-digit MAST classification and 10 digit HS level.This section also provides information on other data used in the analysis and the choice to focus the main analysis on Indonesian firms' exports to Japan.

Indonesian customs data
For the trade data, we use customs-level monthly data covering the universe of Indonesian exporters from 2014 to 2018.The export data covers the universe of all Indonesian exports between 2014 and 2018, excluding those from oil exports.As such, our export data represents more than 77% of total exports during this period and encompasses 20,944 firms.Meanwhile, the import data spans the full spectrum of Indonesian imports in the same period, excluding oil imports.It accounts for around 80% of total imports between 2014 and 2018 and represents the import activities of 36,895 firms.One of the appealing features of these datasets is the highly disaggregated level (10-digit HS code) at which they are recorded.The data contains the monthly dollar value and quantities of imports and exports at the firm-year-month-HS-10 product level, along with information on the country of origin for imports and the destination for exports.
An unique feature of our data is that we are able to identify exporters who are producers, as opposed to just pure traders.Since we are interested in how NTMs applied to imports affect exports of firms that rely on these imports for their production, particularly in the event of a demand shock, we exclusively use data from Indonesian exporters that import directly and are producers. 6 total of 9,235 firms, representing about 44% of all exporters, both import and export directly during 2014-2018.Out of these, 3,821 firms were also producers, and among this subgroup, 1,177 exported to Japan at least once within the period of analysis.Despite these 9,235 firms being fewer than half of all exporters, they accounted for about 70% of the total Indonesian export value to all destinations countries during the same period.Notably, in 2018, the export value of the importer-producer firms contributed to more than 33% of this 70% (Figure 2).The remaining 30% of the total Indonesian export value came from firms that only exported and did not import directly but may purchase imported inputs through third parties.This is consistent with stylized facts globally where importing exporters tend to dominate trade (World Bank, 2020).

Indonesian NTM and tariff data
NTM-related regulations have been spread out among a total of 13 government institutions (ministries, agencies, and some are issued as a presidential decree) during our period of analysis (2014-2018).Each institution has its own mandate.This makes monitoring NTMs difficult since no dedicated government institution can carry out NTM regulatory review and stocktaking (Munadi, 2019).
To overcome these issues, we use a novel comprehensive NTM data-base built by the World Bank based on data collected by the Economic Research Institute for ASEAN and East Asia (ERIA) in collaboration with UNCTAD (Calì et al., 2021).The UNCTAD/ERIA data identifies the stock of NTMs applied by Indonesia as of 2015.The data is cleaned extensively to address coding and interpretation errors and made time-varying by tracking the individual NTMs applied to each product before and after 2015. 7The data uses the most disaggregated NTM classification available, i.e., 3-digit MAST level.This classification is the most appropriate for policy analysis as it identifies individual measures introduced or modified by each agency.A total of over 60 3-digit NTMs are available in the dataset, each with values coded between 0 and 1 to signify when they were in effect; that is, the data varies at the month-product pair.
In addition, we complete the trade policy data with import tariff data collected by the UNCTAD Trade Analysis Information System (TRAINS) data-set.For Indonesia, this data includes yearly Most Favored Nations (MFN) applied import tariff at the HS 10-digit product level.8 3.3 Japan: The main regional destination for Indonesian and Chinese exports We base the analysis on a single individual export market to make the empirical analysis manageable and to focus on a similar set of exporters facing the same shock, though in supplementary analysis reported in Appendix A3.3 we expand the analysis to the top five exporting markets for Indonesia.9Several reasons make the Japanese market particularly suitable for this analysis.
First, Japan is the most important regional trading partner for Indonesia (excluding China) and is among Indonesia's top three export destinations in our sample period.Exports to Japan represent about 11% of all export value for Indonesia within the period of analysis.
More importantly, Indonesian firms face a high degree of competition from Chinese firms in Japan as China is Japan's top trading partner in terms of imports, with over 20% of Japanese imports originating from China in 2018.10Indeed, Japan is also among the top 3 export destinations for China.
A further reason to focus on Japan is the high quality of the data.We are able to obtain monthly Japanese imports data from the United Nations Comtrade Database for the years 2014 to 2018.This data provides monthly information on imported values disaggregated at the HS-6 level and by partner country.Using this data, we can quantify the share of Japan's imports originating from China for each HS-6 product relative to the total imports of that product.This measure is useful to compute the degree of Chinese competition faced by Indonesian firms within the Japanese market, as discussed in Section 4.
As our empirical analysis uses demand shocks faced by Indonesian exporters in Japan that are driven by fluctuations in exchange rates of Yuan per USD, in Section 3.4, we show the extent of exchange rate fluctuations during our period of analysis.
Finally, it is worth noting that Indonesia and Japan have an economic partnership agreement regulating their trade.However, this should not affect our analysis as the agreement was signed in 2008, and its rules have not changed since, while our analysis covers a later period.

Exchange rates
We use data from the International Finance Statistics (IFS) for our exchange rate data.The data is the monthly average of bilateral exchange rates between Yuan and the USD.We also use the Federal Reserve Bank of St. Louis as a source for the Consumer Price Index (CPI) for the real exchange rate calculation.Figure 1 Panel B plots the log value of real exchange rate between Yuan and USD over the period of analysis.While there have been significant short-term fluctuations in the Yuan/ USD exchange rate during this time period, which we will exploit in our analysis, the overall trend has been toward depreciation.
In all our specifications, we use the log real exchange rate between Yuan and USD as the relevant exchange rate facing Indonesian exporters, since an average of 94% of Indonesian exports (Table A1) and 81% of imports were invoiced in the USD in our sample period.As pointed out by Gopinath et al. (2020), there is very little evidence that the best description of pricing in international markets follows either PCP (Producer Currency Pricing) or LCP (Local Currency Pricing).Instead, the vast majority of trade is invoiced in a small number of dominant, vehicle currencies (VCP), with the U.S. dollar playing an outsized role.It is, therefore the share of these small number of currencies that overwhelmingly determines the level of exchange rate pass-through, even under various exchange rate regimes (Montfaucon  et al., 2021).Higher pricing in the USD leads to higher pass-through of the USD and higher sensitivity to trade when there are fluctuations (Boz et al., 2022), with pass-through often higher when a vehicle currency is used (Devereux et al., 2017).The bilateral exchange rate is thus not suitable for determining the pass-through of the exchange rate.Therefore, the Yuan-USD exchange rate is more appropriate for this analysis.

Empirical specification
In our main empirical specification, we analyze how firms facing different levels of NTMs on their inputs and different levels of exposure to Chinese competition respond to exchange rate shocks in Yuan.Our empirical analysis builds on the framework of Feenstra et al. (2018)  and Mattoo et al. (2017) who analyze how depreciations in Yuan affect exports from third country markets.The major difference is that we analyze this export response at the firmlevel, and focus on how NTMs and tariffs on inputs affect this response.Equation 1 below is our main empirical specification.
V igt : The value of exports of HS-4 digit product g from firm i in Indonesia to Japan in month t; I ig,0 : The index of competition in Japan between Chinese exports and those from Indonesia in product g for Indonesian firm i over the first 12 months (export period 0) of the firm's export activities within the Japanese market.;E China U SD,t : Exchange rate between Chinese Yuan and USD, expressed as Yuan/USD; N T M Exposure i0,t−l and T arif f Exposure i0,t−l are the measures of NTM and tariff exposure of the firm i in month t−l, computed on the basis of the firm's initial composition of the import bundle during the first 12 months (import period 0) of firm i in the import market.The term l in these equations represents the number of lags in months, capturing how changes in NTM and tariff exposures from previous months impact current export values.This inclusion of lags captures the lagged response of firms in adjusting to changes in trade policy.We will describe the construction of the Chinese competition index, NTM and tariff exposure variables in detail below.
Following Mattoo et al. (2017), we formally define the competition index that each firm faces vis-a-vis China in Equation 23 below.
EX ig ,0 EX ig,0 : Measures the importance of HS-6 product g in the total exports of the HS-4 product g exported to Japan by Indonesian firm i at export period 0, which denotes the firm's initial 12-month period of export activities within the Japanese market during 2014-2018; M S China ig ,0 : China's share of HS-6 product g in Japan's total imports of g during the same initial 12month period for firm i.The share of each HS-6 in an HS-4 product ( EX ig ,0 EX ig,0 ) is weighted by China's share of product g in the total imports of g by Japan (M S China ig ,0 ) and summed over all HS-6 products g within an HS-4 product g to arrive at a measure of Chinese competition index at the Indonesian firm i and HS-4 product g level at export period 0.11 We follow Mattoo et al. (2017) in constructing this index at the HS-4 level using disaggregated product data at HS-6 to reflect the fact that too narrowly defined products, such as HS-8, may not accurately reflect the effects of Chinese competition while too broadly defined categories such as HS-2 may confound these effects.
Intuitively, according to this measure, if the HS four-digit product, let's say TVs, consists of only two items, color TVs and non-color TVs, the measure is simply the share of Chinese imports in Japan's imports of each type of TV, weighted by the importance of each type of TV in firm i's TV exports to Japan.If the firm faces no competition from Chinese imports in its initial 12 months in the export market, the value of this measure is 0, while if all the products face competition from Chinese imports and China's import share in all these products is close to 1, this measure is close to 1 as well.
S it , v ig , and γ gt capture any firm-time, firm-product, and product-time characteristics, respectively.It is important to control for each of these fixed effects.Since we follow a panel of firms, firm-time fixed effects capture any time-varying unobservables at the firm level, for example, unobservable changes in firm productivity.Firm-product fixed effects control for any unobserved HS-4 product characteristics that vary across firms; for example, some firms could be supplying a higher quality HS-4 product than other firms.Product-time fixed effects control for any unobserved changes over time in product demand or product quality.As we argue below in Section 4.2, these controls also help relieve concerns about the endogeneity of the trade measures.The trade policy variables N T M Exposure i0,t and T arif f Exposure i0,t used in Equation 1 above are defined in the following Section 4.1.

Trade measures
Equation 1 includes two trade policy variables, which enable the identification of their effects on exporters' resilience to shocks.The first variable, N T M Exposure i0,t , measures the exposure of firm i to NTMs in month t.It does so by combining the baseline import shares of different HS-10 products in a firm's import basket at import period 0 with HS-10 product level changes in NTMs at month t.Using the baseline import shares addresses the concern that if firms substituted away from more to less NTM-intensive imports, we would be underestimating the firms' actual exposure to NTMs.We combine the trade data with monthly data on NTMs applied by Indonesia on imports at the HS-10 level.This data is used to compute the share of firm i's total imports at import period 0 that are attributable to HS-10 products subjected to NTMs at month t.12 .More formally the exposure measure is as follows: where j is the HS-10 product, N T M jt = 1 if an NTM on HS-10 product j was in effect in month t and 0 otherwise.The baseline import share of product j in exporter i imports is the fraction , where IM P ij0 = t=m 12 t=m 1 Imports ijt .m 1 is the first month that firm i joined the import market between 2014 and 2018, and m 12 = m 1 + 11 denotes the end of a 12-month period.By definition, this weight will only have values for exporting firms that also import directly.For the aggregate NTM measure in Section 5.1, the NTM dummy (N T M jt ) is 1 if any of the 60+ NTMs in our data was in effect.For the specific, trade-distorting NTMs discussed in Section 5.2, N T M jt = 1 if that specific measure was in effect.
The second trade measure, T arif f Exposure i0,t , is similar to the N T M Exposure i0,t .It is the measure of tariff exposure of the firm i in month t, where the shares of different HS-10 goods in the firm's import bundle are determined from the first month m 1 that firm i joined the import market during the period 2014-2018, to the twelfth month m 12 , which represents the end of a 12-month period after joining the import market -import period 0. We combine the trade data with monthly data on tariffs applied by Indonesia on imports.The exposure is computed as follows: j is the HS product, T arif f jt is the tariff rate on HS-10 product j in month t, and all other variables are as previously defined in Equation 3.
Table 1 shows the average degree of exposure to Chinese competition and the levels of NTMs that Indonesian firms faced during the analysis period.The average level of exposure to Chinese competition was about 0.37, with a high degree of variation.While firms at the bottom 10% of this distribution faced a low level of competition of 0.02, the top 10% faced an index above 0.75.The firms faced an average NTM exposure of about 45% and average tariff exposure of only about 6%.There is also a larger dispersion in the extent of NTM exposures faced by firms compared to tariff exposure: While firms in the bottom and top 25% of NTM exposures faced average exposures of 5% and 89%, the corresponding numbers for tariff exposures are only 5% and 7%.Table 1 also shows the average level and dispersion in specific types of NTMs faced by Indonesian firms, which we will discuss in Section 5.2.
We are interested in the coefficients α 2 and α 3 .α 2 captures the differences in the elasticity of exports to exchange rates between two firms who face exactly the same level of Chinese competition, but different levels of NTMs on imported inputs.α 3 captures the differences in the elasticity of exports to exchange rates between two firms that face exactly the same level of Chinese competition but different levels of tariffs on imported inputs.While NTMs can be justified from a public policy perspective (see further discussion below), they create a fixed cost for firms that rely on imported inputs to comply with regulatory requirements, thus making it more difficult to adjust the input composition and reducing the resilience The sample comprises firms that export to Japan and that are also importer producers.The table shows the summary statistics (number of observations, mean, standard deviation, 10th percentile, 25th percentile, median, 75th percentile, 90th percentile and maximum) of the firm-level competition index defined in Equation 23, the NTM and tariff exposure measures defined in Equations 3 and 4, the log value of exports and the real exchange rate (RER) for the period under study (2014-2018).
of firms' responses to sudden changes in competition conditions in third markets.As a result, we would expect these NTMs to reduce the export response of firms during the many episodes of rapid Yuan-USD exchange rate depreciations that affect the competitiveness of Indonesian exports relative to Chinese exports in Japan observed during the period under study (i.e.we expect α 2 to be negative).In contrast to NTMs, tariffs affect the variable costs of importing inputs but do not create fixed costs for importing firms.As a result, we do not necessarily expect tariffs to have a systematic impact on the export resilience of Indonesian firms to Yuan-USD exchange rate shocks.

Endogeneity concerns
The ideal scenario for identification requires the interaction between the export demand shock and the trade measure to be exogenous to product exports at the firm level.While the demand shock resulting from changing competition conditions due to exchange rate variations is arguably exogenous to the firm, that may not be the case for the trade policy variables.In fact an ample literature documents the sizable influence of firms and sectors on trade protection (Grossman and Helpman, 1994; Goldberg and Maggi, 1999; Bombardini  and Trebbi, 2012).
Our setup is able to address this endogeneity of trade measures through S it and γ gt , which capture all firm-time and product-time characteristics, respectively.This extensive set of fixed effects can control for any time-varying shocks at the firm or product level that may drive both export outcomes and our identifying variable.In the same vein, such controls would address possible reverse causality issues, including firm-or sector-level lobbying efforts.
These controls imply that identification comes from two comparisons: (i) between different products within a firm on the basis of the degree of export demand shock and (ii) between different firms exporting the same product on the basis of the degree of firm-specific trade exposure.Given the likely exogeneity of the export demand shock, the key endogeneity concern comes from (ii).To relieve that concern the trade exposure measures -as defined in Equations 3 and 4 -are constructed using time invariant weights based on the firms' import shares at baseline -import period 0. Using the baseline import shares addresses the concern that if firms substituted away from more to less NTM intensive imports, we would be underestimating the firms' exposure to NTMs.
To address the remaining endogeneity concerns, we also perform three further tests.First, we add in the vector of controls the baseline firm's share of HS-4 product exports in the overall HS-4 exports of Indonesia to all countries, interacted with time fixed effects.The Indonesian total export aggregate is derived solely from firms in our regression sample -exporters to Japan that are also importer producers.The export share is calculated using the first 12 months of each firm in the export market between 2014 and 2018.This should capture firms' ability to affect trade barriers on inputs on the basis of the firms' importance in the exports of products using those inputs.Along similar lines, the second test excludes firms identified as 'overall top exporters'-firms whose total export value (the sum of export values of all their HS-4 exported products) to all destination countries during their initial 12-month period in the export market ranks in the top 10% compared to the total export values of other firms in our sample during the same period.Similarly, the third test removes dominant exporters of specific HS-4 products.A firm is categorized as a dominant exporter of an HS-4 product if, during its initial 12-month period in the export market, its export value of that specific HS-4 product to all destination countries is in the top 10% relative to the same HS-4 product exports value of other firms in our sample during the same period. 13e provide more details on these three tests in Section 5.

Main results
In this section, we present our main results on how NTMs affect firm-level exports in the presence of sudden changes in demand for firms' products driven by exchange rate shocks.In Subsection 5.1, we present the results when all NTMs combined together are treated as a single measure.In Subsection 5.2, we present the results specifically zooming in on four NTMs that we identify as trade-distorting, that is, NTMs that serve mostly protectionist motives without serving any necessary product quality or safety concerns.

Effects of combined NTM on exports
Table 2 below reports the results from estimating Equation 1.The regression sample comprises firms that export to Japan during the period of analysis (2014-2018) and that are importer producers.The results show that firms that face NTMs suffered a larger fall in exports in response to exchange rate shocks compared to firms that did not face NTMs, given the level of exposure to Chinese competition.Columns (1)-(3) show the results using lags 1-3 in NTM exposure measures since we expect NTMs to affect imports and finally, exports for producers with some lag.Across all three specifications, we find similar results.It should be noted that the effect of an Yuan depreciation on the exports of Indonesian firm is negative (α1), but only significant if the firm is exposed to NTMs.In general, we expect Chinese exporters to expand their exports in response to depreciations in the Yuan/ USD exchange rate, thus negatively affecting Indonesian exporters. 14ince the estimated coefficients are all elasticities, the magnitude of estimated effects are best illustrated with an example.In Equation 1, taking derivatives on both sides with respect to the exchange rate of USD vis-a-vis Yuan, we derive an expression for the elasticity of the value of exports with respect to the exchange rate.The differences in the elasticity of exports to exchange rate shocks between firms facing the exact same (mean) level of Chinese competition but different levels of NTM exposures are given below: 14 Under the dominant currency paradigm, if the invoicing is in dollars and the price is fully sticky, then changes in the Yuan/Dollar exchange rate affect revenues, but changes in export quantities are muted Gopinath et al. (2020).Still, we should expect to see some movements in aggregate trade flows because (1) prices are usually not fully rigid in USD, and there are always a fraction of firms that are able to adjust, and (2) the higher profitability of the export market should create some movements along the extensive margin as new exporters will enter.If these two mechanisms are in place, a Yuan/Dollar depreciation would lead to an expansion of Chinese exports in third markets and negatively impact Indonesian exporters.This is what we find in the data for Japan and for the top-5 export destinations of Indonesia (excluding China).Considering a 10% devaluation in the Yuan and applying the 25th and 75th percentile NTM exposure values and the mean level of Chinese competition index from Table 1, along with the estimated 2-month lagged NTM exposure coefficient, α 2 , from Table 2, Equation 5indicates the following: when comparing two firms subject to the same (mean) level of Chinese competition, the firm at the 75 th percentile of the NTM exposure will experience a 4.1% greater decline in exports compared to its counterpart at the 25 th percentile of NTM exposure.
Results in Table 2 also show that there is no corresponding effect of tariffs on firmlevel exports.This is consistent with tariffs affecting only variable costs as discussed in Section 2, and unless there are drastic changes in tariffs, such as the 2018-2019 US import tariff changes studied by Handley et al. (2020), firms know exactly what to pay in tariff costs.Differently from tariffs, each specific type of NTM entails very distinct procedures of compliance, thereby creating fixed costs of importing each type of NTM.While on average, all the NTMs analyzed here create fixed costs, there is large heterogeneity across NTMs, with each of them having specific aims and economic impacts.In Section 5.2, we tease out some of this heterogeneity by examining in detail the effects of a number of individual NTMs, which we argue are particularly suitable to be studied.

Robustness
In Table 3 we check the robustness of the results to addressing remaining endogeneity concerns as explained in Section 4.2.Column 1 presents the results from estimating Equation 1 adding as control the baseline firm's share of HS-4 product exports in the overall HS-4 exports of Indonesia to all countries, interacted with time fixed effects.This share is computed exclusively using data from our sample, which comprises firms that export to Japan and are importer producers.It is important to note, while our sample focuses on firms exporting to Japan, to account for a firm's influence in the product market, we use the HS-4 export share derived from their entire range of export activities to all countries, not exclusively Japan.This calculation is based on data from each firm's initial 12 months in the export market during 2014-2018.The NTM coefficient remains very close to the ones in Table 2. Column 2 excludes firms that are particularly large exporters in their initial 12 months in the export market, irrespective of the specific products they export.Given their importance, these firms could exert an undue influence on trade policy in ways that serve their interests.Specifically, we omit firms whose export value in their initial 12-month period in the export market between 2014 and 2018 exceeds the 90th percentile.The absolute value of the NTM coefficient, with both 1 and 2-months lag, is close to the baseline coefficient in Table 2 and is still significant at 5 percent.Finally, our main result is robust also to omitting exporterproduct pairs where the exporter's share in a HS-4 product surpasses the 90th percentile within the firm's first 12 months in the export market between 2014 and 2018 (column 3).
Finally, in Appendix A3.3 we extend the analysis to the top 5 export destinations of Indonesia and show that our results remain qualitatively unchanged: firms facing NTMs witness a larger drop in their export values in the face of depreciations of the Yuan compared to firms who do not face any NTM while tariffs do not exert a similar effect.Our results are therefore not driven by the choice of a single export market, Japan.

Effects of selected trade distorting NTMs on exports
The results so far show that NTMs reduce the resilience of exporters to exchange rate shocks.However in order to estimate the net economic effects of NTMs, we would also need to know the value of the negative externalities that they address, which we do not observe with the results for all NTMs discussed in the previous section.Indeed, a lot of NTMs are imposed to ensure product quality standards (Macedoni and Weinberger, 2022).For example, the measure coded as A22 in the MAST classification aims to protect the health of consumers by establishing a permissible maximum residue of substances such as fertilizers, pesticides, and certain chemicals and metals in food and feed.Similarly, measure A86 imposes the excludes the top exporter-product pairs in the specific HS-4 that the firm exports.A firm is an 'overall top exporter' if its total export value to all destination countries during their initial 12-month period in the export market ranks in the top 10% compared to the export values of other firms in our sample.Similarly, a firm is defined as a top exporter of a particular HS-4 product if, during its initial 12-month period in the export market, its export value of that specific HS-4 product to all destination countries is in the top 10% relative to the same HS-4 product exports value of other firms in our sample.In all regressions observations with a tariff exposure value above the 90th percentile are removed.All regressions include firm-time, firm-product, and product-time fixed-effects.*** p<0.01, ** p<0.05, * p<0.1.
requirement to detain or isolate animals, plants, or their products on arrival in a port or place for a given period to prevent the spread of infectious or contagious diseases or contamination.
In this subsection, we study the impact on exporters' resilience to foreign demand shocks of those NTMs that do not clearly address a negative externality.These measures may unnecessarily distort trade without having a well-defined public policy objective. 15.By applying these three conditions: (i) increasing import costs; (ii) not being necessary to achieve a well-defined public policy objective; (iii) being widely applied, we are able to identify four distinct NTM measures.These include -in decreasing order of coverage ratio (Figure 3  As depicted in Figure 3.B, of all importer-producers that exported to Japan at least once between 2014 and 2018, at least 65% were exposed to IAR (B14), 68% to PSI (C1), 30% to SNI (B7) and 19% to PER (C3).We contend that each of them aims to achieve a nontrade objective that is already fulfilled or could be fulfilled through other less burdensome measures.Before moving to the analysis, we provide some additional information on each of these measures.Importantly for our purpose, all of these measures entail an increase in fixed cost of importing due to import procedures, as will be discussed below.

Import Approval Requirements
The first measure is Import Approval Requirements (B14).This is issued by the Ministry of Trade, with supporting specific recommendations from related ministries, before the product can be imported.These letters aim to fulfill non-trade objectives, which are often related to the protection of domestic producers in the sector.Ministries have relatively high discretion in deciding on the recommendation, including whether or not to grant it, how long it takes for them to respond and the quantity allowed for the specific approval, which can differ from what the producer requested.When the import approval aims to protect producers, this NTM does not seem to comply with the WTO principle that "any person fulfilling the legal requirements should be equally eligible to apply for and obtain import licenses" (WTO GATT, Article 2.1).

Pre-Shipment Inspection
The second measure PSI (C1) requires shipments to be inspected at the port of departure from the exporting country before leaving for Indonesia.The objective of PSI is to ensure that the import declaration lists the correct classification of the goods to be imported as a way of detecting improper importing activities.This measure appears redundant in a country like Indonesia, where the customs agency applies a risk management system aiming to detect suspicious shipments at the border.In Indonesia, only two State-Owned Enterprises (SOEs) have the authority (granted by the Ministry of Trade) to perform PSI for the Indonesian government.The SOEs at times further outsource the inspection to other companies.A surveyor report outlining the surveyor firm's inspection results is a documentary requirement for certain goods.Anecdotal evidence suggests that such limited supply of inspection agencies increases the uncertainty around the time it takes to comply with such a procedure.
Besides the fees for this service, this can increase the cost of importing by increasing the uncertainty on the time to import and the compliance costs for imports. 16Additionally, Indonesia is the only country that requires PSI in Southeast Asia and among other middleincome countries.Calì and Montfaucon (2021) find that a 1% increase in exposure to preshipment inspections leads to a 0.6% drop in export values in Indonesia, while Jose et al.  (2006) find evidence that suggests that PSI increases under-invoicing in Indonesia.
16 Some evidence was gathered from interviewing companies directly in Indonesia.For instance, we find that only 1 OECD country applies this measure.Additionally, Calì et al. (2021) find that this measure reduces productivity and increases domestic markups in the manufacturing product markets to which it is applied.

Compliance with National Standards
The third measure is compliance with national standards SNI (B7), which countries typically require to ensure the safety of the users of the goods.In Indonesia, this is mandatory for a wide range of manufacturing goods.As certification requires a visit to the factory premises by an Indonesian certifying agency, the cost is considerably higher for imported goods.The monetary cost is compounded by the uncertain duration of the process.In addition, a lack of harmonization with international standards could also limit exports for Indonesia for more products with a global standard (e.g., medical equipment).Renewing SNI can also be unpredictable and lacks transparency.
Besides being complex, the incidence of the compulsory certification procedure is also particularly widespread in Indonesia as it is applied to thousands of products in our sample period, which do not present major safety risks for consumers.These include several intermediate inputs, such as light bulbs, steel rods, and tires, which are used by firms rather than final consumers.As such the application of this measure appears to unnecessarily restrict trade for many of these goods.

Port of Entry Restrictions
The final NTM relates to the obligation that certain imported goods must enter Indonesia through designated ports (C3), i.e. port of entry restrictions.This requirement is intended to ensure the safety of imported products by directing imports to ports that possess adequate screening facilities.However, this raises trade costs and increases prices in product markets as goods are not able to enter through their natural entry port according to market demand.This measure is applied to less than 6% of imports in the rest of the region, compared to about 20% in Indonesia.

NTM-specific results
These four NTMs are regulated by 11 different ministries and in some cases by government regulations.For instance, SNI (B7) regulations are issued by 8 different ministries.The list of ministries and number of regulations under each set of NTMs is provided in Table A2.Since 2014 the government has applied these measures to an increasing number of products.For some of these NTMs, the percentage of import values subject to them (their coverage ratio) has been on an upward trend in recent years as shown in Figure 3.A.Furthermore, Figure 3.B also shows that the number of firms that export using at least one imported input affected by the four NTMs has been steadily increasing over time.
In order to understand the effects of these specific NTMs, we run specification 6 below, which we estimate separately for SNI certification (B7), import-approval (B14), pre-shipment inspection (C1), and port of entry restrictions (C3).The only difference with our main specification 1 is that when analyzing the effect of a specific NTM, we control for the exposure to all other types of NTMs that a firm faces.
We are interested in the coefficients β 2 , β 3 , and β 4 .To fix ideas, let's say import approval (B14) is the NTM under consideration.β 2 captures the differences in the elasticity of exports to exchange rates between two firms who face exactly the same level of Chinese competition, but different levels of exposure to this particular NTM.Then β 3 captures the differences in the elasticity of exports to exchange rates between two firms who face exactly the same level of Chinese competition, but different levels of all NTMs other than the import approval.This helps us quantify if the different NTMs have heterogeneous effects on firms' responses to exchange rate shocks, after controlling for the effects of other NTMs.Table 4 below reports the results from estimating Equation 6. Columns ( 1), ( 2), (3), and (4) report the results of estimating Equation 6separately for SNI certification (B7), Import approvals (B14), PSI (C1), and port of entry restrictions (C3), respectively.The results are broadly consistent with our hypothesis above.When faced with a sudden demand shock, firms whose inputs were subject to three out of four NTMs (SNI certification, import approval and port of entry) experienced a larger drop in the value of their exports compared to firms that did not face those NTMs, for any given level of exposure to Chinese competition.The regression sample includes firms that exported to Japan between 2014 and 2018 and are importer producers.Panel A displays results accounting for one-month lags in the NTM and tariff exposure variables, while Panel B presents the results when considering two-months lag for the same variables.Columns B7, B14, C1 and C3 show the effects of SNI certification (B7), import approval (B14), pre-shipment inspection (C1), and port of entry (C3) respectively, controlling for the effects of all other NTMs, on the exports of Indonesian firms (results of estimating Equation 6).Standard errors clustered at the firm level.In all regressions observations with a tariff exposure value above the 90th percentile are removed.All regressions include firm-time, firm-product and product-time fixed-effects.*** p<0.01, ** p<0.05, * p<0.1.
Considering a 10% devaluation in the Yuan and applying the 90th and 50th percentile NTM exposure values for B7, B14, and C1 from Table 1, along with the β 2 coefficients for the 2-month lagged NTM exposure of the same set of NTMs from Table 4, Equation 7 reveals distinct impacts on exports.We find that firms in the 90th percentile of NTM exposure to B7, B14, and C3 experience declines in exports of 0.48%, 4.13%, and 3.96%, respectively, compared to firms at the median level of exposure to these specific NTMs.The effects of tariffs remain insignificant across all four specifications.
The fixed-cost nature of these measures makes it more costly for firms to switch imported inputs to take advantage of reductions in relative costs for some inputs.Moreover, these four NTMs lack transparency and predictability, thereby causing uncertainty which contributes to high costs.For example, by increasing the uncertainty in the timing of import delivery (Calì et al., 2021), SNI certification could make it difficult for exporters to procure the necessary inputs in time to cope with the changing competition conditions.This uncertainty is particularly striking for a measure like import approval (B14).This is required for any firm wanting to change an input supplier.It involves multiple actors and the duration needed for approval can be highly unpredictable.
SNI conformity requirements (B7) bring up similar challenges.Renewing SNI certificates is unpredictable and lacks transparency, with some companies reporting having to stop production while they wait.With import approvals, in addition to some approvals being valid for just 6 months, other procedural issues further add to the complexity.Some examples include requests being lost due to the length of time it may take to hear back, or some unclear conditions for importers who are foreign companies to form partnerships with local companies.17

Mechanism
A depreciation of the Yuan changes the competitiveness and thus the demand for Indonesian exports.The results so far indicate that firms facing NTMs see a larger drop in their export values in the face of rising Chinese competition compared to firms who face less NTMs.In this section, we directly test the two hypothesis outlined in Section 2: 1)firms who face NTMs have a less diverse set of countries they source from and 2) firms who face NTMs face more difficulties in adjusting their sources of input supply in response to changes in input prices.Therefore, when the depreciation of Yuan makes Chinese inputs cheaper, firms facing NTMs find it harder to switch towards cheaper Chinese inputs compared to firms who do not.

Number of source countries
To test the first hypothesis, we first check whether firms facing NTMs source from a smaller subset of countries.Equations 8 and 9 specify the regression equations for the case with all NTMs combined into one measure and specific NTMs separated, respectively.
where N it is the number of countries that a firm i sources imports at time t.The terms N T M Exposure i0,t−l and T arif f Exposure i0,t−l denote the lagged exposure levels of firm i to NTMs and tariffs, respectively, as detailed in Section 4. We employ firm and time fixed effects, and robust standard errors are used. 18Results for Equations 8 and 9 are presented in Table 5. Consistently across panels A and B, which show the results using 1 and 2-month lags respectively, we find that firms who face NTMs on their inputs source from a smaller number of countries compared to firms who do not.Reading off column (1), panel A, we find that for every percentage increase in NTM exposure, firms are able to source inputs from 7% less number of countries.Columns 2,3,4, and 5 present the results when looking at NTMs B7, B14, C1, and C3 respectively.Each of these NTMs negatively affect the number of countries a firm sources goods from, with port of entry (C1) having the largest effect: For every percentage increase in NTM exposure, firms are able to source inputs from 12.86% less number of countries.The regression sample includes firms that exported to Japan between 2014 and 2018 and are importer producers.Panel A displays results accounting for 1-month lags in the NTM and tariff exposure variables, while Panel B presents the results when considering 2-month lags for the same variables.Columns All, B7, B14, C1, and C3 show the effects of all NTMs combined, SNI certification (B7), import approval (B14), pre-shipment inspection (C1), and port of entry (C3) respectively, on the number of source countries (import partners) of Indonesian firms.Columns B7, B14, C1, and C3 control for the effects of all other NTMs.In all regressions observations with a tariff exposure value above the 90th percentile are removed.Column 'All' reports the results from estimating Equation 8, and the other columns from estimating Equation 9. Robust standard errors are used.All regressions include firm-and time-fixed effects.

Share of imports from China
A depreciation in the Chinese exchange rate makes Chinese inputs cheaper for Indonesian firms.As outlined in Section 2, the additional fixed costs associated with NTMs make it harder for firms to switch their sources of inputs towards cheaper Chinese varieties.Consequently, when the exchange rate depreciates, firms facing NTMs are likely to experience a relative decrease in their share of imports from China relative to firms that do not face any NTMs.
To account for the extensive margin of sourcing inputs from China, we estimate Equations 10 and 11 using the Poisson Pseudo Maximum Likelihood (PPML) estimator.For this purpose, we square the data of Indonesian firms' imports from China so that there is an observation of each firm for every month during 2014-2018.If a firm i did not import from China at month t, the import value in the squared data is set to 0. Equations 10 and 11 below estimate how changes in the share of imports from China respond to depreciations in Yuan when all NTMs are combined into one and when the four types of NTMs discussed before are considered respectively.
Where V it is the share of imports from China for firm i at time t.If firm i did not import from China at time t, V it = 0.The other variables in the equations are defined as described in Section 4. The terms N T M Exposure i0,t−l and T arif f Exposure i0,t−l denote the exposure levels of firm i to NTMs and tariffs, respectively, as detailed in Section 4. We employ firm and time fixed effects in these specifications.Tables 6 and 7 below report the results from these two specifications.From Table 6, column (1) which uses 1-month lagged NTM exposure, we find that for every percentage increase in NTM exposure, firms at the 75th percentile of NTM exposure witness a 17.78% reduction in share of imports from China relative to the mean compared to firms at the 25th percentile in response to a 10% devaluation of the Yuan. 19Results are similar if we use the 2-month lagged NTM exposure measure.However, we find no similar consistent negative effect of tariffs on the firm's share of imports from China in response to exchange rate shocks across the two lags (columns (1) and ( 2)).From Table 7, panel A which shows the results using a 1-month lag, we find that all four NTMs negatively affect a firm's ability to source cheaper inputs from China in response to exchange rate shocks, with some heterogeneity across the types of NTMs.From Table 7, column (2) which shows the effects from a 1-month lagged exposure to import approvals (B14), we find that for every percentage increase in NTM exposure, firms at the 75th percentile of NTM exposure witness a 14.46% reduction in the share of imports from China relative to the mean compared to firms at the 25th percentile in response to a 10% devaluation of the Yuan. 20The largest negative effects come from port of entry restrictions, whereby each new shipment of inputs has to be shipped through specific ports in order to be imported into Indonesia.This is closely followed by import approval measures, pre-shipment inspections, and lastly SNI certification.

Conclusion
This paper empirically investigates how a country's own trade policy affects firms' resilience to economic shocks.We first show that NTMs on imported inputs affect exporters' resilience to changes in demand for their products.We show that this happens because NTMs make it harder for firms to switch towards newer imported inputs with lower quality adjusted price, thus making adjustments in production more difficult.These results are consistent with a framework where NTMs create fixed trade costs that interfere with the adjustment process firms would make in response to changing conditions in input and output markets.We then focus on four individual NTMs that we argue unnecessarily restrict trade and find that they make it more difficult for firms to respond to sudden changes in foreign demand and that the effects differ according to the type of NTM.The findings in this paper have clear policy implications.They suggest that there are gains to phasing out certain types of NTMs which unnecessarily restrict trade as a means to improving firms' resilience to economic shocks.These reforms would be primarily effective in promoting the resilience of firms that participate in global value chains, that is, use imported inputs for their production.

Appendix A1.1 Theoretical framework
This section provides us with a framework to understand how firms choose the optimal quantity and variety of foreign inputs in the presence of NTMs and what impact the use of this increased import use has on each firm's production, and hence export.The model follows Halpern et al. (2015) closely and similar models are used in related work (Gopinath  and Neiman, 2014; Bøler et al., 2015; Lu et al., 2023).The model considers the decisions made by firms that are heterogeneous in their productivity, and use multiple intermediate inputs to produce a single product.The intermediate inputs chosen could be sourced from domestic and foreign suppliers, each of which involves different costs.Specifically, sourcing certain products from foreign suppliers involve paying some fixed costs.Additionally, some of the foreign inputs maybe subject to NTMs, which imposes an additional fixed cost of imports for these firms.The theoretical framework outlined helps us understand how the altered use of imports affects a firm's production, and hence export.We start by introducing the profit maximization problem of the firm.This is followed by a discussion of the costs and benefits of imports, including those subject to NTMs, and how imports affect productivity.Finally, we summarize relevant predictions from the model that we test through the empirical analysis.
Industry Structure The sector (or industry) consists of a continuum of firms that engage in monopolistic competition with each other and produce their individual brands.The total demand for the sector's output is given by: where there are different firms within a sector S and Q i refers to the output of each firm i's variety, V i refers to preference for each firm i's variety and η is the elasticity of substitution between different varieties.
Firm's Problem Given a firm's productivity Ω, and input prices, the firm chooses its input levels and the number of imported inputs used to maximize its profits.The firm's operational profit is then given by: where P x , W L and r represent the marginal (or per-unit) costs associated with intermediates, labor, and capital while n i refers to the numbers of inputs that the firm chooses to import.
The production structure of the firm combines the optimal amount of labor, capital, intermediates as well as the variety of imported intermediates.Firm i's production follows a Cobb-Douglas Function given by: where Q i refers to output, Ω i to Hicks-neutral productivity, L i to labor employed, K i to capital, and X i is the composite of different intermediate goods used by the firm.
The intermediate composite X i can be thought of as a bundle of different goods indexed by j: where γ refers to the Cobb-Douglas share of intermediates and γ j refers to the importance of good j.There are two types of firms in the economy: Firms whose production technique requires inputs that are subject to NTMs and firms whose production techniques do not require inputs that are subject to NTMs.Both types of firms make a decision between using: • Home inputs that are not subject to any fixed costs, in which case the firm only pays the marginal price P jh for each unit.
• For firms whose production techniques do not require the use of inputs subject to NTMs, the firm pays the marginal price P jm for each unit and the a fixed cost, f j to access the foreign variety.
• For firms whose production techniques require the use of inputs subject to NTMs, the firm pays the marginal price P jm for each unit and the a fixed cost, f j + f nj to access the foreign variety, where f nj denotes the additional fixed cost of assessing an input subject to a fixed cost of NTM.The firm's demand for intermediate good j can, therefore, be expressed as: where I (im) is a dummy that takes the value if 1 the firm decides to use an imported variety of good j.X ijH and X ijF refer to the quantity of domestic and foreign varieties used in the firm's composite of good j.B represents the quality advantage of the imported variety relative to the domestic variant and θ refers to the elasticity of substitution between foreign and domestic variants.
Gain from Import Variety Solving the firm's cost-minimization problem yields the price of a variety that uses both home and foreign inputs, expressed as: The term within the brackets [1 + A θ−1 ] 1 1−θ = e −a , represents the change in the associated price of a variety when it includes imports.Here, a denotes the effective (logarithmic) drop in price relative to the domestic price, P jh .The gain is a function of the level of imperfect substitution, determined by θ, and the quality-adjusted relative price, A, which is given by: For a firm that chooses to import the variety j, the optimal expenditure share on the imported variety is given by: S = A θ−1 1+A θ−1 .We next show how this import gain would affect the production at the firm-level.For this, let us consider the firm's production function expressed in log form: where the lower case alphabets represent the log form of the respective upper case elements in Equation 13.The intermediates term, x i , can further be represented using the expenditure on intermediates, m i , and the price index x i = m i − ρ.In case the firm does not use any foreign goods, its input price index would be the same as the domestic price index for the sector, given by ρ h .If the firm does use imported goods for production, then its price index reduces because imports make production more effective.The price index, therefore, can be expressed as: ρ = ρ h −a * G(ni) where a refers to the per-input reduction in price when imported inputs are used, and G(ni) is the relative weight of inputs that the firm imports in total intermediate expenditure.Hence, the drop in the price index is the import gain scaled by the weight of goods that have imports.a refers to the intensive margin gain from imports as it is a function of the optimal share of imports in an individual composite good.G(ni) denotes the extensive margin gain and is a function of the number of imported varieties.The firm's production function can, therefore, be expressed as: The productivity of a firm is boosted by imported inputs through the term, γaG(ni).γ refers to the Cobb-Douglas weight of intermediates in production.When we solve for each firm's optimal revenue considering the change in quantity and output price, the revenue productivity gain comes out to be γ * aG(ni).This term represents how a firm's real revenue changes when it incorporates imports instead of just using domestic inputs Decision to import an extra foreign variety The additional gain from adding imports to the n th good can be expressed as: The incremental profitability of using the n th import, ∆π N is a function of Baseline profitability: • The profit that the firm would earn if it did not use any imported inputs.
• Gain from using additional n th variety: The price gain from importing n varieties of inputs as opposed to importing just n − 1 varieties The additional loss of importing an extra variety j with no NTM on inputs is given by f j .Therefore, a firm facing no NTMs will import the extra variety if ∆π N > f j The additional loss of importing an extra variety j facing an NTM on inputs is given by f j + f nj .Therefore, a firm facing NTMs will import the extra variety if ∆π N > f j + f nj .Therefore, firms facing NTMs on imports will source a smaller variety of imported inputs compared to firms who do not face NTMs.In particular, the range of imported inputs whose incremental gain from importing are the same, but the fixed costs of importing with NTMs exceeds the gains while the fixed costs of importing without NTMs does not, are not imported by firms facing NTMs.This condition is satisfied when f j < ∆π N < f j + f nj .Thus, firms facing NTMs source from a smaller number of countries compared to firms who do not face any NTM.Now consider an exchange rate shock that reduces the quality adjusted relative price of imports from China, as given by Equation 17.Consider two inputs that cost the same in equilibrium, one facing NTM (j ) and the other not facing any NTM (j), and both facing the same percentage reduction in prices due to a depreciation of Yuan, such that the incremental gain from importing either j or j is the same, and is equal to π N .If f j < ∆π N < f j + f nj , then while the firm who faces no NTM is able to increase the number of cheaper intermediate input varieties from China, the firm facing NTM is unable to do.Therefore, firms who face NTMs are less able to take advantage of the depreciation shock to Yuan and import cheaper inputs from China.While the firm facing no NTM increases its output (and hence export) and profits as per Equations 19 and 20, firms facing NTMs are unable to do so, if f j < ∆π N < f j + f nj .Now consider two inputs l and k.Input l does not face a tariff while input k does, such that the prices of these two inputs are p l and p k (1 + t k ) and without loss of generality, both inputs face the same fixed cost f (since tariffs do not affect the fixed cost of production).Firms 1 and 2 could be potential users of inputs l and k respectively but in the initial equilibrium the fixed costs of importing these inputs exceeded the incremental gain, such that these firms were not importing them before.We consider the same percentage change in Chinese import prices facing these two firms due to depreciation of the Yuan.Since tariffs do not change, both firms witness the same percentage reduction in the effective price of foreign inputs, and if the incremental gain as per Equation 20 exceeds (is less than) the fixed costs f, both firms import (do not import) the extra input.In other words, since tariffs do not affect the fixed cost of imports, these do not affect the firms' ability to source inputs at the extensive margin from China, while the higher fixed costs associated with NTMs prevent firms from taking advantage of cheaper inputs from China at the extensive margin.

A3.3 Multi-country analysis
We performed an analysis similar to the one described in Section 4 for the top five destination countries of Indonesia's exports (excluding China) -namely, the United States, Japan, India, Singapore, and Malaysia.These five countries account for the 45% of Indonesian total exports (excluding exports to China) during the period of analysis. 21We estimated the multi-country specifications in Equations 21 and 22.
ln(V igct ) = α 1 I igc,0 Where V igct : The value of exports of HS-4 digit product g from firm i in Indonesia to country c in month t; I igc,0 : The index of competition in country c between Chinese exports and those from Indonesia in product g for Indonesian firm i over the first 12 months (export period 0) of the firm's export activities within market of country c.Specifically, this index is defined as: Where EX ig,0 measures the importance of HS-6 product g in the total exports of the HS-4 product g exported to country c by Indonesian firm i at export period 0, which denotes the firm's initial 12-month period of export activities in country c during 2014-2018; M S China ig c,0 : China's share of HS-6 product g in country c's total imports of g during the same initial 12-month period for firm i.
Results of estimating Equations 21 and 22 are presented in Tables A3 and A4.Table A3 presents a similar picture as our main results in Japan presented in Table 2: firms facing NTMs on their inputs witness a decline in exports in response to depreciations in Yuan while tariffs do not have any effect.The effects of NTMs on exports are negative and significant across all three NTM exposure measures using different lags (1, 2, and 3 months).From table A4 we find that three out of four NTMs, namely, SNI certification, import approval, and pre-shipment inspection have negative and significant effects on total exports.Port of entry NTMs become negative and insignificant.This section shows that our results are not specific to choosing Japan as the destination country, and also holds when expanded to other destinations.Expanding the analysis beyond the top 5 export destinations do not make sense since in our analysis we control for firm-time, firm-product, and country-time fixed effects, and in markets where Indonesia is a small exporter, very few firms appear multiple times or sell multiple products, essentially leaving no variation to identify the causal effects of NTMs.The regression sample includes firms that exported to top 5 destination countries between 2014 and 2018 and are importer producers.Panel A displays results accounting for one-month lags in the NTM and tariff exposure variables, while Panel B presents the results when considering two-months lag for the same variables.Columns B7, B14, C1 and C3 show the effects of SNI certification (B7), import approval (B14), pre-shipment inspection (C1), and port of entry (C3) respectively, controlling for the effects of all other NTMs, on the exports of Indonesian firms (results of estimating Equation 22).Standard errors clustered at the firm level.In all regressions observations with a tariff exposure value above the 90th percentile are removed.All regressions include firm-time, firm-product, product-time, country-time and country-product fixed-effects.*** p<0.01, ** p<0.05, * p<0.1.

Figure 1 :
Figure 1: Nominal and Real Exchange Rate, Chinese Yuan Renminbi to One U.S. Dollar (USD/Yuan)

Figure 2 :
Figure 2: The Indonesian Export Value is Dominated by GVC Firms .A): Import Approval Requirements (IAR) or B14 as per UNCTAD's MAST terminology, Pre-Shipment Inspections (PSI) or C1, Port of Entry Restrictions (PER) or C3, and mandatory certification with Indonesian product standards, also known as Standar Nasional Indonesia (SNI) or B7.

Figure 3 :
Figure 3: NTM Coverage ratio and Percentage of Firms Affected

Table 1 :
Summary Statistics

Table 2 :
Effect of exchange rate shocks on Indonesian exports in JapanThe regression sample includes firms that exported to Japan between 2014 and 2018 and that are also importer producers.Column 1 presents results accounting for 1 month-lag in the NTM and tariff exposure variables.Similarly, Column 2 accounts for a two-months lag, and Column 3 for a three-months lag.Standard errors are clustered at the firm level.All regressions include firm-product, product-time, and firm-time fixed effects.The variable "NTMs" includes all NTMs in Indonesia.The table reports the results of estimating Equation 1 where all NTMs under study are combined.All regressions remove observations with a tariff exposure value above the 90th percentile.

Table 3 :
Robustness: Controlling for baseline characteristics and excluding top exporters The regression sample includes firms that exported to Japan between 2014 and 2018 and functioned as importers and producers.PanelA displays results accounting for 2-month lags in the NTM and tariff exposure variables, while Panel B presents the results when considering 3-month lags for the same variables.Standard errors are clustered at the firm level.The variable "NTMs" includes all NTMs in Indonesia.The table reports the results of estimating Equation 1 where all NTMs under study are combined.Column (1) interacts firm's baseline export shares of HS-4 products with time-fixed effects.Column (2) excludes the top exporters, as measured by the total value of exports, irrespective of what goods they export.Column (3)

Table 4 :
Effect of exchange rate shocks on Indonesian exports in Japan: NTM breakdown

Table 5 :
Relationship between NTMs, tariffs and the number of source countries.

Table 6 :
Effect of exchange rate shocks on Indonesian share of firm imports from China -Extensive Margin

Table 7 :
Effect of exchange rate shocks on Indonesian share of firm imports from China: NTM breakdown -Extensive Margin

Table A1 :
Invoicing Currency Shares of Indonesia in Exports

Table A2 :
Number of Regulations by Ministry in the Four NTMs Note: BPOM=National Agency of Drug and Food Control; GoI=Government of Indonesia; INP=Indonesian National Police; MEMR=Ministry of Energy and Mineral Resource; MoA=Ministry of Agriculture; MoCI=Ministry of Communication and Information; MoEF=Ministry of Environment and Forestry; MoH=Ministry of Health; MoI=Ministry of Industry; MoIT=Ministry of Industry and Trade; MoMF=Ministry of Marine Affairs and Fishery; MoT=Ministry of Trade; MoTr=Ministry of Transportation.Source: World Bank Jakarta NTM data • ln(E China U SD,t ) + α 2 I igc,0 • ln(E China U SD,t ) • N T M Exposure i0,t−l + α 3 I igc,0 • ln(E China U SD,t ) • T arif f Exposure i0,t−l + v ig + S it + γ gt + δ ct + µ cg + igct (21)21 These are the top five destination countries in terms of total export value during the period 2014-2018.ln(Vigct ) = β 1 I igc,0 • ln(E China U SD,t ) + β 2 I igc,0 • ln(E China U SD,t ) • N T M Exposure i0,t−l + β 3 I igc,0 • ln(E China U SD,t ) • OtherN T M sExposure i0,t−l + β 4 I igc,0 • ln(E China U SD,t ) • T arif f Exposure i0,t−l + f ig + f it + f gt + f ct + f cg + ε igct (22)

Table A4 :
Effect of exchange rate shocks on Indonesian exports to top 5 destination countries Japan: NTM breakdown