observed or constructed from input-output tables. These links make calibration of the model relatively straightforward compared to other models in the literature.

Several models fix the number of production stages by assumption (Krugman and Venables 1996, Hillberry and Hummels 2002, Yi 2003, 2010, Johnson and Moxnes 2013). The focus of this literature is often the geographic location of each production stage, relative to the other(s), and so a finite and countable number of stages is useful for analytical purposes.<sup>8</sup> Relative to our work, these models avoid the question of the allocation of activities or tasks across stages, and focus on the extensive margin of completing a specific stage in a certain location.

These models are also silent about why some countries specialize upstream while others are downstream. In Yi (2010) and in Johnson and Moxnes (2013), for example, the specialization of countries along the chain is driven by exogenous productivity shocks and trade costs. This literature makes important insights about non-linear responses of trade to trade costs and differences between gross and VA trade. Our model also contains these forces, but we introduce intra-firm coordination costs and inter-firm transaction costs as additional sources of crosscountry heterogeneity. One goal of our paper is to understand the robustness of these insights to the richer theoretical structure we offer, where the extent of fragmentation and the specialization of countries along the chain are endogenous.

**2. Quantitative implications.** We contribute to a recent quantitative literature on value chains by using new indexes to calibrate our model of cross-border fragmentation and examine the effect of trade costs on the organization of production chains, trade and welfare.

Our quantification exercise relies on input-output matrices that we exploit in a new way. Input-output matrices and direct requirement coefficients are traditionally taken as an exogenous recipe that is essentially determined by technology. Instead, we argue that input-output matrices reflect transactions in intermediate goods between firms that are themselves endogenous economic outcomes. We show that these tables can be informative about the position of firms within supply chains that link firms both within national borders and across them. Unlike previous papers, our theory determines the allocation of tasks across firms and the length of production chains endogenously, and can thus shed some light on equilibrium input-output relationships when fragmentation is endogenous, both across and within countries.

Under the assumption that IO tables effectively summarize plant-to-plant movements for a representative firm in each industry, matrix algebra can be used to calculate, for each industry in the table, two numerical values: i) a measure of the industry’s “distance” from final demand (where distance is a count of the number of plant boundaries that will be crossed prior to final

> 8Antr`as and Chor (2013) offer a different perspective by taking the location and length of production chains as exogenous but examining the optimal allocation of ownership along the chain.

6