middle class larger relative to Kharas (2010), who focuses on the consumer market. As a result, we have not made an assumption about whether increasing returns are deferentially available in the investment or consumption sector. More generally, GDP is preferred to income based on household surveys given the risk of top-coding, and the fact that we are interested in the middle and top of the distribution, especially in low and lower-middle income countries (Deaton, 2005; Ravallion, 2003). The use of national accounts in place of average income is most controversial when studying the lower tail of the income distribution (Pinkovskiy and Sala-i-Martin, 2014).

**International market size** The third variable is a measure of relative international market size, according to legally-binding provisions to international trade agreements. We define each country’s global market by summing up the populations and incomes of all other countries, with weights corresponding to the number of legally enforceable provisions of multilateral agreements between the country and all others. Table 2 lists the 32 legal provisions in our data set, and shows that they fall into two broad groups, which together make up the legal architecture of the international economy.<sup>9</sup>

This measure has three main advantages for our analysis. First, it allows us to measure directly the effect of international integration treaties, participation in which is a policy choice for the government. Other analyses of trade liberalization (Sachs and Warner, 1995; Wacziarg and Welch, 2008; Easterly, 2019) have typically focused on a mixture of policy decisions (e.g., liberalizing state monopolies in exporting sectors), and trade outcomes (e.g., abnormally low shares of trade to GDP). By focusing specifically on the policy decision to integrate economically through trade agreements, we ensure our counterfactuals are tied to policies actually within government’s control. Second, because we calculate market size in terms of GDP and population, these measures allow us to estimate directly the relative value of integrating with a richer versus a more populous market. Finally, our measures allow us to exploit variation in market size stemming from the entry of _other_ countries into a trade agreement. A good example of this variation is what may be called the China shock to the WTO, shown in Figure 3. When China entered in 2001, GDP per-capita of WTO member states fell from above $11,000 to below $9,000, while population increased by more than

> 9We focus on what are called “core” provisions, those related directly to trade (Baldwin, 2008). Non-core provisions cover a wide variety of topics, for instance related to the enforcement of human rights, labor or environmental standards, as well anti-money laundering, consumer protection, and statistics cooperation. Our exclusion of non-core provisions has practical implications for measurement. Since we weight countries by the number of provisions, we do not want to overweight regional trade agreements, which include many more non-core provisions relative to the international agreements. We also experiment with an even narrower definition of international integration, according to which only provisions covering trade in goods and services are included (so we exclude provisions covering labor and capital flows). However, our preferred measure is the one covering all flows related to trade (directly or indirectly), as typically, such provisions are negotiated jointly in trade agreements.

16