Barcelona Economics Working Paper Series Trade, Firm Selection, and Innovation: the Competition Channel Trade, …rm Selection, and Innovation: the Competition Channel

The availability of rich …rm-level data sets has recently led researchers to uncover new evidence on the e¤ects of trade liberalization. First, trade openness forces the least productive …rms to exit the market. Secondly, it induces surviving …rms to increase their innovation e¤orts and thirdly, it increases the degree of product market competition. In this paper we propose a model aimed at providing a coherent interpretation of these …ndings. We introducing …rm heterogeneity into an innovation-driven growth model, where incumbent …rms operating in oligopolistic industries perform cost-reducing innovations. In this framework, trade liberalization leads to higher product market competition, lower markups and higher quantity produced. These changes in markups and quantities, in turn, promote innovation and productivity growth through a direct competition e¤ ect, based on the increase in the size of the market, and a selection e¤ ect, produced by the reallocation of resources towards more productive …rms. Calibrated to match US aggregate and …rm-level statistics, the model predicts that a 10 percent reduction in variable trade costs reduces markups by 1:15 percent, …rm surviving probabilities by 1 percent, and induces an increase in productivity growth of about 13 percent. More than 90 percent of the trade-induced growth increase can be attributed to the selection e¤ect.

If the gains from trade are small, is it worth facing the potentially disruptive distributional consequences of globalisation? 1 Assessing the size and identifying the sources of gains from trade is a long-standing challenge for economists. In recent decades, a new line of research introducing firm heterogeneity in trade models has uncovered a new source of welfare gains. Trade-induced reallocations of market shares from low to highly productive firms within the same industries increase sectorial efficiency, leading to improvements in aggregate productivity and to potentially large welfare gains. However, selection also carries welfare losses that can possibly outweigh the gains: firms' exit has a negative effect on welfare by reducing the variety of goods available in the economy.
Theoretical and quantitative analyses assessing the contribution of the selection margin have mainly featured market structures with perfect or monopolistic competition, focused on static models or on dynamic economies without long-run productivity growth. The goal of this article is to fill these gaps by providing a theory of trade with heterogeneous firms under oligopolistic competition and innovationdriven productivity growth. On the one hand, because of 'cross-hauling' of identical goods, oligopoly trade is potentially wasteful, therefore representing a more difficult environment in which to obtain welfare gains. On the other hand, trade reduces markups thereby generating pro-competitive effects which are absent in environments where firms' market power is constant. Moreover, innovation-driven growth can potentially magnify the gains from selection, as market share reallocations can affect not only the productivity level but also its growth rate. We show that the new gains due to selection can be substantial and that their dynamic component due to the interaction between selection, innovation and productivity growth magnifies the gains obtainable in static models with firm heterogeneity.
Our model economy features a continuum of imperfectly substitutable varieties, or product lines, brought to the market by firms with different productivities. Different from the standard Melitz (2003) model, each variety is produced by a small number of identical firms operating in an oligopolistic market. So individual firms are 'large in the small but small in the large': relevant actors in their own market, interacting strategically with their direct competitors, but infinitesimal in the economy as a whole (Neary, 2010). Upon paying a sunk cost, a small number of firms enters each product line by drawing their productivity from a distribution of existing technologies. If entry is successful, firms participate in Cournot competition with their rivals in the product line and invest in innovation to improve their productivity over time. Firms' innovation activity generates endogenous growth through within-variety knowledge spillovers typical of quality ladders models (Grossman and Helpman, 1991). The open economy features two symmetric countries engaging in costly trade. Since firms in each product line produce perfectly substitutable goods, two-way trade takes place because of strategic interaction between firms, as in Brander and Krugman (1983).
We first present a simple and analytically tractable version of the model in which the number of oligopolistic firms per product line is fixed and all operating firms export. Trade liberalisation can potentially generate static and dynamic gains from selection. First, a reduction in trade costs increases product market competition reducing markups. Reductions in markups force the least productive firms out of the market, reallocating resources towards surviving firms, increasing their average size and aggregate productivity. Second, the increase in surviving firms' size stimulates costreducing innovation thereby leading to faster productivity growth. Finally, selection involves potential welfare losses since exit reduces the number of varieties available to consumers. We show analytically that faster growth generates dynamic selection gains from trade, and that under plausible parameter restrictions, static selection gains can be also obtained.
We perform a quantitative evaluation of our theory in a more general version of the model where we endogenise the number of oligopolistic firms competing in each product line through free entry. We also introduce fixed export costs leading to an equilibrium where only the most productive firms export and charge a different markup compared to domestic firms. This markup difference proves to be crucial in generating trade-induced selection effects under free entry. Without markup dispersion the marginal and the entering firm would have the same profit opportunities, and the marginal firm would be indifferent to profit changes induced by trade. In this generalised framework, there are two additional forces at work: first, by increasing market size, trade raises the number of firms within each product line, thereby leading to a stronger pro-competitive effect. Second, lower trade costs induce more firms to start exporting. The new exporters experience an increase in market size pushing them to innovate more. This extensive margin of trade generates additional static and dynamic welfare gains. We calibrate the model to match salient firm-level and aggregate statistics of the US economy and solve it numerically. Moving from a prohibitive level of variable trade costs, autarky, to a 8.6% import penetration ratio reduces the markup of nonexporting firms forcing the less productive of them out of the market. Exporters reduce their markup on domestic sales due to fiercer foreign competition and increase the markup on foreign sales: pricing-to-market allows them to avoid passing the whole reduction in trade costs on foreign consumers. As profitability of export increases, more firms enter the export market. The average markup in the economy drops by about 29% generating a large pro-competitive effect of trade on prices. Fiercer competition and selection increase the market size of more productive firms (exporters), thereby raising their incentives to innovate ultimately leading to a 57% increase in aggregate productivity growth. These effects compound into large welfare gains: long-run consumption increases by 50% and about half of this change is accounted for by dynamic gains. Hence productivity dynamics doubles the gains obtainable in an oligopoly trade model with firm heterogeneity and static firm-level productivity. Moreover, we compare the benchmark economy with a version of it where the selection margins do not respond to trade liberalisation. We find that the overall welfare gains from trade are about 12 times and the dynamic gains are about 5 times higher in the benchmark model compared to its version where selection is not operative. This suggests that the interaction between selection and innovation/driven growth is fundamental in generating large welfare gains from trade liberalisation.

