Precarization or Protection? The Role of Trade and Labour Policies on Informality

Abstract Several episodes of market-oriented reforms in developing countries have been accompanied by a significant rise in work outside of the formal economy. This paper investigates whether the impact of trade on formal employment is mediated by the strength of labour regulations. We rely on data from the Brazilian Census that provides information on workers' demographics and employment, including job formality status. Our estimation strategy exploits quasi-exogenous changes in industry-level real exchange rates to explore the likelihood of informality across employers exposed to varying degrees of de facto labour regulations. We further utilize two key features of Brazilian labour institutions – budgetary decisions about the availability of resources occur at the federal level, while decisions about where to inspect occur at the local level – to instrument for labour enforcement. Our results suggest that strict labour regulations may lead to a precarization of employment, rather than offering protection for workers.


Introduction
Recent market-oriented reforms, such as trade liberalization, have coincided with a substantive rise in work outside of the formal economy. In Brazil, for example, estimates for 2010 suggest that approximately 30 per cent of employment is held by either informal or self-employed workers, who do not pay into the tax system and do not receive government benefits. Much research has documented the relationship between trade policy and informality in the Brazilian context (for example, Goldberg and Pavcnik (2003), Menezes-Filho and Muendler (2011), Paz (2014), and Dix-Carneiro and Kovak (2019)). The ultimate impact of trade on formal and informal employment opportunities, however, will be mediated by the flexibility that businesses face 'de facto' to adjust their workforces following shocks. While labour market institutions exist to protect workers, when too stringent, they may also hamper the firm's incentives to adjust the workforce by raising the costs of labour. In fact, research has shown that rigid labour regulations constrain firm size (Almeida & Carneiro, 2009) and firm productivity (Almeida & Poole, 2017).
In this paper, we combine these different lines of research to consider the implications of rigid labour market policies on informality, in the aftermath of a trade shock. First, we investigate the impact of trade on informality. Next, we exploit differences within the country in the strength of enforcement of Brazilian labour regulations, to study the role of labour policy in influencing these effects. That is, our main question is not the impact of trade on informality, but rather how labour market institutions modulate this effect. Given previous evidence, we hypothesize that strict labour policy may, in fact, reinforce trends toward widening wage dispersion and job polarization. In this sense, our paper speaks to a growing public policy debate on the trade-off between economic growth and job security for workers. More flexible labour markets allow workers to reallocate to their most efficient use, enhancing the productivity gains associated with a globalizing world. The fact that rigid labour policy may unintentionally amplify the income inequality effects of these shocks, pushing workers into unemployment and increasing the precarization of jobs, should give policymakers serious pause. Our research offers insights for Brazil and other middle-income countries that face similar challenges in an increasingly integrated global economy.
This study offers several key contributions to these literatures. First, and most importantly, we are aware of only two papers that study the implications of international trade on informality in the presence of heterogeneous labour market regulatory enforcement (Dix-Carneiro, Goldberg, Meghir, & Ulyssea, 2021;Ponczek & Ulyssea, 2022). In this respect, our work extends beyond the literature on trade and informality, by embedding the question in realistic labour market institutions. Second, we examine whether self-employment is an additional margin of adjustment to changes in the trade environment. Third, we analyse the effects of these policies on employment levels in addition to the rates of formality.
Our empirical strategy to identify the impact of trade on informal employment status across heterogeneous regulatory regimes relies on detailed individual-level data from the decennial Population Census, which covers the entire country and includes information on workers' demographics and employment status. With information on the individual worker's industry and location of employment, we match this Census data on employment outcomes to industryspecific trade information from the Brazilian Ministry of Foreign Trade. Specifically, we exploit quasi-exogenous changes in trade, as proxied by changes in industry-specific real exchange rates.
We explore how these shocks, which require significant labour market adjustment, impact workers' informality, across Brazilian employers exposed to varying degrees of de facto labour regulations, as measured by Ministry of Labour inspections. While the de jure labour regulations in Brazil, established by the 1988 Federal Constitution, are effective throughout the country, the Ministry of Labour was designated with enforcing compliance with these regulations during the period we analyze. As such, there is significant heterogeneity both within the country and over time in terms of how binding is the labour law.
As the enforcement of labour regulations may be endogenous to local conditions in the municipality (Sen, Saha, & Maiti, 2013), we instrument for city-specific de facto labour regulations relying on two key features of Brazilian institutions. First, decisions about the amount of enforcement are taken at the Federal level; that is, when budgets are flush, enforcement increases in all states. Second, the vast geography of the country suggests that local inspectors will not be able to reach all cities; therefore, the distance from the state capital (from where local inspectors typically depart) to a city will be a good proxy for the likelihood that inspectors can reach that city (Almeida & Carneiro, 2012;Ponczek & Ulyssea, 2022). Thus, the core instrumental variable in our analysis is calculated as the average labour enforcement in other Precarization or protection? 1417 states interacted with the inverse of the distance between the city's state capital and the city itself. Our exclusion restriction, then, does not solely rely on how remote the municipality is, but rather that remoteness interacted with time-varying broad availability of resources for inspections.
Our results suggest that labour market regulatory enforcement may lead to a precarization of jobs instead of offering protection to workers. As predicted by our conceptual framework, we find that an exchange rate depreciation, leading to expansions in output and employment, decrease the informal economy and increase the formal economy. However, these changes are significantly weaker in strictly-enforced municipalities across the country. Additionally, in strictly-regulated areas, businesses forego relatively expensive formal workers by employing relatively cheaper, but legal, self-employed workers. At the end of the day, stricter enforcement attenuates the effects of globalization on the quality of jobs available to workers.
The rest of this paper is organized as follows. Section 2 offers a brief review of related literature. In Section 3, we describe the data sets used. Section 4 presents the theoretical predictions relating changes in exposure to international markets and the subnational enforcement of labour regulations to labour market outcomes, such as informality and self-employment. Section 5 describes the empirical strategy and reports our results. We offer concluding statements for policy in the final section.

Background literature
This section starts with a brief discussion of the definition of informal employment. Next, we review the literature on the impact of labour market regulations on informality. We subsequently turn to the studies on the role of international trade in influencing informal labour markets. Then, given that our main question of interest is how labour regulations influence the effect of trade on informality, we lastly describe the limited evidence on the interactions between trade and labour institutions on labour market outcomes like informal employment, highlighting our contributions to this body of work.

Informal employment
Our definition of informal employment is tailored to the Brazilian labour market and has substantial overlap with the International Labour Organization [ILO] (2019) definition, though there is an important difference in that we only consider paid employment. Following Fields (2020), we next distinguish workers between self-employment and wage employment. Selfemployment is characterized by income volatility since workers are commonly paid by task, hour, or by commission. This type of labour contract has no firing costs and allows for multiple employers, which leads to low attachment between workers and employers. Wage employment, by contrast, has a much smaller exposure to income risk. Workers are typically paid a salary and have a single job and employer. This creates a strong attachment between workers and employers. Wage workers are considered formal when they have a signed labour card or contracta definition widely used in the literature on informality for Brazil (Goldberg & Pavcnik, 2003). This means that these workers are covered by social security and labour regulations, like severance payments. Informal workers, therefore, are those wage earners without signed labour cards and contracts.
These three types of employment follow different regulations, and therefore, have distinct costs to employers. Formal wage employment is the most regulated type of job and has the highest out of pocket costs for the employer, who is responsible for remitting social security contributions and withholding taxes for the government. Self-employment has fewer regulations and by law cannot be covered by employer benefits. This makes self-employed workers a lesscostly, but legal, alternative to formal workers. It is the self-employed worker's duty to remit social security contributions and taxes to the government. Finally, though informal wage workers are subject to the same regulations covering formal workers, in practice, the benefits they receive depend on the specific informal arrangement agreed with the employer. As the workers are 'off the books,' tax evasion by the employer and by the worker is common. This job type has the lowest out of pocket cost to employers; however, employers are subject to a significant fine if they are caught neglecting labour laws.

Labour enforcement and informality
While there is a large literature on the implications of de jure regulations on the labour market, 1 Bertola, Boeri, and Cazes (2000) suggest that de facto regulation is as important, or even more important, in determining labour market outcomes. This may be particularly so in developing countries, where there is often significant heterogeneity concerning de facto regulation across localities. Almeida and Carneiro (2009) quantify the effects of de facto regulation on firm outcomes within Brazil for the year 2002. Although stricter enforcement produces greater compliance with labour regulations, they find that higher levels of de facto regulation results in lower output, smaller firms, and lower labour turnover, leading to an increase in unemployment, as the higher labour costs inhibit labour market flexibility. Almeida and Carneiro (2012) later argue that the standard viewthat is, that higher enforcement results in a shift in employment toward the informal sectorneglects the fact that the value that workers place on mandated benefits is higher than the cost to employers. Therefore, given stricter de facto regulations, the formal sector becomes more attractive, leading to an increase in the supply of formal workers and a decrease in the supply of informal workers.

