# **E. Evidence for Ecuador**

To examine the impact of foreign shocks on workers and firms in Ecuador we use the Instituto Ecuatoriano de Seguridad Social (IESS) database for the 2006-2017 period, an administrative longitudinal employer-employee database similar to Brazil’s RAIS covering all formal workers and their employing firms from Ecuador’s social security records.<sup>45</sup> IESS data includes job records for each worker with worker and firm unique identifiers and many demographic characteristics and it is merged with a census of higher education degrees from Ecuador’s higher education registry based on a common unique identifier for individuals to obtain education information. In order to construct the worker panel database needed for our analysis of the impact of foreign shocks on worker outcomes we follow the steps described for Brazil, that is, (i) to define a starting worker panel database with the cohort of individuals employed in the tradables sector in 2006 (and entrants after 2006) keeping their entire work histories and selecting for each the highest paid job in April of each year to identify her/his wage, employer firm, and sector, (ii) to construct an auxiliary database with workers in the 16-65 age range employed at least once by an exporting firm, and (iii) to expand the database such that each worker has observations for all consecutive years between the first and last IESS years and after the worker’s last IESS year until 2017 provided the worker’s age does not surpass 65.<sup>46</sup> While IESS contains information on each firm’s industry and sales, it does not contain information on location but we obtain it from the firm registry described below.

To compute GFC-induced foreign demand shocks for firms, we rely on customs data covering the universe of firm-level export and import transactions from Servicio Nacional de Aduana. We merge the customs data with the worker panel database based on a common firm identifier. We derive a firm panel database from the IESS worker panel database where, for each firm, labor market outcome variables are constructed by aggregating across all of its workers in a given year. This firm panel database includes all firms that export at least once during the 2006-2017 period.<sup>47</sup> In addition, we use the Ecuadorian firm registry (Sistema de Rentas Internas del Ecuador (SRI)) collected by the Superintendence of Companies for the 2007-2017 period merged with

> 45Access to the IESS employer-employee database is possible only in the National Statistical Institute’s premises in Quito hence research based on this database is rare. To our knowledge the only other paper using this database is Mu ̃noz S et al. (2018)

> 46The tradables sector is defined as the set of industries with 2-digit codes less than equal to 33 in ISIC revision 4 classification. Observations with zero months worked correspond to the worker in Ecuador not having a formal job but we have no information as to whether the worker is unemployed, self-employed, working in an informal job, or out of the labor force, a caveat of the IESS data. Given the much smaller size of the labor force in Ecuador than Brazil there is no need to conduct the analysis for a random sample of workers. We exclude from the final sample for Ecuador outliers defined as workers whose monthly wages are higher than 50,000 USD.

> 47For these firms the panel includes all years of data (even years when the firm is not exporting).

55