Literature Review
The article is related to several strands of literature. A novel set of empirical regularities about trade, competition and innovation has recently emerged from a large number of studies, using firm-level data. First, trade-induced selection reallocates resources from less to more productive firms triggering increases in aggregate productivity. 2 A second line of research has shown that trade liberalisation cleans the market of inefficient firms and forces surviving firms to innovate more (Lleiva and Trefler, 2010;Aw et al., 2011;Bustos, 2011;Bloom et al., 2016). Third, trade has pro-competitive effects by reducing prices and markups (De Loecker et al., 2016;Feenstra and Weinstein, 2016). Finally, Griffith et al. (2010) find that the EU Single Market Programme (SMP) was associated with increased product market competition and a subsequent increase in innovation and productivity growth. Our article presents a rich model providing a coherent interpretation of these empirical regularities. Trade liberalisation increases product market competition, triggers firm selection and stimulates innovation leading to higher aggregate productivity growth.
Our model features trade under oligopoly as in Brander and Krugman's (1983) pioneering work. 3 We extend their model to an economy with firm heterogeneity and productivity growth. Similarly to them, the wasteful nature of oligopoly trade can potentially offset the pro-competitive effects leading to losses from trade, but the new channels of firms' selection and endogenous growth introduce additional sources of gains from trade. This article is also related to the endogenous growth literature in several ways. In a recent survey, Grossman and Helpman (2015) discuss the fundamental channels linking trade and growth: international knowledge spillovers, market size and competition, relative prices, and technology diffusion. In modern environments with firm heterogeneity, the link between trade openness and productivity growth is still shaped by these classical channels. Baldwin and Robert-Nicoud (2008), introduce firm heterogeneity in an endogenous growth model of expanding product varieties (Romer, 1990) and find that the selection effect of trade on growth depends on the form of international knowledge spillovers. In a more general setup, with firm and worker heterogeneity, Grossman and Helpman (2014) show that under an arbitrary (positive) pattern of international knowledge spillovers, open economies innovate and grow more than closed ones. In old and new endogenous growth models, lower trade barriers tend to increase market size, thereby increasing innovation. This market size effect can be offset by an adverse competition effect: the successful innovators must share the market with foreign competitors. In Grossman and Helpman's (2014) baseline economy these two effects exactly offset each other. Finally, recent papers have explored the role of trade in accelerating knowledge diffusion. Sampson (2016) studies welfare gains in a model where productivity growth is driven by knowledge diffusion at the entry stage. Trade-induced selection accelerates knowledge diffusion and growth, thereby tripling the gains from trade relative to heterogeneous firms' economies with static productivity at the firm level. Along similar lines, Perla et al. (2015) set up a model where growth is driven by knowledge diffusion between incumbent firms, and show that trade accelerates technology diffusion and growth.
In a key departure from the literature discussed above, our economy features neither international knowledge spillovers nor technology diffusion. Trade stimulates innovation and growth by increasing product market competition: fiercer foreign competition reduces markups thereby triggering selection, reallocation and faster productivity growth. Peretto (2003) analyses the effects of trade on growth in an endogenous growth model with variable markups. Bertrand competition among oligopolistic producers generates, under some conditions, pro-competitive effects of trade triggering faster innovation and growth. In line with Peretto (2003), our economy features markups responding endogenously to trade costs but we depart by introducing firm heterogeneity and studying the effects of trade on growth through selection. 4 We depart from Perla et al. (2015) and Sampson (2016) by generating growth through innovation instead of technology diffusion and complement their results showing that dynamic gains from trade through innovation-driven growth can be substantial.
Finally, a stream of papers has recently analysed the welfare effects of selection in static models, or in models without long-run productivity growth. Arkolakis et al. (2012) show that welfare gains in a wide class of old and new trade models depend only on the change in the trade share and on the Armington elasticity of trade to changes in trade costs. If a given change in trade costs generates the same change in trade shares across models, gains from trade will be the same. Atkeson and Burstein (2010) set up a model with process and product innovation where trade has only transitional effects on growth. Selection produces welfare gains from trade through process innovation that are offset by losses through product innovation. Melitz and Redding (2015) find that Arkolakis et al.'s (2012) results hold only under some parameter restrictions, including the assumption that firm productivity follows an unbounded Pareto distribution. Deviations from these restrictions, such as assuming a bounded Pareto (Melitz and Redding, 2015) or a log-normal distribution (Head et al., 2014), allow heterogeneous firms models to generate substantial welfare gains from selection. All these papers feature models with either perfect or monopolistic competition and analyse static economies or dynamic economies without long-run productivity growth. Focusing on oligopoly in an economy with endogenous growth, we show that large gains from selection can be obtained even with an unbounded Pareto productivity distribution.
Section 1 sets up the basic two-country trade models where all firms export and the number of oligopolistic firms is exogenously given. This simple model is extended in Section 2, allowing for an endogenous number of firms in each product line through free entry and for selection into the export market. Section 3 quantitatively analyses the effects of trade liberalisation on innovation, growth and welfare. Section 4 discusses the role of endogenous markups in shaping the contribution of selection to the aggregate welfare gains from trade. Section 5 concludes.

The model
This Section presents a simple version of the model economy designed to illustrate the basic properties of the suggested theory. In a two-country world with symmetric technologies, preferences and endowments, both countries produce exactly the same set of differentiated goods which can be traded at the iceberg trade costs. Within a given variety, firms from both countries compete a la Cournot for market shares. At entry, firms in the same product line jointly draw their productivity from a given distribution; consequently, firms producing the same variety are equally productive, but productivity differs across varieties. After entry, firms allocate resources to increase their productivity. The innovation technology features within-variety knowledge spillovers at the country level generating sustained growth under a stationary productivity distribution. In the steady state, the productivity distribution permanently moves to the right as a travelling wave. In what follows, we will restrict the analysis to the state equilibrium.

Preferences
Time is continuous and denoted by t, with initial time t = 0. Each country is populated by a unit mass of identical consumers with preferences represented by: (1) with discount factor q > 0. There are two types of goods, a homogeneous good Y and a differentiated good X. A continuum of varieties of endogenous mass M t 2 ð0; 1Þ represents the differentiated good according to: (2) where x jt is the consumption of variety j, a 2 (0, 1) and 1/(1 À a) is the elasticity of substitution. Consumers are endowed with a unit flow of labour, which among other uses can be transformed one-to-one into the homogeneous good. In this sense, Y can also be interpreted as leisure. The labour endowment, or equivalently the homogeneous good, is taken as the numeraire.
1.1.2. Technology and market structure In each country, any variety j is produced by n identical firms, manufacturing perfectly substitutable goods. We assume that n is exogenously given. Because of countries' symmetry there are 2n identical firms in each product line. Firms use labour to cover both variable production costs and a fixed production cost k > 0. Productivity differ across varieties, thus we omit index j and identify varieties with their productivity, which we denote byz. A firm with productivityz, employing l workers to produce q units of output, has production technology: with g > 0. 5 Incumbent firms may undertake process innovation according to the R&D technology: where h t represents labour allocated to innovation, A > 0 is an efficiency parameter and k t is an externality defined as follows: Knowledge spillovers,z c , represent the average productivity of domestic direct competitorsthose producing the same variety. The more productive direct competitors are the more effective R&D is in enhancing productivity. This specification of innovation technology is commonly used in the endogenous growth literature to generate a constant steady state growth rate. 6 In a symmetric equilibriumz c ¼z. Innovation difficulty is measured by the inverse of D t : whereĝ ga=ð1 À aÞ andZ t is the average productivity of the overall economy. Innovating is harder for firms in highly productive produce lines. As shown later, this 5 We may think of this technological structure as a streamlined representation of a real economy in the following way. First, the set of firms is divided in small groups producing the closest possible goods in terms substitutability. We call the goods they produce a variety or product line. Second, to keep the model tractable, we assume homogeneity in productivity within varieties, but heterogeneity across varieties. This simplified technological structure does not capture only heterogeneity across the 'few' observable sectors in the data but also the productivity difference across the 'many' firms producing imperfectly substitutable goods. 6 Grossman and Helpman (1991) and Aghion and Howitt (1992) adopt a similar knowledge spillovers structure to obtain sustained growth in Schumpeterian growth models. assumption equalises productivity growth rates across varieties, stationarising the equilibrium productivity distribution. A similar assumption is commonly used in R&D-driven growth models with homogeneous firms to eliminate counterfactual scale effects and stationarise models with growing population (Jones, 1995;Kortum, 1997;Segerstrom, 1998). 7 In recent models of endogenous growth with heterogeneous firms, such as Klette and Kortum (2004), increasing innovation difficulty is introduced to stationarise the productivity distribution and match a robust stylised fact in the data: larger firms invest more in R&D but the growth rate of productivity does not scale with size. 8 Finally, let us define the entry technology. There is a unit mass of potential varieties of which M t 2 ð0; 1Þ are operative. At any time t, a new variety among the 1 À M t non-operative varieties can be introduced at zero cost by the n firms associated to it, which jointly draw a productivity from an initial distribution. Moreover, in each period firms are subject to an exogenous death shock d.

Equilibrium
We now turn to the steady-state equilibrium of this economy.

Households
The representative household maximises utility subject to its budget constraint. For given interest rate r and prices p jt , the corresponding first-order conditions read: where E ¼ R M 0 p jt x jt dj is total expenditure on the composite good. For variables that are constant in steady state, like r, Y, E and M, index t is omitted to simplify notation. Because of log preferences, total spending in the homogeneous good is b times total spending in the differentiated good. Equation (7) is the standard Euler equation implying r = q at the stationary equilibrium, and (8) is the inverse demand function for variety j.