Trade and informality
The empirical literature concerning trade and formality in Brazil points to an unambiguous increase in informal wage employment in the aftermath of increased import competition because of the country's unilateral trade opening in the 1990s. The main exception to this finding is Goldberg and Pavcnik (2003) who report no statistical relationship between trade liberalization and informality in Brazil and, thus, interestingly, assert that labour market institutions are imperative in assessing the effects of trade policy on the labour market.
Menezes-Filho and Muendler (2011) show that foreign import penetration and tariff reductions throughout Brazil's trade liberalization episode resulted in worker displacements that neither comparative advantage industries nor exporters immediately absorbed, resulting in significantly more transitions to informal work in the country. More recently, Dix-Carneiro and Kovak (2017) also demonstrate that regions of Brazil that faced larger tariff cuts also experienced larger shifts away from formal employment. Dix-Carneiro and Kovak (2019) report that many of these trade-displaced workers are ultimately absorbed by the informal economy, relatively increasing informality in the locations which faced the largest tariff reductions. 2 Paz (2014) extends this work by considering the effect of exports on informality. In his model, a cut in the tariffs of Brazil's trade partners leads to a decline in informality, since it induces smaller firms (which are prone to employ informal workers) to exit the market, and exporters (which typically hire formal workers) to expand their employment. The empirical results confirm that lower trade-partner tariffs reduce informality, and cuts in Brazilian import tariffs have the expected effect of raising informal employment. The finding that, as tariffs for Brazilian exports fall, the informal labour share also falls, would later be confirmed for the case of Vietnam by McCaig and Pavcnik (2018).
Precarization or protection? 1419 2.4. Trade, enforcement, and informality Almeida and Poole (2017) provide the first evidence of the impact of trade openness on formal employment in a developing country when firms are exposed to varying degrees of labour market regulatory enforcement. The authors find that, following a real exchange rate devaluation, Brazilian plants facing stricter enforcement of the labour law increased formal employment by less than plants facing weaker enforcement. We extend the methodology in that paper by distinguishing between import-weighted and export-weighted real exchange rate shocks to capture both a trade restriction and a trade expansion. Furthermore, given the administrative data used in that paper, the results in Almeida and Poole (2017) can only speak to the formal sector, merely speculating on the heterogeneous effects of trade on informality by the stringency of labour regulations. It is exactly this gap that our paper aims to correct. This paper is also closely related to Ponczek and Ulyssea (2022). Those authors argue that heterogeneous de facto regulation within Brazil is the integral cause of the variation in posttrade reform labour reallocation across regions. Specifically, the authors find that regions with stricter enforcement of labour regulations observe no statistical increase in informal employment, but face large total employment losses, signalling a decrease in formal employment. By contrast, those regions with weaker enforcement suffer no employment losses, but substantial increases in informality. To differentiate our work, whereas Ponczek and Ulyssea (2022) rely on the tariff liberalization (opening to trade) of the 1990s at the micro-region level in Brazil, we opt to study industry-specific real exchange rate shocks in the 2000s, which offer both a trade restriction through higher import costs and a trade expansion through increased foreign market access. In addition, those authors rely on the time-invariant distance to a local labour office as the main proxy (and instrument) for enforcement capacity (at times also interacting with a measure of the state's capacity for enforcementthe number of inspectors at the state level). We argue that our use of the change in resources available for inspections (proxied by federal budget cuts) interacted with the city's distance to the state capital (less endogenous than distance to the non-random location of local labour offices) is perhaps a better instrument for the changes in enforcement. Nevertheless, we consider our papers as strong complements.
Finally, while Dix-Carneiro et al. (2021) develop a structural framework that accounts for many of the dimensions considered in our paper, we see this structural work as complementary to our own in that their substantive focus is less about the impacts of heterogeneous enforcement of labour regulations and more on the overall welfare effects of a trade shock, incorporating the role of the informal sector in a general equilibrium trade model. Moreover, our reduced-form framework provides estimates for the causal implications of a real exchange rate depreciation on the informal labour market, in the presence of a complete set of labour market regulations, not only hiring and firing costs.

Data
The data employed in this study consists of the public use microdata samples of the Brazilian Census of 2000 and 2010. These data are matched to municipality-level labour market regulatory enforcement and to industry-level real exchange rates.

Individual data
The Brazilian Population Census public microdata provides information on several worker characteristics, such as industry affiliation, wage employment formality status, self-employment status, and the Brazilian municipality and state in which the worker resides. The questions about these characteristics do not change over the two Brazilian Censuses used in our study. We consider only workers in the manufacturing sector and also exclude employers and those not in the labour market. Finally, we drop any observations with missing information on these key variables of interest.
3.1.1. Informality. In this paper, we define an informal job as an employer-employee relationship that lacks a signed labour contract (carteira assinada). In fact, labour inspectors most commonly visit employers to check on the formality status of their employees by looking for their carteiras. The Census questionnaires explicitly ask whether the job has a signed labour contract, and this terminology is common knowledge among employers and employees. As the data collected by the Census cannot be used in court as evidence, and this is stated before the Census interview starts, we have strong confidence in the individual's truthful responses. Additionally, informal employees are not punished in the event their employer is audited by labour inspectors and found to have violated labour laws. Therefore, there is little incentive for the worker to provide false information regarding formal work registration to officials. 3

Industries. The industry classification used in the Census changes over time. The 2000
Census relies on the Classificação Nacional de Atividades Econômicas-Domiciliar (CNAE-Domiciliar), whereas the 2010 Census categorizes industries based on Revision 2 of CNAE-Domiciliar. Therefore, we rely on publicly-available correspondence tables from the Brazilian Census Bureau. 4 The final classification used in this project contains 47 manufacturing industries. Nuclear fuel and automotive engine refurbishing are excluded from our sample due to zero trade flows.

Municipalities.
Another important issue is that 58 new municipalities were created in Brazil between 2000 and 2010 (Ehrl, 2017). Unfortunately, this was not always a simple case of a municipality splitting into two. For example, the new municipality of Novo Santo Antônio covers territory that used to belong to São F elix do Araguaia and Cocalinho. For these special cases, we aggregate municipalities into an artificially large municipality both in 2000 and 2010, in order to have comparable areas over time. This procedure results in a total of 5,438 municipalities in the two time periods. Municipalitylevel descriptive statistics are displayed in Supplementary Table S2, available in the supplemental materials.

Trade exposure data
During the period under analysis in this study, Brazilian import tariffs showed very small variation over time, as depicted in Supplementary Figure S1, available in our supplementary materials. Yet, Brazilian manufacturing industries did experience a significant change in their exposure to international trade (see figures in the supplemental materials) due to the strong variation in the real exchange rate.
3.2.1. Industry-specific real exchange rates. Fluctuations in the real exchange rate influence a country's competitiveness in international markets. However, the aggregate exchange rate may be less effective at capturing true changes in industry competitiveness, induced by changes in specific bilateral exchange rates, if specific trading partners are of particular importance to some industries. That is, movements in the dollar/real, peso/real, and euro/real exchange rates may have different implications for different industries, depending on the industry's trade with the United States, Argentina, and the Euro Zone, respectively. Therefore, following Almeida and Poole (2017), we employ the Goldberg (2004) methodology to construct import-weighted (mrer k t Þ and export-weighted (xrer k t ) industry-specific real exchange rates based on bilateral nominal real exchange rate data for 141 of Brazil's trading partners from the Brazilian Central Bank, country-level consumer price indices from the International Monetary Fund, and Brazilian imports and exports from the Ministry of Foreign Trade's An alise de Informações de Com ercio Exterior (ALICE) database, as follows: where t indexes time, k indexes industry, and c indexes country, such that the bilateral real exchange rate, rer t c , denoted in units of real per one unit of foreign currency, is weighted by industry-specific and time-varying import shares and export shares respectively. Following Campa and Goldberg (2001), we lag the trade shares one period to avoid issues of endogeneity between trade and the exchange rate. By this measure, an increase in the value of the indices implies a real depreciation of the Brazilian real in trade-weighted terms for industry k. 5 Figures 1 and 2 display histograms of changes in the import-and export-weighted industrylevel real exchange rate between 2000 and 2010, respectively. Most industries experienced negative changes in the real exchange ratethat is, an appreciation of the real, though some industries underwent real depreciations. We note significant industry-level heterogeneity across both figures. The export-weighted real exchange rate displayed stronger appreciations over the ten years than did the import-weighted real exchange rate. This is so because the country-level weights used in the construction of these series vary considerably by industry and by direction of trade. This implies a low correlation between the export-weighted real exchange rate and the import-weighted real exchange rate of À0.1 in 2000 and À0.2 in 2010. The simple correlation across all industries of the 2000-2010 change in the real exchange rates is also small 0.186.
Since these two series of trade-weighted real exchange rates are largely independent, we include both series together in our main econometric specifications.

Enforcement data
The de jure labour regulations in Brazil are effective throughout the entire country during this sample period and are rather detailed, stringent, and strongly pro-worker. For example, changes to the federal labour laws in 1988 increased the overtime wage premium from 20 per cent to 50 per cent of the regular wage. Moreover, terminating a formal employment relationship in the early 2000s was quite costly to firms. Brazilian employers who wished to terminate formal contracts needed to offer a 30-day advanced notice to workers, and during this interim period, workers were granted up to 25 per cent of a regular working day to search for a new job. Should the dismissal of the worker be without cause, the employer also has to pay a penalty of 40 per cent of the total contributions to the worker's severance fund, Fundo de Garantia do Tempo de Serviço.
The Ministry of Labour was designated with enforcing compliance with these labour regulations at the federal level at this time. However, there is significant heterogeneity both within the country and over time in the de facto enforcement of the law. 6 We, therefore, rely on administrative data on the enforcement of labour regulations from the Brazilian Ministry of Labour. Data for the total number of inspector visits to a city are available by city for the years of 2000 and 2010.
Following Almeida and Poole (2017), we proxy the degree of regulatory enforcement with the intensity of labour inspections at the municipality level. More specifically, our main measure of manufacturing enforcement is the logarithm of one plus the number of total inspections at the municipality level per 100,000 people living in the municipality. It is important to consider municipality size in the Brazilian context because cities like Rio de Janeiro may have a large number of inspections, but they also have very large populations. Thus, this enforcement measure will better capture the perceived probability of a visit by labour inspectors to Source: Brazilian Central Bank data.
establishments within a city. Supplementary Table S2, available in our supplementary materials, offers summary statistics on inspections across Brazilian cities, which report decreases over time in the average number of inspections and in the likelihood of inspections per person (enforcement). Figure 3 illustrates the cross-city variation in the 2000-2010 change in the labour market regulatory enforcement for the entire country. The darker the shade, the larger the change in the enforcement strength. While average inspection rates fell over the ten-year period, this map shows that some municipalities experienced increases in the degree of labour market regulatory enforcement, while other municipalities faced weakening de facto regulations. It is exactly this across-municipality variation in changes in enforcement that we exploit in this research.

Conceptual framework
In this section, we rely on previous literature to posit predictions for relating changes in international trade to informal employment status, with heterogeneous labour enforcement. Since theory offers ambiguous predictions, these are inherently open empirical research questions.

Effect of the trade shock
A real exchange rate depreciation decreases the relative price of Brazilian goods in foreign currency terms abroad and increases the price of foreign goods in the Brazilian market. Therefore, Source: Brazilian Ministry of Labour's data.
this single relative price change can have several different impacts on the local labour market. First, the lower relative price of Brazilian exports offers increased foreign market access (Verhoogen, 2008). Second, the higher relative price of imported goods decreases foreign competition for Brazilian companies, but also increases the costs associated with imported intermediate inputs. If the increased access to foreign export markets allows businesses to expand output and employment, we should predict that the exchange rate depreciation will decrease informality and increase formality in Brazil. 7 At the same time, local companies now face weakened import competition due to the real exchange rate depreciation since foreign goods are now more costly in Brazilian real terms. If the protection from foreign competition allows import-competing industries to expand output and employment, we should again predict that the exchange rate depreciation will decrease informality and increase formality in Brazil. All of the papers we cite in our background literature section find such an effect for the case of the Brazilian trade liberalization in the 1990s. 8 In both settings, the impact of a trade shock on self-employment is ambiguous. Some workers may be drawn from informality into self-employment, while other workers will be enticed into formal employment from self-employment with the expansionary trade shock. Therefore, it is unclear what will be the net effect of the trade shock on self-employment.
Finally, the same real exchange rate depreciation that restricts import competition also makes imported intermediate inputs more expensive. Industries that rely on imported inputs for their final output will see production costs increase, potentially reducing output and employment demand (Goldberg, Khandelwal, Pavcnik, & Topalova, 2010). For this reason, the above effects might be attenuated depending on the extent to which industries rely on imported intermediate inputs.

Effect of labour enforcement
The direction of the effect of enforcement on informality is theoretically ambiguous (Almeida & Carneiro, 2012). On the one hand, one of the main purposes of labour market inspections is to ensure formal work registrations. By design then, an increase in enforcement should reduce informality and increase formal work registrations. In addition, the labour inspectors ensure that employers comply with the mandated benefits and thus increase job benefits and quality. This should increase the supply of formal workers and decrease the supply of informal workers. For these reasons, it is a plausible prediction that businesses in areas of the country with heavier enforcement of labour laws will experience a decrease in informal employment, as formal employment becomes more attractive and formal work registrations increase. On the other hand, stricter enforcement of the labour law raises the cost of formal workers for employers that now must cover all mandated benefits, such as maternity leave and vacation pay. As such, plants facing stricter enforcement of the labour code will have increased difficulties in adjusting labour, decreasing formal employment and increasing informal employment. If the cost to employers of self-employed workers is less than employing formal workers, but more than employing informal workers, we might expect that firms in strictly-enforced areas of the country would increase hiring of self-employed workers, as a legal means of circumventing labour regulations.

Effect of the trade shock by the stringency of labour enforcement
The extent to which a given currency shock actually changes the informal employment share will depend on the degree to which employers face labour market regulatory enforcement.
To summarize, a real exchange rate depreciation is predicted to decrease informality, as employment expands and workers move into self-employment and the formal economy.
Industries located in strongly-enforced municipalities could increase formal employment and decrease informal employment by more than industries located in weakly-enforced municipalities, if the first enforcement impact on informality dominates; that is, that job quality increases and workers are induced to register formally. However, the data may also show that companies located in strongly-enforced municipalities will increase formal employment and decrease informal employment by less than otherwise identical companies located in weakly-enforced municipalities, in response to the same currency depreciation, if the second enforcement impact on informality dominates; that is, that the cost to Brazilian businesses of employing formal workers increases and so they hire fewer formal workers to circumvent mandated benefits.
Given the evidence in Almeida and Poole (2017), as well as Almeida, Corseuil, and Poole (2019), we hypothesize that the latter effect dominates. This means businesses in areas of the country facing strong de facto regulations are predicted to decrease informality and increase formality by less than otherwise identical businesses in less-enforced areas of the country, in the aftermath of an equal expansionary trade shock. Moreover, we hypothesize that some of the relative decrease in formal employment may arise through a relative increase in self-employment, as companies opt for cheaper, but still legal, employees. We summarize the main predictions from our conceptual framework in Table 1.

Empirical strategy and results
Our empirical methodology relies on substantial variation across three different dimensions: municipalities, industries, and time. It combines and extends the empirical frameworks of Paz (2014) and Almeida and Poole (2017) to estimate the effect of a real exchange rate devaluation on the job composition in a city-industry pair and how this effect of trade depends on local enforcement of labour regulations. We consider changes in the Brazilian real's real exchange rate across industries and over time as the main exogenous shock to trade. Therefore, the effect of trade on job type composition is identified using across-industry differences in real exchange rate changes over time. We introduce the export-weighted real exchange rate and the importweighted real exchange rate separately. Furthermore, we exploit the fact that Brazilian employers are exposed to varying degrees of de facto labour regulations. Brazil's large informal sector suggests significant evasion of Ministry of Labour regulations and we know from a long literature that labour market regulations and regulatory enforcement influence the degree of informality. The main estimating equation is as follows: where j indexes the 47 manufacturing CNAE-Domicilar industries, m indexes the city (mun ıcipio), and t indexes time. ENF mt represents time-varying, municipality-level enforcement of labour regulations, as captured by Ministry of Labour inspections. The outcomes of interest are the shares of informal and formal workers. Additionally, we consider the ratio between selfemployment and non-formal employment and the ratio between self-employment and noninformal employment to assess the effects of trade and enforcement on self-employment. Following Kropko and Kubinec (2020) advice to choose fixed effects according to the question at hand, recall that our main question of interest in this paper is how labour regulatory enforcement influences the impact of trade shocks. Thus, we also include city-by-year fixed effects (u mt ) into Equation (1) to control for all possible city-specific trends, including (but not limited to) differences across cities in changing enforcement rates. For example, more developed areas of the country have more resources for enforcement, areas that are likely violators of the labour law will see higher levels of enforcement, and local areas facing increasing violations of the labour law may also see increasing enforcement. These municipality-year effects also account for city-specific shocks, for instance several political economy variables, like local governance or tax rates. 9 Moreover, we argue the city-year fixed effects are integral to account for the possible endogeneity in the changes in enforcement (and any other city-specific shocks correlated with local labour markets and enforcement). Equation (1) also includes industry fixed effects (u j Þ to capture time-invariant factors, such as the industry's unobserved, underlying productivity or technology, which may influence the industry's size and informality, and year dummies (d t Þ to control for the average effect on informal employment of Brazil's many policy reforms over this time period. Because we include these city-year fixed effects, the enforcement variable cannot be included as a standalone variable. As a robustness check, we re-estimate our main regressions with separate city, industry, and year fixed effectsand, of course, the level effect of enforcement (which is also instrumented), rather than with city-by-year and industry fixed effects. The coefficients on the standalone enforcement variable are aligned with expectations about the effects of labour market regulationsdecreasing informality and self-employment and increasing formality. These unreported results are available by request.
The identification of the main coefficient of interest, c, relies on the quasi-exogenous, industryspecific, real exchange rate shock across municipalities with strict relative to weak enforcement of labour market regulations. 10 b estimates the effect of the exchange rate shock on informal labour markets. As we remark in Section 4, following the literature and as summarized in Table 1, we hypothesize that b < 0, as an exchange rate depreciation (increase in RER jt ) decreases informality that is, the impact of reduced import competition and increased export market access outweighs the impact of higher-priced and lower-quality imported intermediate inputs.
We hypothesize that two identical industries will respond differently to changes in the real exchange rate depending on the de facto regulations they face. c captures the differential impact of the exchange rate shock on industries in strictly-enforced municipalities relative to weaklyenforced municipalities. In response to an exchange rate depreciation, employers may employ fewer informal workers as import competition weakens and export market access expands (b < 0). However, industries facing heavy inspections may be differentially restricted from adjusting labour (c > 0), as the cost of a formal worker increases, increasing informality by more than in weakly-enforced industries. Table 2 reports coefficients from an ordinary least squares (OLS) regression based on Equation (1) in which we include both the import-weighted real exchange rate shock (MRER jt ) and the export-weighted real exchange rate shock (XRER jt ). We cluster the standard errors at the city level to account for within city, across time, and across industry correlations in employment. Surprisingly, counter to our theoretical predictions, the estimated effects suggest that a depreciation in the import-weighted real exchange rate actually increases the informal share of labour. There is no statistical impact on the formal employment share, either due to a devaluation in the import-weighted real exchange rate or in the export-weighted real exchange rate. The expansionary shock in the import-weighted real exchange rate is predicted to decrease self-employment, while a Precarization or protection? 1427 similar shock in the export-weighted real exchange rate increases self-employment. Across the board, labour market regulations have the expected mitigating effect.

Instrumental variables
Though our baseline specification includes city-by-year fixed effects to help control for the across city endogeneity of changes in enforcement, we next consider instrumenting for the enforcement variable to further alleviate such concerns. The excluded instrument used in this study relies on two main ideas present in Brazilian labour institutions. First, the availability of resources to conduct inspections occurs at the Federal Ministry of Labour. Second, and by contrast, the decision regarding which establishments to visit is made at the state-level branch office (delegacia do trabalho) of the Ministry.
Availability of resources. The Ministry of Labour operates under an annual budget approved by the Brazilian Congress. Unexpected lower government revenues trigger across the board cuts in the federal budget, which are negative shocks to enforcement everywhere. These are independent of the municipality-level labour market. The number of inspections in state s can be predicted by the number of inspections conducted in the remaining states (call this, otherenforcement st ) because of unexpected across-the-board budget cuts (or expansions) conducted by the federal government. Therefore, we calculate the level of enforcement outside of state s, as follows: Where S is the set of all 26 Brazilian states and the Federal District, otherinspection st ¼ P m2SÀfsg inspections mst , and otherpopulation st ¼ P m2SÀfsg population mst : That is, we rely on the Notes: This table reports coefficients from an ordinary least squares regression, where the dependent variable is as in the column headings. Enforcement is measured as the logarithm of the total number of inspections in the city (plus one) per 100,000 inhabitants of the municipality. ***, **, and * denote significance at the 1 per cent, 5 per cent, and 10 per cent level, respectively. Robust standard errors, clustered at the city level, are reported in parentheses.
number of inspections and population in all municipalities outside of the state s in which the municipality is located.
Inspection decision. The sheer geographic size of the country signals that local Labour delegacias must make decisions regarding how to use their limited resources to inspect all local establishments within the state. The farther away is a municipality from the state capital (from where inspectors typically depart), the more costly it will be for inspectors to visit, which makes the visit less likely given the delegacias' fixed annual budgets. For instance, the simple correlation between distance and enforcement is À0.26 for 2000. We use this information to proxy for the likelihood that a given municipality m will be inspected. Let distance ms equal the geodesic distance between municipality m and the capital of the state s in which the municipality is located. 11 Further, let maxdistance s ¼ max m2s distance ms be the distance of the farthest municipality in the state. Then, we generate a distance index, such that larger numbers imply an increased likelihood that the municipality will be visited by inspectors, as: Instrument. Our main instrumental variable (IV) relies on these two important features of labour institutions in Brazil. First, budgetary decisions regarding the amount of resources available for inspections are made at the federal level, such that average increases and decreases over time in inspections in other states can proxy for the general level of inspections in a municipality's state. Second, that decisions regarding where to inspect in a state will depend on the distance between that state's capital (the location of the main local labour office) and the municipality. We, therefore, instrument for a municipality's level of enforcement in time t with the interaction between enforcement in other states in that year and the inverted distance between the municipality and the state capital, as follows: Therefore, the main source of identification is the interaction between the ease with which inspectors can reach a given municipality and the time-varying federal resources available for labour market enforcement. That is, the exclusion restriction does not rely solely on how remote the municipality is, but rather that remoteness interacted with time-varying broad availability of resources for inspections.
We note, the distance between a given city and that city's state capital is largely exogenous. Of course, the distance from the capital is also likely to be correlated with the strength of economic activity in that city. However, this is a concern about cross-sectional differences in cities, and therefore, this is mitigated by our municipality-level fixed effects which account for such time-invariant local characteristics. The changes in enforcement within a city, however, will also be determined by the local labour office's time-varying availability of resources. Budgetary decisions for the Ministry of Labour are made at the federal level. To further account for the possible endogeneity of state-specific budgetary resources 12 , we rely on inspections in other states to proxy for the general availability of federal resources targeted at labour market regulatory enforcement. It is difficult to think of a how a municipality's local labour market could be influenced by inspections in a different state other than through federal resource allocation. Table 3 reports coefficients from Equation (1), in which the city-year enforcement variable is instrumented as described above. 13 We also include Kleibergen-Paap rk Wald F statistics and associated underidentification tests, which exhibit no evidence of a weak instrument Precarization or protection? 1429 problem. This is the core table of our paper and the main evidence is strongly in support of our predictions. 14 First, we focus our discussion on the impact of an import-weighted real exchange rate devaluation. As discussed in Section 4, the import-weighted real exchange rate depreciation reduces import competition, allowing industries to expand output and employment, and increase formal employment shares. In fact, the results in the first row confirm this hypothesis. While the point estimate on the coefficient for the effect on the informal employment share is negative (signalling a decrease in informal employment), it is statistically indistinguishable from zero. However, in column (2), we see a large and statistically significant positive effect on the formal employment share, as predicted. A 1 per cent depreciation in the import-weighted real exchange rate increases the formal employment share by 0.6 percentage points. In columns (3) and (4), we consider adjustments from the self-employed workforce into both informal labour and formal labour, respectively. Interestingly, we note that the share of self-employed workers among lower-tier informal jobs and higher-tier formal jobs both decrease with reduced import competition. While this is indicative of a shift toward higher-tier jobs, it is difficult to disentangle the net effects on self-employment of the reduction in import competition.

Results.
Next, shifting discussion to the export-weighted real exchange rate shock, the estimated effects are all in line with our theoretical predictions, as well as the previous literature (Paz, 2014;McCaig & Pavcnik, 2018), and the magnitudes of the effects are reasonable. A 1 per cent depreciation in the export-weighted real exchange rate reduces the informal labour share by 0.2 percentage points, increases the formal labour share by 0.4 percentage points, and decreases the share of self-employed workers among higher-tier formal jobs by 0.3 percentage points. Finally, as suggested by the previous literature and discussed in our conceptual framework, labour market regulatory enforcement appears to act as 'sand in the wheels' of such expansionary economic and employment growth. While the trade shocks are estimated to expand output and formal employment as export market access increases and import competition weakens, the coefficients on the interaction terms always have the opposite coefficients. That is, the decreases in the informal economy and the increases in the formal economy are weaker in strictlyenforced municipalities. The shifts out of self-employment into the formal economy are also diminished by labour institutions. Brazilian businesses forego relatively expensive formal workers and increase employment of relatively cheaper self-employed workers in strictly-regulated areas. In doing so, companies are able to circumvent the strongest labour laws, while acting legally. At the end of the day, strict labour regulations limit growth in high-quality formal employment associated with increased foreign market access.

Robustness
The previous evidence suggests that a positive, expansionary trade shock, along the lines of increased export market access as in Paz (2014), leads to lower informality and increased formality. 15 However, simply because informal labours shares decrease does not imply a welfare improvement if total employment increases, such that the level of informal employment either increases or remains the same (recall the evidence in Ponczek and Ulyssea (2022)). To test for these ideas, we re-estimate equation (1), instrumenting for changes in enforcement as in Table 3, but replacing the main dependent variables of employment shares with the logarithm of employment levels. We consider total employment, informal employment, formal Notes: This table reports coefficients from an instrumental variables regression, where the dependent variable is as in the column headings. Enforcement is measured as the logarithm of the total number of inspections in the city (plus one) per 100,000 inhabitants of the municipality, and is instrumented by the interaction between enforcement in other states in that year and the inverted distance between the municipality and the state capital. ÃÃÃ , ÃÃ , and Ã denote significance at the 1 per cent, 5 per cent, and 10 per cent level, respectively. Robust standard errors, clustered at the city level, are reported in parentheses. p-Values are reported in brackets. employment, and self-employment levels as separate outcomes. We note that our preferred outcomes remain the share variables, as these are the outcomes that would be predicted by models of international trade reallocating labour resources. We report the results from these robustness checks in Table 4. The main ideas from Table 3 are robust to the use of levels instead of shares. As expected, total employment increases with the exchange rate devaluations, but by less in areas of the country facing strict labour market regulations. The increases in total employment are wholly driven by increases in the formal economy. Alongside the qualitative and statistical significance of these results, we highlight their economic importance and significance. Given the levels of total employment and formal employment in 2000 of 9,493,708 and 4,947,010, respectively, these estimates are equivalent to 66,455 total jobs and 34,629 formal jobs following a 1 per cent depreciation of the importweighted real exchange rate. Similarly, our estimates for a 1 per cent depreciation in the exportweighted real exchange rate point to an increase of approximately 85,443 total jobs and 54,417 formal jobs.
These effects, however, do not take into consideration the variation across cities in the enforcement of labour regulations. Our results suggest that these increases in formal employment are attenuated by strict enforcement. In order to approximate by how many jobs, we calculate the impact of a 1 per cent depreciation for industries located in strictly-enforced municipalities (at the 75th percentile of enforcement) as compared to otherwise identical industries located in weakly-enforced municipalities (at the 25th percentile of enforcement). The results reported in Table 4 indicate that a 1 per cent depreciation in the import-weighted real exchange rate actually decreases formal employment by 0.3 per cent for industries located in strictly-regulated cities. The same real exchange rate shock increases formal employment by 0.06 per cent for industries located in weakly-enforced cities. Again, at baseline 2000 levels of employment, this approximates to 94,937 jobs and 49,470 formal jobs lost due to stricter enforcement.

Conclusions
A widespread belief exists that globalization harms local labour market conditions, particularly for lower-skilled workers and those outside formal labour markets. Policymakers often position and propose labour market policies, such as firing restrictions and severance payments, to protect vulnerable workers from such negative employment shocks. In this paper, we investigate the idea that policies designed to connect developing country firms with developed country markets via access to export marketscan promote higher-quality employment in less-developed countries, as workers shift from informal employment to self-employment to formal employment. Our work makes clear that flexible labour market policies may in fact protect workers and help the transition to the formal economy in the aftermath of employment shocks.
To be clear, our intentions in this paper are not to suggest that labour regulations should be entirely tossed out of public policy. Actually, there are several positives to come from stricter labour regulations, for example, vacation pay and maternity benefits, as well as possibly higher wages, better working conditions, and overall job quality. Our paper, rather, implies that allowing for more flexibility in the labour market can help to mitigate any possible downsides from negative economic shockslike trade and technological change. A fruitful area for future research might explore the implications of trade and labour enforcement on such job quality indicators.