Cournot equilibrium
Let q d;t and sq f ;t be the quantities produced by a domestic firm for the domestic and foreign markets, respectively, and let q x;t ¼ q d;t þ sq f ;t be total firm's output. Total domestic consumption of a particular variety is x t ¼ nðq d;t þ q f ;t Þ, smaller than total production nq x;t , the difference being equal to the iceberg trade cost s > 1. Under Cournot competition countries import goods that perfectly substitute domestic goods in the presence of positive variable trade costs. As in Brander and Krugman (1983), cross-hauling in similar products occurs because firms play separate Cournot games in the domestic and foreign markets.
At any time s, s ≥ 0, a firm producing a particular variety solves the following problem: The firm cash flow is discounted at q + d. The first pair of constraints represents the domestic and foreign inverse demand functions. The second pair splits total domestic and foreign demands between its own sales, q d;t and q f ;t , and those of direct domestic and foreign competitors,x d;t andx f ;t . The third constraint is the innovation technology. In a Cournot game a firm takes as given the path of its competitors' productionx t , the path of the externality k t , as well as the path of the aggregates E and X t . Symmetry implies We solve this differential game focusing on Nash equilibrium in open-loop strategiessee Appendix A.1 for details. Denoting by v t the costate variable associated toz t , writing the first-order conditions and imposing symmetry, Since p d;t ¼ p f ;t ¼ p t , from the conditions above we derive the equilibrium price: where h d ¼ ð2n þ a À 1Þ=nð1 þ sÞ and h f ¼ sh d are the inverse of the markups charged in the domestic and foreign markets respectively. Notice that a reduction in trade costs s raises h d , since the domestic market becomes more competitive due to the penetration of foreign firms. The pro-competitive effect of trade operates through this mechanism. Notice also that lowering the trade cost leads to higher markups on foreign sales. This happens because exporters enjoy a cost reduction in their shipments while domestic firms do not benefit from it. Hence, exporters can optimally charge a higher markup, not passing the whole cost reduction onto foreign consumers. 9 9 Pricing to market in Atkeson and Burstein (2008) is generated through the same mechanism.
It is important to notice that h f reaches one when s ¼ s n=ðn þ a À 1Þ; s corresponds to prohibitive trade costs, a limit above which the export markup becomes negative and firms do not export. Hence, autarky is obtained in our framework as a particular case where the trade cost is equal or larger than its prohibitive level. The domestic markup in autarky is h d ¼ h n ðn þ a À 1Þ=n, since domestic firms face no foreign competition in the domestic market.
In line with Brander and Krugman (1983), the cost of importing goods that could be otherwise produced locally can be measured by: defined as the ratio of total production to total consumption of the same variety, which we call the cross-hauling ratio. Let us now define the firm's average markup as the ratio of total revenue to variable production costs: It is easy to see that h x ¼ Ah d : The gap between firm's average and domestic markup is equal to the cross-hauling ratio. Notice that h x is decreasing in variable trade costs s: reaching its maximum (2n À 1 + a)/2n when s = 1. The autarky value h n is reached when s ¼ s. Intuitively, an increase in s increases the domestic markups 1=h d and decreases the export markup 1=h f , but since 1=h d [ 1=h f , the former effect prevails and the average markup increases with trade costs. This is the source of the procompetitive effect of trade that we will explore in detail later.
Combining (10) and (11) leads to the following expression for variable production costs: where e E/(nM) is average expenditure per firm, z ¼zĝ jt e Àĝgt is firm's detrended productivity, g is the endogenous growth rate of productivitycomputed belowand z ¼ ð1=M Þ R M 0 z j dj is average detrended productivity. Variable production costs in (16) are the product of average expenditures per firm, the inverse of the firm's average markup and the relative productivity of the firm. When the environment becomes more competitive, h x increases, prices decline, produced quantities increase and firms demand more inputs.
Optimal conditions (12) and (13) imply an equilibrium growth rate of productivity: the same for all firms. Equilibrium innovation for firm z can be derived using (4), (5) and (17): whereq ¼ ðq þ dÞ=A. Labour resources allocated to innovation h are directly proportional to firm's relative productivity z= z. Equation (18) shows that more productive firms make a larger innovation effort: since they produce more and innovation is cost-reducing, the benefits of a reduction in the unit production cost are increasing in size. This is consistent with the empirical evidence showing that more productive firms spend more on innovation without featuring higher growth rates of productivity (Lentz and Mortensen, 2008;Akcigit and Kerr, 2011). The specific form of the externality k in (5) allows for the growth rate to be equal across firms in steady state, offsetting the positive effect that the relative productivity has on innovation effort. Moreover, notice that a reduction in the markup, increases market efficiency and incumbent firms' market size, thereby stimulating innovation. Since there is no innovation in the homogeneous good sector, (1)-(3) imply that the growth rate of output is: where 1/(1 + b) represents the share of the composite good in total consumption expenditure.

Entry and exit
At any time t, there is a mass of potential varieties 1 À M, each produced by n firms, trying to enter the economy at zero cost. A productivity z is drawn for each of them from a time-invariant initial distribution Γ(z), which is assumed to be continuous in ðz min ; 1Þ, 0 z min \ 1. Notice that the entry distribution is defined on detrended productivity z. Since equilibrium productivity growth g is the same for all product lines, the (detrended) productivity distribution of incumbents is stationary. Defining the entry distribution on detrended productivity z, allows the equilibrium (detrended) productivity distribution be stationary as well. It is important to notice that the externality that makes new entrants benefit from incumbents productivity gains does not represent an engine of growth. Growth is driven by firm-level innovation, in the absence of which equilibrium yields zero long-run growth. 10 The stationary cutoff productivity z Ã is determined by the exit condition: which evaluated at steady state equilibrium prices and quantities can be written as: Notice that both net revenues and innovation costs depend on firm's distance from average productivity, z Ã = z. In the following, we assume g to be small enough such that 1 À (1 + g)h > 0, a sufficient condition for the cash flow to depend positively on z. Rearranging terms, Irrespective of their productivity, varieties are assumed to exogenously exit at rate d > 0. Stationarity of the mass of product lines M requires ð1 À M Þ½1 À Cðz Ã Þ ¼ dM . This condition states that the exit flow, dM, equals the entry flow defined by the number of entrants, 1 À M, times the probability of surviving, 1 À Cðz Ã Þ. Consequently: is a decreasing function of the productivity cutoff productivity Let us denote by l(z) the stationary equilibrium density. The endogenous exit process related to the cutoff productivity z Ã implies l(z) = 0 for all z \ z Ã . Since the equilibrium productivity growth rates are the same irrespective of z and the death shock is independent of firm productivity, in a stationary environment surviving firms remain always at their initial position in the distribution Γ. Consequently, the stationary equilibrium distribution is lðzÞ ¼ f ðzÞ=½1 À Cðz Ã Þ, for z ! z Ã , where f is the density associated to the entry distribution Γ. We can now write average productivity z as a function of z Ã ,

Market clearing
The labour market clearing condition can be written as: The unit labour endowment is allocated to production and innovation activities in the composite sector, as well as to production in the homogeneous sector. The second equality is obtained substituting l from (3), Y from (6), and using (4), (16) and (18).
after integrating over all varieties we obtain: a positive relationship between e and z Ã .

Existence and unicity
Next we prove existence and unicity of equilibrium.
ASSUMPTION 1. The entry distribution is such that: and the following parameter restrictions hold: where z e is the average productivity at entry and: Assumption (a) makes the right-hand-side of (EC) non-increasing in z Ã . As discussed in Melitz (2003), many common distributions satisfy condition (a). 11 Indeed, if the productivity distribution is Pareto, (EC) is horizontal. As stated in Proposition 1 below, under assumptions (b) and (c) (EC) cuts (MC) from above, which is sufficient for existence and unicity of equilibrium. Figure 1 provides a graphical representation.

Trade Liberalisation
This subsection analyses the effects of trade liberalisation on competition, selection, innovation and growth. It also provides a detailed exploration of the channels of welfare gains generated by all these trade-induced adjustments.   (15), a reduction in trade costs reduces the average markup 1=h x . This pro-competitive effect has several implications which we summarise below.
PROPOSITION 2. A reduction in s triggers a reduction in the average markup h x , raises the productivity cutoff z Ã , reduces the number of operative varieties M, increases the growth rate g and the R&D to sales ratio h=pðq d þ q f Þ.
Proof. See Appendix A.2. Figure 1 shows the selection effect. The reduction in the markup 1=h x shifts both equilibrium conditions (EC) and (MC) to the right, thus leading to a higher cutoff z Ã . Two mechanisms contribute to the rise in growth, a direct growth effect that does not depend on firm selection and a selection effect. We now derive the growth effect of trade liberalisation and decompose it into the direct and the selection effect. Before doing the decomposition, let us introduce the following notation representing the righthand-side of (MC): It can be easily shown that the partial derivatives mc 1 [ 0 and mc 2 \ 0. Recall that equilibrium e and z Ã are simultaneously determined by (EC) and (MC). At equilibrium, e and z Ã depend on s only through h x . The total derivative of g w.r.t. h x in (17) is: The direct effect is defined as the change of g that follows a change in h x , under the condition that z Ã remains unchanged and consequently (EC) is not binding. In other words, it only takes into account that e changes because the (MC) condition moves. Using the derivative of mcðz Ã ; h x Þ w.r.t. h x , it is easy to show that: The selection effect is the change of g induced by an increase in the cutoff productivity z Ã only. The selection effect is positive since, as shown above, mc 1 [ 0, and, from We now provide some intuition for these results. Although the number of firms in the global economy is fixed at 2n, the reduction in the trade cost increases the penetration of foreign firms, thereby making the domestic market more competitive. In a Cournot equilibrium, a reduction in the markup raises produced quantities; from (16) the quantity produced is positively related to h x . The increase in quantities is feasible since the homogeneous good becomes relatively more expensive (i.e. the relative efficiency of the differentiated sector increases) and consumers' demand moves away from it towards the differentiated sector. Moreover, the increase in quantities is also feasible because resources are freed by the reduction in trade costs. Since the benefits of cost-reducing innovation are increasing in the quantity produced but the innovation cost does not scale with production, the higher static efficiency associated with lower markups affects positively innovation and growth. This direct effect of competition on growth can be found in representative firm models of growth with endogenous market structure (Peretto, 1996(Peretto, , 2003Licandro and Navas-Ruiz, 2011).
The selection effect is specifically related to the heterogeneous firms structure of our model. A reduction in the markup raises the cutoff z Ã , thus forcing the least productive firms to exit the market. Market shares are reallocated from exiting to surviving firms, thereby increasing their market size and their incentive to innovate.

Welfare gains
We now decompose the welfare effects of trade into their different channels. Following Melitz and Redding (2015), we compare the welfare effects of trade in the basic model with those in a counterfactual economy where the selection margin is not operative. This economy has the same initial equilibrium of the benchmark model but changes in trade costs do not affect z Ã . Since our model features endogenous growth, we also distinguish between the static and the dynamic component of direct and selection gains from trade.
As pointed out by Atkeson and Burstein (2010), as long as love-for-variety matters, the positive welfare effect of selection may be offset by the reduction in the mass of varieties triggered by the same process. Since in our model, the mass of potential entrants (1 À M) is bounded above by one, selection always leads to a reduction in the mass of varieties, as can be seen in (20). In the Melitz model and its dynamic versions in Atkeson and Burstein, the mass of entrants can respond endogenously to changes in trade costs, potentially taming or even offsetting the loss of varieties due to selection. Our modelling strategy does not allow this, hence selection has a starker negative welfare effect through the loss of varieties.
Aggregate steady state welfare can be decomposed into four terms as follows: The first three components are static; the first two are associated with composite good consumption. The first reflects the productivity gains due selection which increases average productivity z and the welfare losses due to less varieties M. The second is related to the consumption of the differentiated good and to the oligopolistic distortions in this sector. Recall that h d ¼ h x =A, combining the pro-competitive effect of trade with the cross-hauling effect, as measured by A. The third component measures homogeneous good consumption utility. The last term represents the consumer surplus associated with sustained productivity growth in the differentiated good sector.
Since, as shown above, both the direct and selection effects of trade on growth are positive, a reduction in trade costs generates positive dynamic welfare gains from both channels. Are static gains from trade positive as well? The direct static effect operates through h d e, with e depending on h x . 12 From the discussion above concerning the direct growth effect of trade liberalisation, we know that h x e increases with h x . Indeed, h d ¼ h x =A and A is hump-shaped, being equal to one in the extreme cases of free trade, s = 1, and prohibitive trade costs, s ¼ s, and for s 2 ð1; sÞ it is larger than one. 13 Consequently, even if h x e is increasing with h x , trade liberalisation could reduce h d e at large values of s. Brander and Krugman (1983) show that the welfare gains from oligopoly trade without free entry are ambiguous: trade produces gains through the reduction in markups which increases consumer surplus. But there are also two opposite effects on producer surplus: foreign competition reduces profits on domestic sales but increases profits on export sales. When trade costs are high, there is little export and the negative effect of trade liberalisation on domestic profits dominates, leading to lower producer surplus and welfare losses. Vice versa, when trade costs are low, trade liberalisation increases producer surplus yielding positive welfare gains. Hence, welfare gains have a U-shape relationship with trade costs. Brander and Krugman further show that on introducing free entry, the negative effect on producer surplus disappears and trade always increases welfare through the pro-competitive effect. Similarly, in our model A is hump-shaped, implying that the direct gains h d e ¼ h x e=A can have an inverted U-shape relationship with trade costs. In the next Section we introduce free entry and show numerically that welfare gains are positive for all feasible values of the trade cost.
Static welfare gains from selection operate through z, M and e, all depending on z Ã . They can be decomposed into two sources, as can be seen by differentiating (21) with respect to z Ã : after substituting E = nMe. @e/@M is obtained by differentiating (MC), @M =@z Ã by differentiating (20) and @ z=@z Ã by differentiating the definition of z. Starting with the first component, we see gains from selection-induced increases in the average productivity level. This component also includes love-for-variety (LFV) losses, brought about by reductions in the mass of available varieties. The second component represents the change in labour allocated to the production of the differentiated good (excluding the fixed costs). Selection forces some firms out of the market, thereby reducing the amount of resources needed to cover fixed production costs. These resources are allocated to surviving firms, ultimately leading to more production and consumption. The following Proposition states conditions under which the static selection effects of trade liberalisation are always positive. 13 To show that, notice that the sign of the partial derivative @A=@s is equal to the sign of: ð1 À n À aÞð1 þ sÞ 2 þ 2ð2n þ a À 1Þ; which has a zero at 1 þ s ¼ ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi 2ð2n þ a À 1Þ=ðn þ a À 1Þ p , for s in the interval [1, n/(n + a À 1)]. A is increasing before that maximum and decreasing after. PROPOSITION 3. Selection produces static welfare gains through the fixed cost channel. For sufficiently small values of the exogenous death rate d, the productivity/LFV trade-off results in positive welfare gains as well.
As shown in the Appendix, the fundamental reason for this result is that the productivity effect is always positive and independent of d but the LFV effect is negative and increasing in d. There exists then a value of d for which the LFV effect dominates. This parameter restriction is in line with the literature assessing the welfare gains from selection, where the probability of firm death is set to zero (Arkolakis et al., 2012;Melitz and Redding, 2015).

General Model
This Section adds a free entry condition to determine endogenously the number of firms per variety, n, and a fixed export cost k x , removing the simplifying assumption that all firms export. We assume that a potential entrant pays a sunk cost, / > 0, that gives the right to produce one and only one particular variety. For each new variety, firms enter until expected profits are zero, implying that n is the same for all of them. Post-entry, if a variety is not productive enough to cover the fixed production costs k, all n firms exit together. Firms solve the problem (9) as in the simple model but the presence of fixed export costs implies that only the most productive firms export. Production and innovation decisions of exporters and non-exporters only differ in the markup they face: non-exporters charge the autarky markup 1=h n , while exporters charge on average 1=h x . With these differences in mind, we proceed to characterise equilibrium.
As shown in Appendix B, non-exporters and exporters' demands for variable inputs are:z Àg t q n;t ¼ h n e p p n ðzÞ ! a 1Àa ; (23) where q n;t , q x;t , and p n , p x represent non-exporters and exporters production and detrended prices, respectively. Prices follow (14) with h d ¼ h n for non-exporters. The average detrended price is: Since prices are negatively related to productivity, as in the simple model, labour demand is positively related to it. Notice that (24) becomes (16) when all firms are exporters; in this case, all firms set the same markup implying that relative prices are equal to relative productivities.
In order to keep the model stationary, D t in (5) is assumed to be: where direct competitors production y c is equal to q c n for non-exporters and q c x for exporters. This assumption is equivalent to the corresponding assumption in Section 1, where it can be shown that the degree of difficulty D ¼ h x e=ðz c t Þ Àg q c t . 14 At equilibrium, (25) becomes: The difference with respect to Section 1 is the scale factor h x =h n , which jumps to one when z crosses z Ã . Notice that when all firms export, h n ¼ h x and p=p n ¼ p=p x ¼ z=z, as in the simple model.
The difficulty index in (25) makes innovation harder for more productive firms allowing, as we show below, growth rates to be equal across varieties, a sufficient condition for the productivity distribution to be stationary. Since in our model more productive firms are also larger, we can interpret D both in terms of productivities (as we did in Section 1) or in terms of size. Hence, we can think of D as measuring the distance between the labour size of the average firm, h x e, and labour resources employed by firms producing varietyz, i.e. ðz c t Þ Àg y c t . Larger (more productive) firms face higher innovation difficulty than the average firm.
Using the new definition of the externality D t , the growth rate of productivity is: Steady state R&D for exporters and non-exporters is: Using the definition of p x ðzÞ and p n ðzÞ, we can immediately see that, as in the simple model, more productive firms do more R&D. Moreover, exporters innovate more than non-exporters. Due to different markups, exporters operate in more competitive markets allowing them to obtain larger equilibrium size, which in turn, leads to more R&D expenditure. The productivity cutoff for non-exporters is given by the zero profit condition, pðz Ã Þ ¼ 0: The cutoff condition for exporters is determined setting p x ðz Ã x Þ ¼p x ðz Ã x Þ, where p x ðzÞ are total profits of a firm operating in a traded product line z who sells to both markets, andp x ðzÞ are profits of a firm in the same line that decides to deviate by selling only domestically. The export condition implies that, at equilibrium prices, no firm has incentives to deviate by not exporting and saving the fixed export costs. In equilibrium the export condition is: Notice though, that since the average markup of exporters 1=h x is lower than that of deviating firms 1=h d , it is possible that for some parameter combinations exporters total profits are zero or negative for productivity levels above z Ã . Hence, (XC 0 ) pins down the export cutoff provided that total profits of the marginal exporter are non-negative. In the numerical solution that follows, we use condition (XC 0 ) to determine the export cutoff and check that the marginal exporter makes always non-negative profits. A firm entering the economy to produce a particular variety pays a fixed entry cost / > 0 before observing the variety's productivity. The number of competitors n is determined by a free entry condition requiring ½1 À Cðz Ã Þ p=ðq þ dÞ ¼ /, where expected profits are given by: x f½p x ðzÞ Àz Àg q x À h x ðzÞ À k À k x glðzÞdz: Using (23) and (24), the free entry condition can be written as: where: As in the simple model, the stationarity condition for the mass of firms M is determined by (20). Finally, the labour market clearing condition: equals the labour resources used by domestic and exporting firms plus those devoted to entry, ½1 À M ðz Ã Þ/, to the labour endowment of the economy. From (20) and the definition of h, the market clearing condition can be written as: A stationary equilibrium for this economy is a vector fz Ã ; z Ã x ; e; ng solving the system (EC 0 ) À (XC 0 ) À (FE) À (MC 0 ), with M ðz Ã Þ determined by (20).

Quantitative Analysis
In this Section, we first explore numerically the equilibrium properties of the generalised model. Second, we compute the growth and welfare gains from trade, decomposing them into their static and dynamic parts and highlighting the role of firm heterogeneity in shaping these gains.

Calibration
We target the US economy, for which micro data are widely available. Consistent with the evidence on firm size and productivity distribution, we assume that the entry distribution is Pareto with shape parameter j and scale parameter z min (Axtell, 2001;Luttmer, 2007). 15 We have to calibrate 11 parameters ða; s; d; q; b; A; k; k x ; /; j; z min Þ. The discount factor q is equal to the interest rate in the steady state, following the business cycle literature we set q = 0.02 which corresponds to an annual discount factor of about 98%. Using Census 2004 data, we set d = 0.09 to match the average enterprise annual death rate in manufacturing observed in period 1998-2004. Rauch (1999 classifies goods into homogeneous and differentiated, finding that differentiated goods represent between 64.6 and 67.1 % of total US manufactures, depending on the chosen aggregation scheme. We set b = 0.5 to get a share of differentiated goods 1/(1 + b) equal to 2/3. We normalise the minimum value of the productivity distribution z min to 1, without loss of generality. 16 Parameters ða; s; A; k; k x ; /; jÞ are jointly calibrated in order to match seven steady state moments predicted by the model to the corresponding firm-level and aggregate statistics. We target a productivity growth rate of 1.2% as reported by Corrado et al. (2009), 17 a profit share of national income of 25% (BEA) 18 and an R&D to sales ratio of 2.4% from Compustat. 19 Using Census data for US manufacturing firms, Bernard et al. (2006) find that exporters account for 18% of manufacturing firms, and Bernard et al. (2003) report a standard deviation of log firm productivity of 75%. We target these statistics, together with an import penetration ratio (import share of output) of 15 In our economy very finely defined product lines have benchmark production technologies to which a few active firms have access. An example of a product line could be smart phones. In this line a few top-end powerful firms share the global market and operate with similar productivities. To get a sense of the empirical mapping, the US NAICS industry classification finest sectoral disaggregation is at the 6-digit level. Our smart phone example belongs to sector 334220, 'radio and television broadcasting and wireless communications equipment manufacturing', the sector includes a large range of products from Airborne radios to cellular phones (smart phones are not specified) to televisions (about 30 different and quite broadly defined types of products). A product line in our model cannot be NAICS 334220, since we have a small number of firms (three or four in the calibration) competing tightly in the production of highly substitutable goods: iphone 6 competes with Galaxy 5S but not with Sony Home TV X. Hence, if we think about our product lines as sectors, there would not be a clear empirical counterpart for them, not even at the 6-digit level. For this reason, we target the distribution of firm productivity in the data. about 8.6%, obtained from the World Bank Development Indicators. 20 Finally, the average markup is set to 20 %, an intermediate value in the range of estimates reported in Basu (1996) and close to the median markup found in recent work by De Loecker and Warzynski (2012). Table 1 shows that the calibrated parameters deliver a fairly good model fit. The Pareto shape parameter of productivity distribution estimated by Luttmer (2007) for US firms is 1.06. Head et al. (2014) using French data for exporters to Belgium estimate a Pareto shape of 1.39. Our calibrated value for the Pareto shape lies in this range. The current empirical literature provides a wide range of estimates for the elasticity of substitution between goods. The 'macro' elasticity between home and imported goods is in general smaller than the 'micro' elasticity between foreign sources of imports. Feenstra et al. (2014), find that the median micro elasticity is 3.1, while the macro elasticity between home and imported goods is close to one. Our benchmark calibration of a = 0.32 implies an elasticity of substitution 1.48, closer to the macro estimates. 21

Trade Liberalisation
We use the calibrated economy to simulate the steady-state equilibrium response to changes in the trade cost s. More precisely, we analyse the response of product market competition, selection, innovation, growth and welfare when the iceberg trade cost The data report total merchandise trade as a share of GDP. Consistent with our symmetric countries model, we obtain the import share diving the total trade share by two. We target the average in the period 1980-2010. 21 Note that the estimates in the literature are mostly derived from CES demand structure in monopolistic competitive economies. In our oligopolistic economy, there is no variety trade and domestic and foreign firms compete head to head in the same product line. For this reason, we decided to calibrate a internally, and not relying on the wide range of elasticity estimates. moves from one, the theoretical lower bound representing the absence of barriers, to the prohibitive trade cost. 22 Since we are doing steady-state comparison, the welfare gains that we compute must be interpreted as gains from comparing the welfare of two global economies similar in all features except for the trade cost. Figure 2 shows the results. Figure 2 shows that trade liberalisation has a pro-competitive effect on both exporters and non-exporters. The pro-competitive effect results, from an increase in import competition induced by the reduction in trade costs, as well as from the increase in the number of domestic firms n. Exporters experience a markup reduction on their domestic sales, 1=h d , due to increasing foreign competition, and an increase in the markup on export sales, 1=h f , due to the drop in the variable export cost. 23 Notice also that although exporting firms experience an increase in their export markup this is not strong enough to offset the reduction in their domestic markup, therefore the average markup of exporters declines with trade liberalisation. In the simple model, we have proved that the average markup of exporting firms 1=h x falls with a reduction in trade costs. The numerical simulations in Figure 2 show that the two models qualitatively predict similar pro-competitive effects on exporters.
The reduction in the domestic markup of exporters and the increase in their export markup encourage more firms to start exporting and, as a consequence, the export cutoff z Ã x decreases when s declines and goes to infinite when the trade cost approaches its prohibitive level. In order to provide a clear image of this effect, we first show in panel four the export cutoff from free trade s = 1 to 1.13, then in panel five we show the cutoff from s = 1.13 onwards. A pro-competitive effect is also experienced by non-exporting firms, although the markup for non-traded varieties 1=h n is not directly affected by changes in trade costs. The drop in the markup of non-exporting firms is generated by the increases in the number of firms per variety n. Similar to Melitz and Ottaviano (2008), the endogenous market structure of our model implies that trade liberalisation has a positive effect on firms' production that outweighs the direct competition effect on prices and markups and allows surviving firms to be bigger, sell more, and earn higher profits on average. Hence, expected profits are larger in a more open economy and this leads a larger number of firms to enter the market. The reduction in markups for non-exporting firms triggers selection, forcing the less productive domestic firms out of the market, as can be seen from the increase in the domestic cutoff z Ã . In the baseline model, more productive firms are larger and since innovation scales with firm size, larger firms innovate more. In this generalised framework, exporters are larger and more productive than non-exporters, hence, as suggested by equilibrium conditions (28), they allocate more resources to innovation activities. As the trade cost falls, more firms enter the export market, thereby experiencing a boost in their size and increasing their innovation efforts. 24 Figure 2

2018] T R A D E , S E L E C T I O N A N D I N N O V A T I O N
increases aggregate innovation of exporters but not that of domestic firms. For very high trade cost the aggregate innovation of exporters is lower than that of nonexporters since very few firms export. As the trade cost falls and more firms export, innovation by exporters increases and innovation by domestic firms declines. Innovation by domestic firms declines because selection reduces the mass of nonexporters and the most productive among them enter the export market. Finally, aggregate innovation increases thereby raising the economy's productivity growth rate, as we can see in panel 8.
In order to provide a measure of the volume of trade produced by different levels of the trade cost, in Figure 2, we also report the import penetration ratio. Moving from s ¼ 1:2 to no variable trade costs, generates a substantial change in the volume of trade, with the import penetration ratio being about 17% at s = 1. Notice also that the absolute elasticity of trade to the trade cost varies massively for different levels of s; it is extremely high at autarky and substantially lower close to free trade. Variable trade elasticity will prove important in shaping the selection welfare gains from trade, as we will discuss later. For the moment, it suffices to notice that trade liberalisation has a positive effect on welfare. As in the simple model, welfare effects are both static and dynamic, and they originate directly through intensive margin of adjustment, and indirectly through tradeinduced selection margins. In the next Section, we break down the various sources of gains from trade and explore the economic forces governing them.

Trade, markups and innovation: empirical evidence
Before moving to the channels of welfare gains from trade, we discuss the empirical evidence in support of our model predictions.
Trade and markups There is a large literature documenting pro-competitive effects of trade. Harrison (1994) finds robust negative effects on firm-level profit margins of a large trade reform in Ivory Coast implemented in 1995. She also shows that accounting for the effects of trade on product market competition leads to larger positive effects of trade on the growth rate of firm productivity. Levinsohn (1993), using firm-level Turkish data, finds evidence of pro-competitive effects associated to a trade liberalisation reform in 1984. More recently, Feenstra and Weinstein (2016) find a substantial reduction in average markups in the US between 1992 and 2005 associated with a large increase in import shares. De Loecker et al. (2016), find that Indian firms do not entirely pass the cost reduction due to input tariff reduction in the period 1989-2003 to consumers. This happens because they cash in the lower costs by increasing markups. This mechanism is similar to what we observe in our model. Although we do not have trade in intermediate goods, in our economy, trade reduces the cost of reaching foreign markets and firms use some of the cost reduction to increase their export markup. Moreover, when focusing on changes in final goods tariffs De Loecker et al. (2016) find that trade liberalisation has a negative effect on total markups of exporting firms, similarly to what our model suggests.
Trade, selection and innovation There is a growing empirical literature documenting the effects of trade on selection and innovation. Bloom et al. (2016), using a new data set of firms across twelve European countries find that import competition from China led to faster technological change along several dimensions, including patenting, IT intensity and TFP. Bustos (2011) studies the impact of a large regional trade agreement, MERCOSUR, on a measure of firm-level innovation which includes R&D, spending for technology transfer, and capital goods that embody new technologies. She finds that increase in revenues generated by tariff reductions lead exporters to innovate more. In line with these results, in our model, trade increases innovation only among exporters.
Trade, markups, and innovation/growth Griffith et al. (2010), using European sectorlevel data, find that the EU SMP, a large programme deregulating the product market which also includes reductions in trade barriers, is associated with increased product market competition, as measured by a reduction in average profitability, and with a subsequent increase in innovation intensity and productivity growth. Aghion et al. (2009) using firm-level UK data, find that incumbent productivity growth and patenting in UK firms is positively correlated with foreign firms' entry in technologically advanced industries. This technologically advanced industries are those where foreign and domestic firms are more neck-and-neck, that is they have similar levels of technology and market shares.

Growth and Welfare Gains from Trade
In this subsection, we quantify the welfare gains from trade and decompose them into their different sources. First, we decompose welfare gains into their static and dynamic parts highlighting the role of productivity growth. Second, we explore the role of firm heterogeneity decomposing growth and welfare gains from trade into their direct and selection components.

Static and dynamic gains
Welfare gains of moving from autarky to trade are quantified with a consumption compensating variation measure. Let us denote consumption at time t by X t ¼ fX t ; Y g, X t growing at the rate gg and Y constant, and any (balanced growth) equilibrium consumption path, for t 2 (0, ∞), by Ω. Moreover, we label X A the stationary consumption path in autarky and X s the stationary consumption path in a trade equilibrium with s 2 ð1; sÞ (notice that X A ¼ X s ). Welfare can then be denoted by U i ðX i Þ, i = {A, s}, representing the value of the discounted utility flow resulting from substituting the equilibrium path X i in the welfare function (1). Consequently: In order to make the welfare of the autarky and trade balanced growth path equilibria comparable, we assume that the entry distribution at time t = 0 is the same for both economies and we make it equal to the stationary entry distribution Γ(z) (recall that by definition of z, z ¼z 0 ). Any welfare difference will be then due to differences in trade costs, selection and growth performance.
Let us define the compensating variation measure x, x 2 R þ , such that U A ðxX A Þ ¼ U s ðX s Þ, for any s 2 ð1; sÞ. It can be easily shown that: This measures the percentage gains in terms of lifetime consumption of comparing the trade economy with the autarkic economy. The growth contribution to these gains can be written as: The static gains can be obtained as a residual subtracting x g from the total gains x. In Table 2, we report the quantitative effects of moving from autarky to the benchmark trade cost.
Moving from autarky to the benchmark economy trade level, the average markup drops by about 29% and productivity increases by 33%. The annual growth in autarky is 0.79% while under trade it goes up to 1.24%, a 57% increase. The last row shows the welfare gains and its decomposition into static and dynamic gains according to (29). Moving from autarky to the benchmark import penetration ratio increases welfare by 50%, about half of this increase is attributable to trade-induced productivity growth. Figure 3 reports the decomposition of the gains of moving from autarky to all levels of trade costs. The first panel reports welfare gains. Not surprisingly, gains are increasing in the size of liberalisation, with the dynamic gains rising more steeply than static gains. Although the main scope of the article is to explore the structure of the gains from trade assessing the role of productivity dynamics as an additional source, it is worth noticing that the absolute size of the total gains from trade is quite large. Perla et al. (2016) show that in their dynamic economy moving from autarky to a 23% total trade share leads to a 24% increases in welfare. This entire increase is due to static gains, while the potential gains coming from trade-induced growth are offset by the decline of product variety due to selection, as in Atkeson and Burstein (2010), and reallocation of labour away from production. The size of our static gains is similar to theirs but in our model, trade generates large dynamic gains that are not completely offset by the loss of variety due to selection.
The second panel of Figure 3 reports the ratio of the overall welfare gains to the static gains for different levels of the trade cost, thus measuring the proportional increase in gains due to productivity growth. Starting from the benchmark calibration of the trade cost, in line with Table 2, the total gains are about two times higher than those obtainable in an economy with only static gains. Starting from a higher initial trade cost, the ratio declines but total gains are still substantially higher then static gains, about 40% higher close to autarky. In line with our results, but in a model where productivity growth is driven by knowledge diffusion at the entry stage and not by innovation, Sampson (2016) finds that 'dynamic' selection leads to welfare gains from trade at least three times those obtainable in heterogeneous firms' economies with static steady states. Finally, Figure 3 reports the ratio between growth under costly trade and autarky, showing that growth is about 57% higher at the benchmark trade cost compared to autarky, and always robustly higher at all other levels of the trade cost. Similar results are obtained in Perla et al. (2016), while the growth rate increases by about 25% in Sampson (2016) when the import penetration ratio goes from zero to 10%.

Direct and selection effects
We now decompose the gains from trade into direct gains, which do not depend on selection, and selection gains hinging on the reallocation of market shares from low to high productive firms. Following Melitz and Redding (2015), and in line with our decomposition in the simple model, we construct a counterfactual economy where the growth rate, welfare, the import penetration ratio, the share of exporting firms, and the average productivity of exporters and non-exporters are the same as in our benchmark economy; essentially, the two economies have the same equilibrium at the benchmark trade cost. We then compute the gains from trade in this economy shutting down the extensive margins, i.e. we do not let the cutoffs z Ã and z Ã x respond to changes in the trade cost. This allows us to isolate the direct gains from trade, and compute the contribution of selection comparing these gains to those obtained in the benchmark model.
In first panel in Figure 4, we compare the welfare gains obtained in the benchmark model with the direct gains obtained in the model without selection. We can see that selection generates total gains of moving from the benchmark trade cost to autarky that are over 10 times larger than the direct gains. Moreover, the dynamic gains in the benchmark model are about five times larger than those generated shutting down selection. Figure C2 in online Appendix shows that shutting down selection leads to small growth gains: growth at the calibrated trade cost is only 8% higher than in autarky, strikingly lower that the 57% difference obtained in the benchmark model. Moreover, welfare gains are just about 4.5%, way below the 50% gains obtained in the benchmark model. Why are the selection gains from trade higher than those generated by a model where the extensive margins of exit, entry and exporting are shut down? Arkolakis et al. (2012) show that in a large class of models satisfying three macro-level restrictions, the gains from trade are pinned down by two sufficient statistics, the domestic trade share and the trade elasticity, and they do not depend on the different micro-specifications of the model. These restrictions are as follows: (i) balanced trade; (ii) aggregate profits are a constant share of aggregate revenues; and (iii) CES demand system with a constant elasticity of trade with respect to variable trade costs.
They show that the standard Melitz (2003) model with unbounded Pareto distribution of productivity satisfies these restrictions. As a consequence, the welfare gains from a given increase in the domestic trade share in this model are identical to those obtained in a version of the model without firm heterogeneity, such as Krugman (1980). Melitz and Redding (2015) find that small variations from these restrictions imply that the trade elasticity is not constant and therefore it is not a sufficient statistics for welfare. They show that replacing unbounded Pareto with a bounded Pareto distribution, CES demand does not yield constant trade elasticity and the welfare gains generated by a model with firm heterogeneity are arbitrarily larger than those obtainable with homogeneous firms. The class of models considered in Arkolakis et al. (2012) features either perfect or monopolistic competition, hence our oligopolistic economy is outside that class and violates both restrictions (ii) and (iii). Figure 2 shows that the elasticity of trade to trade cost varies massively at different levels of openness. Moreover, in Figure 4, we see that trade elasticity also varies across models. To be precise, the elasticity in the benchmark model is higher than that in the model where the selection margins have been shut down and this difference is increasing the closer we are to autarky. This suggests that, similarly to Melitz and Redding (2015), in our economy, variable trade elasticity generates different gains in models with and without extensive margins. Notice however, that differently from the monopolistic competitive environment of the standard Melitz model considered by Melitz and Redding, in our oligopolistic market structure, trade elasticity is not constant even with unbounded Pareto. Head et al. (2014) show that the new gains from trade due to selection can be substantially larger if instead of using an unbounded Pareto the model is calibrated, using a log-normal distribution of firm productivity. The reason is that the log-normal delivers variable trade elasticity. Our results show that under oligopoly, variable trade elasticity and large gains from selection can be obtained even calibrating the model with the typical unbounded Pareto.
We can draw three conclusions from these experiments. First, economies with oligopoly trade feature variable trade elasticity and generate new gains from tradeinduced selection not obtainable in models with homogeneous firms. Second, innovation-driven productivity growth increases the gains from trade originating from firm selection substantially. Hence, performing welfare analysis in models with static steady-state productivity, such as Melitz (2003), may lead to underestimating gains from trade. Third, abstracting from firm heterogeneity, the previous generation of trade and growth models, such as Grossman and Helpman (1991) and Peretto (2003), are likely to largely underestimate the growth and welfare gains from trade.

Robustness
Next, we explore the robustness of these results to a wide range of parameters' specifications different from our benchmark calibration. To be precise, we compute the total gains, the ratio of total to static gains, the relative growth rate and the direct gains of moving from the benchmark trade cost to autarky, changing one parameter at a time away from its calibrated value. 25 Table 3 show the results and Tables C.1 and C.2 in the online Appendix report how deviations from the calibrated parameters affect the moments targeted in the calibration. This allows us to check both the difference in welfare gains and in moment matching generated by parameters' departure from the benchmark calibration. Table 3 shows that total gains are substantially above static gains, suggesting that the sizable contribution of productivity dynamics found in the benchmark calibration is sufficiently robust. Not surprisingly, the level of total gains and the ratio of total over static gains is low for higher levels of the discount factor q and low levels of the innovation efficiency parameter A. A high discount rate implies that consumers care less about future growth and, as a consequence, the impact of growth on their lifetime consumption is lower. Low efficiency of the innovation technology implies lower returns innovation, lower equilibrium growth and a larger share of labour needed to keep the economy growing. Although trade increases growth more under low innovation efficiency, due to its lower level, growth is a smaller component of welfare and comes at a higher cost, since it diverts more resources away from production. It follows that both the total gains and their dynamic components are lower than the lower innovation efficiency.
Higher demand elasticity (higher a) increases the dynamic gains from trade. Higher substitutability across varieties implies stronger intensive margin of reallocation. More elastic demand generates larger growth effects of trade, thereby magnifying the dynamic component of the welfare gains at the expenses of the static component. Moreover, a more reactive intensive margin reduces the contribution of selection to the gains from trade. A higher share of the differentiated good in the economy (lower b) increases total gains and the share of total over static gains. Intuitively, the larger the weight of the differentiated sector in consumer utility the stronger the selection effects of trade.
Notice also that in all these different scenarios, the total gains from trade obtainable with our heterogeneous firms economy are substantially higher than the direct gains, obtained in a version of our economy where the selection margins have been shut down. This suggests that firm selection has an important role in generating additional welfare gains.
Since our initial productivity distribution is an untruncated Pareto, the degree of heterogeneity is summarised only by the shape parameter j. The homogeneous firm model corresponds to the limit case in which the j ? ∞. Following Melitz and Redding (2015), we can study the role of firm heterogeneity showing how welfare gains change as we move from the benchmark economy towards an economy with less firm heterogeneity. This yields a continuous comparative statics with respect to the degree of firm heterogeneity. In Figure 5, we perform a wider robustness check on the role of firm heterogeneity in shaping the gains from trade and its composition. As for the robustness analysis above, the welfare gains are computed comparing autarky with the benchmark trade cost.
The results show that less heterogeneity, higher values of j, is associated with lower total gains and lower ratio of total to static gains. Intuitively, the lower the degree of firm heterogeneity, the lower the scope for the selection margin in generating tradeinduced reallocations and welfare gains. The total welfare gains decrease substantially  as the degree of firm heterogeneity declines. Interestingly, a lower degree of heterogeneity among firms affects the dynamic gains more than the static gains. In fact, as the Pareto shape increases the ratio between the total and static gains tends to one. This is because the growth effect of trade declines substantially at lower degrees of firm heterogeneity. As shown in the second panel, growth is about 57% higher under trade than in autarky in the benchmark economy (j = 1.14) and only 3% higher when the Pareto shape increases to j = 2. Moreover, Table C.2 shows that at j = 2 equilibrium growth is almost zero, and consequently the contribution of productivity dynamics to the gains from trade becomes negligible.

Discussion
In this Section, we dig deeper into the role of endogenous markups in driving the quantitative results shown above. We show that in the general model, the presence of markup dispersion is necessary for our oligopolistic economy with free entry to generate trade-induced selection. We develop our argument in two stages. We start showing that trade does not generate selection in the simple model of Section 1 if we allow the number of firm per product line to be endogenously determined by the free entry condition but we keep the assumption that all firms export. This result echoes the neutrality result in Atkeson and Burstein (2010). We then move to the general model where the number of firms is endogenous, only the most productive firms export, and markups for exporters and non-exporters are different, and show that the selection effect of trade reappears. The absence in Atkeson and Burstein (2010) of selection gains from trade is fundamentally due to the role played by the free entry condition, which by shrinking the mass of operative varieties generates welfare losses which offset the gains. We show below that the free entry condition plays a similar and even more extreme role in our simple model. This can be easily seen by adding the free entry condition to the simple model of Section 1. 26 Notice that, when all varieties are traded, the free entry condition becomes: ½1 À ð1 þ gÞh x e þq À k ¼ q þ d 1 À Cðz Ã Þ /; where the left-hand-side represents the average profit at entry. Combining this with the exit condition (EC) and rearranging terms, we obtain: which determines z Ã independently of h x and, consequently, independently of the iceberg trade cost s. Hence, changes in trade costs do not affect selection and cannot have any welfare effect through the selection channel. This result can be easily understood in terms of arbitrage. Incumbent firms face two alternatives: operating their current technology or exiting and entering again by paying the fixed entry cost and drawing a new productivity level. This trade-off is represented in (30), which combines the entry and exit conditions. Since both exiting and entering firms face the same markup, arbitrage makes the marginal firm indifferent to markup changes and, consequently, to changes in trade costs. While in the simple model, the markup is the same for all firms, the general model features exporting firms charging lower markups than non-exporters, as shown in (23) and (24). Hence, entering and exiting firms face different profit opportunities. As can be seen by comparing the free entry condition (FE) and the exit condition (EC 0 ), the marginal firm is not indifferent anymore to changes in profits induced by trade liberalisation and the entry/exit arbitrage does not imply that selection is independent of the markup. It follows that free entry does not shut down the selection effect of trade which, as shown in Table 2, yields positive welfare gains.

Conclusion
In this article, we build a rich model of oligopoly trade featuring heterogeneous firms, endogenous markups and innovation-driven growth, to identify and quantify different sources of welfare gains from trade. We show that trade increases product market competition by reducing markups, thereby triggering firm selection and productivity growth. Trade leads to substantial welfare gains, about half of which are accounted for by the effect of selection on productivity growth. Dynamic gains due to the growth effects of trade double the welfare gains obtainable in a static version of our economy.
In the current debate on the new welfare gains from trade due to firms selection, it is shown that monopolistically competitive economies with firm heterogeneity do not produce new gains if firms draw their productivity from an unbounded Pareto distribution (Arkolakis et al. 2012;Melitz and Redding, 2015). We show that under an oligopolistic economy with endogenous productivity growth, trade-induced selection has first-order effects on welfare even with unbounded Pareto productivity distribution.
Since introducing free entry is a notable challenge in general equilibrium models of oligopoly trade, we consider a simple entry strategy that only generates markup differences between exporters and non-exporters. This is a limitation of the model and a challenge for future research would be to generalise the model to a full distribution of markups across heterogeneous firms. In an ongoing project, Impullitti et al. (2016), we are generalising a static version of the model along this and other dimensions.
Nash equilibrium in open-loop strategies. Let a ijt ¼ ðq ijt ; h ijt Þ, t ≥ s, be a strategy for firm i producing j at time t. Let us denote by a ij firm i's strategy path for quantities and innovation. At time s a vector of strategies ða 1j ; . . .; a ij ; . . .; a nj Þ is an equilibrium in market j if: V ijs ða 1j ; . . .; a ij ; . . .; a nj Þ ! V ijs ða 1j ; . . .; a 0 ij ; . . .; a nj Þ ! 0; for all firms {1, 2, . . ., n}, where in ða 1j ; . . .; a 0 ij ; . . .; a nj Þ only firm i deviates from the equilibrium path. The first inequality states that firm i maximises its value taking the strategy paths of the others as given and the second requires firm i's value to be positive. 27 Each domestic firm solves the dynamic problem (9). Writing down the current-value Hamiltonian and computing the first-order conditions, assuming symmetry where v t is the costate variable. Add (A.1) and (A.2) and use q d;t =x t þ q f ;t =x t ¼ 1=n to obtain: where h d and h f are the inverse of the markups charged in the domestic and export markets respectively. Substitute them in the inverse demand function (8) to get: Multiply both sides of the above equation by q x;t , to obtain: Substituting x t ¼ ½z Àg t ðX a t =h d E t Þ 1=ða À 1Þ into (2) leads to ðx t =X t Þ a ¼ z=ðM zÞ. Finally, use the definition of A to derive (16). 27 The open-loop equilibrium allows for a close-form solution. The drawback of focusing on the openloop equilibrium is that it does not generally have the property of subgame perfection, as firms choose their optimal time-paths strategies at the initial time and stick to them forever. In closed loop equilibria, instead, firms do not pre-commit to any path and their strategies at any time depend on the whole past history. The Nash equilibrium in this case is strongly time-consistent and therefore sub-game perfect. Unfortunately, closed loop or feedback equilibria generally do not allow for a closed form solution and often they do not allow for a solution at all. The literature on differential games has uncovered classes of games in which the open-loop equilibrium degenerates into a closed loop and therefore is subgame perfect (Fershtman, 1987;Cellini and Lambertini, 2005). A sufficient condition for the open-loop Nash equilibrium to be subgame perfect is that the state variables of other firms do not appear in the first-order conditions for each firm.
The export cutoff is then defined by the indifference condition p x ðz Ã x Þ ¼p x ðz Ã x Þ, which is (XC 0 ) in the text. For s 2 (1, 1/a), it is easy to see that the term in brackets at the left-hand-side of the previous equation is decreasing in s. Hence trade liberalisation tends to reduce the export cutoff z Ã x .

University of Nottingham and CES-ifo Munich University of Nottingham and IAE Barcelona
Accepted: 5 October 2016 Additional Supporting Information may be found in the online version of this article: