Persistence, Non-Linearities and Structural Breaks in European Stock Market Indices

This paper examines persistence, structural breaks and non-linearities in the case of five European stock market indices, namely the FTSE100 (UK), DAX30 (Germany), CAC40 (France), IBEX35 (Spain) and FTSE MIB40 (Italy), using fractional integration methods. The empirical results provide no evidence of non-linearities in either prices or returns; the former are found to exhibit unit roots and the latter to be I(0) in most cases. Further, between 2 and 4 structural breaks are found for each of the return series, and mean reversion in some subsamples.


Introduction
A small proportion of firms generate the bulk of export revenue in each nation (Bernard et al., 2007;Mayer and Ottaviano, 2007). Richer countries tend to have more and larger exporters, with greater concentration in the top 5% (Fernandes, Freund, and Pierola, 2015). These large exporters help define specialization patterns and play a key role in shaping the impact of trade liberalization on macroeconomic volatility (Freund and Pierola, 2015;di Giovanni and Levchenko, 2012). To understand how and why (some) firms eventually become successful exporters, the heterogeneous-firm trade literature is paying growing attention to dynamics. While the increased availability of customs records has made it possible to study firms' export behavior over time, we still have a limited understanding of the mechanisms underlying the evolution of export performance over the firm life cycle.
In this paper, we use rich micro data to document new facts about the joint evolution of firm performance and prices over the life cycle, and develop a theory of firm dynamics emphasizing the interaction between learning about demand and quality choice to explain the observed patterns. Drawing on transactions-trade and firm-level census data from the Portuguese manufacturing sector, we document that: (1) within narrow product categories, firms with longer spells of activity in export destinations tend to ship larger quantities at similar prices, thus obtaining larger export revenue; and (2) older or more experienced exporters tend to import more expensive inputs. In line with prior research, we also find that the positive relationship between export revenue and market experience reflects growth, not just market selection based on initial size; and that revenue growth within destinations (conditional on initial size) tends to decline with the length of activity there (Eaton et al., 2008;Berthou and Vicard, 2013;Ruhl and Willis, 2014).
To account for the joint observation of these patterns in the data, we introduce quality choice of outputs and inputs (Verhoogen, 2008;Kugler and Verhoogen, 2012) and learning about demand (Jovanovic, 1982;Arkolakis, Papageorgiou, and Timoshenko, 2015) into a Melitz (2003) model of monopolistic competition and firm heterogeneity. In the model, firms supply products of varying quality based on their beliefs about idiosyncratic expected demand. Through the life-cycle, an average surviving firm updates its demand expectations upwards, grows, and, as a result, finds it optimal to upgrade the quality of outputs, which requires using higher quality inputs. Since inputs of higher quality are more expensive, average input prices rise with export experience. The evolution of output prices is less clear-cut. On the one hand, quality upgrading leads to a higher price. On the other hand, an increase in demand expectations increases profitability and causes a price reduction. Hence the model is able to rationalize the varying behavior of input and output prices over the firm life cycle observed in the data.
We explore the quantitative implications of our theory by calibrating it to match crosssectional and dynamic moments of the distributions of sales, exports and prices observed in the Portuguese data. Calibrated to match the observed age-dependence of exports growth and input prices, the model accounts for about a third of the (conditional) size-dependence of growth rates that emerges from the data, and correctly predicts that the quantity of inputs increases with export-age.
Armed with the calibrated model, we assess the implications of regulations imposing minimum product quality standards on exports. We find that this policy reduces welfare through two distinct channels. First, it reduces firm entry in export markets, and hence lowers the number of export varieties available to consumers. Second, it distorts an intensive margin of adjustment. To participate in the export market, marginal exporters are forced to comply with the standard by choosing higher-quality inputs. This choice leads to a reallocation of productive resources from large and old towards small and young firms, which causes a further decline in welfare.
We contribute to several strands of existing research. A recent body of literature on firm dynamics offers variants of Melitz (2003) in which firms experience idiosyncratic shocks to their productivity, including Luttmer (2007), Impullitti, Irarrazabal, and Opromolla (2013), and Arkolakis (2015). If modified to allow for quality choice (as in Kugler and Verhoogen (2012)), this class of models would generate a positive relationship between input prices and export experience: as entrepreneurs become more capable (for exogenous reasons), firms grow and find it optimal to upgrade the quality of outputs and inputs. However, as emphasized by Arkolakis, Papageorgiou, and Timoshenko (2015) this class of models is unable to explain the age-dependence of growth rates (conditional on size) observed in the data.
A related class of models links firm dynamics in export markets to learning about unobserved demand (Albornoz et al., 2012;Chaney, 2014;Eaton et al., 2014;Ruhl and Willis, 2014;Timoshenko, 2015a,b;Arkolakis, Papageorgiou, and Timoshenko, 2015). While the microfoundations of the learning process vary across models, this body of work makes it possible to rationalize the age-dependence of export growth (conditional on size) observed in the data. Existing learning models are not well-suited, however, to explain the observed increase in wages and material input prices with export experience. 1 Our findings also contribute, therefore, to the literature on product quality and trade at the firm-level. We borrow from Verhoogen (2008) and Kugler and Verhoogen (2012) the theoretical ideas that in order to produce higher-quality outputs firms need to use higher-quality inputs; and that all else equal more capable entrepreneurs will choose to produce higher quality products. These hypotheses have found considerable support in the data. Using detailed firm-product records from the Colombian manufacturing sector, Kugler and Verhoogen (2012) find that larger plants tend to charge more for outputs and pay higher prices for material inputs. In Portuguese data, Bastos, Silva, and Verhoogen (2014) find that firms experiencing an exogenous increase in the share of sales to richer export destinations (where consumers have higher willingness to pay for quality) tend to pay more for material inputs. 2 Our paper contributes to this this literature by shedding light on the dynamic interaction between learning about demand and quality choice in shaping the evolution of firm performance and prices over the life cycle. 3 Finally, our paper contributes to the theoretical literature on minimum quality standards and trade, including Das andDonnenfeld (1989), Fischer andSerra (2000) and Baltzer (2011). A common approach in this literature has been to examine the welfare impacts of quality standards in partial equilibrium models of oligopoly featuring a small (exogenously given) number of producers in each country. By revisiting this question in the context of a quantitative general equilibrium model of firm dynamics, we are able to identify several important new channels by which quality standards influence social welfare. In particular, we find that quality standards reduce welfare by lowering entry in export markets and reallocating resources from large and old towards young and small firms. 4 The paper proceeds as follows. Section 2 describes the data employed. Section 3 presents stylized facts about the evolution of firm performance and prices. Section 4 develops a theory of firm dynamics featuring learning about demand, firm heterogeneity and quality choice of inputs and outputs. Section 5 explores the quantitative implications of the model by calibrating it to the Portuguese data and develops counterfactual simulations on the effects of imposing minimum quality standards in export markets. The last section concludes the paper.

Data description
We link and examine data from the Foreign Trade Statistics (FTS) and the Enterprise Integrated Accounts System (EIAS) of Portugal. The FTS are the country's official infor-2 Other recent papers provide several additional pieces of evidence on the relationship between output prices, input prices and firm characteristics. In cross-sectional data, Bastos and Silva (2010) find that more productive Portuguese firms ship larger volumes at higher prices to a given destination, and that exporters tend to charge higher prices in richer destinations. Manova and Zhang (2012) show that Chinese firms that export more, serve more markets and charge higher prices for exports tend to pay more for their imported inputs. Examining data for manufacturing plants in India, the US, Chile, and Colombia, Hallak and Sivadasan (2013) document that, conditional on size, exporting firms charge higher prices, pay higher wages, use capital more intensively, and purchase more expensive material inputs.
3 Our paper is also related to the literature on product quality and trade at the product-country level, including influential contributions by Schott (2004), Hummels and Klenow (2005), Hallak (2006), Khandelwal (2010) and Hallak and Schott (2011). 4 Our model is also able to account for recent empirical evidence on the effects of product standards on exporting behavior. Using detailed firm-product-destination data for France, Fontagné et al. (2015) find that standards reduce entry in export markets and lead to an increase in export prices, especially among small exporters. mation source on international trade statistics, gathering export and import transactions (values and physical quantities) of firms located in Portugal by product category (CN classification, and destination or source market. These data are collected in two different ways. Data on trade with countries outside the EU (external trade) are collected via the customs clearance system, which covers the universe of external trade transactions. Information on the transactions with other EU member States (internal trade) are obtained via the Intrastat system, where the information providers are companies engaged in internal trade and registered in the VAT system whose value of annual shipments exceeds a legally binding threshold. Trade transactions in these data are free on board, hence excluding any duties or shipping charges. Despite the above-mentioned constraint, the export and import transactions included in the FTS data aggregate to nearly the total value of merchandise exports and imports reported in the official national accounts.
The EIAS is a census of firms operating in Portugal run by the National Statistics Institute since 2005. Among other variables, it contains information on total employment, sales, wage bill, capital stock, value added, date of constitution, industry code and location. Using unique firm identifiers, we have linked the FTS and EIAS data sets for the years 2005 to 2009. 5 We have further used FTS data spanning the period 1990-2009 to compute exportage and export-destination-age. In each year, these variables are defined, respectively, as the number of consecutive years the firm has been an exporter in any market or an exporter in a particular export destination. 6 As is customary in the empirical trade literature, we restrict the analysis to firms whose main activity is in the manufacturing sector excluding the Petroleum industry. We impose these restrictions using the firm's selfreported industry code in the EIAS data set, where sectors are defined by the Revision 2.1 of the National Classification of Economic Activities (CAE). 7 All nominal variables are expressed in 2005 euros, using the GDP deflator of Portugal. Table A1 in the Appendix reports summary statistics. In line with evidence for several other countries (Bernard et al., 2007), we observe that exporters tend to be larger, older, more productive, more capital intensive and pay higher wages than non-exporters. The average exporter in the period 2005-2009 obtained 3.45 million euros of export proceeds, served 5.4 destinations and exported in 8.4 different product categories. Exporting firms sourced on average 2.23 million euros from other nations, distributed by a mean of 14.2 product categories and 3.5 different countries. The average exporter in the sample has 8.3 5 In both the FTS and EIAS, firms are uniquely identified by their tax identification number (NPC). For statistical confidentiality reasons, the data made available to researchers contains anonymized unique identifiers (a transformation of the real NPC that has a one-to-one mapping to the real one). Hence the mapping of the two data sets was straightforward.
6 Since our measures of export experience are computed from trade-transactions data spanning the period 1990-2009, they are truncated at the difference between the reference year and 1990 (and hence are bounded by the upper limit of 20 years). 7 Firms reporting their main activity to be in the manufacturing sector account for about 82.4% of total exports in the FTS data set for 2005-2009. years of experience in external markets (4.9 years of experienced by individual destination).

Stylized facts
In this section we provide a comprehensive analysis of the evolution of firm performance over the life cycle. While the key novel stylized facts we document refer to the joint evolution of performance and prices in international markets, we place these patterns in the context of broader evidence on the dynamics of firm size. This makes it possible to compare key patterns in our data with those reported in the existing empirical literature, and thereby provide an integrated analysis of firm dynamics in both the domestic and external markets.

Firm performance across cohorts
We begin by examining the relationship between firm performance and age in the crosssection. When examining measures of firm size, we consider the age of the firm. When analyzing export revenue, we consider export-age, defined as the number of consecutive years the firm has been an exporter. Figure 1 depicts the firm size and export revenue distributions of various cohorts of firms and exporters, based on data for 2005. 8 As in Cabral and Mata (2003) and Angelini and Generale (2008), we use nonparametric estimation methods, notably a kernel density smoother. These methods offer a convenient way of estimating the density of the distribution without imposing much structure on the data. 9 The patterns displayed in the top and middle panels of Figure 1 are well in line with those reported by Cabral and Mata (2003): as firms get older, the size distribution shifts progressively to the right. The diagram reported in the lower panel of this figure focuses solely on exporting firms, and shows that the distribution of export revenue by export-age. As we look at more experienced exporters, the distribution of export revenue shifts systematically to the right.
Inspection of Figure 1 points to a clear relationship between firm performance and age, and between export revenue and export-age. We examine this issue further by estimating an equation of the form: where y it is a measure of size or export performance of firm i in year t, age it is either the number of years passed since birth of the firm or the number of consecutive years the firm has been an exporter in year t, λ kt is an industry-year fixed-effect, η r is a region 8 A cohort is defined as the group of firms for which the corresponding age measure in 2005 lied between between 1-5 years, 6-10 years, and so on. Results for each of the other years in the sample are similar, and are available upon request. 9 As in Angelini and Generale (2008) we use a bandwidth of 0.7. Estimation with alternative bandwidths leads to qualitatively similar results. fixed-effect, and ε ikrt a random term. Industry-year and region dummies are included to account for possible systematic relationships between firm age and industry affiliation or region. Table 1 reports the corresponding results. The point estimates clearly corroborate the visual evidence. The estimates in columns (1)-(2) reveal that, among all manufacturing firms, a 10% increase in firm age is associated with a rise of 4.5% in total employment and 5.8% in total sales. Columns (3)-(4) show that these relationships remain fairly similar when restricting the focus to exporters. Finally, the estimates in columns (5)-(7) reveal that export revenue increases systematically with the length of activity in export markets: the estimates in column (5) indicate that when export-age increases by 10%, export revenue increases by 15.9%, on average; those in column (7) reveal that if export-destination-age increases by 10%, export revenue in that market rises by 11.3% on average in that same destination.

Prices, quantities and export experience
To gain insight about the mechanisms underlying the evolution of export performance over the life cycle, we proceed by examining heterogeneity of prices and physical quantities of exported goods and imported inputs, within narrow product categories, across cohorts of exporters. We run regressions of the form: where z ipjt is the export price charged (or physical quantity sold) by firm i in the productdestination pair pj in year t. We run similar regressions where the dependent variable is the import price paid (or physical quantity purchased) by firm i in the product-source pair pj in year t. Finally, we run regressions with average labor earnings at the firm-level, where subscript pj is not relevant. We use two different measures of age in export markets. Our preferred measure, log export-destination-age, is the log of the number of consecutive years the firm has been serving market j in year t. We also report results using the number of consecutive years the firm has been an exporter (in any market) in year t, log export-age. The terms ψ pjt , λ k and η r are fixed-effects by product-destination-year (product-source-year), industry and region, respectively. Table 2 reports the point estimates from (2), for both prices and quantities of exported products within narrow product categories. The estimates reported in columns (1) and (2) reveal that the relationship between export prices charged by firms and the export experience in that market is positive but not statistically significant. The estimates in columns (3) and (4) show that export volumes increase systematically with export-experience. Figure 2 complements this evidence with a visual representation of these relationships for the various points of the distribution of residuals of the corresponding regressions, using a local polynomial smoother. An inspection of these diagrams confirms that the point estimates yielded by the regression analysis provide a good representation of the relationship observed along the corresponding distributions.
We proceed by examining the behavior of inputs prices, in particular average wages and imported input prices, across cohorts of exporters. The results in column (1) of Table  3 confirm the well-known result that older manufacturing firms tend to pay higher wages on average (Brown and Medoff, 2003). Interestingly, the results in columns (2) and (3) show that a similar relationship holds among exporters: firms with longer spells of export activity tend to pay higher wages, on average.
In Table 4 we examine the relationship between export-age and imported inputs prices and quantities. The results in this table reveal that more experienced exporters tend to purchase larger quantities of inputs at higher prices. Like for export prices, Figure 3 provides a visual representation of these relationships, which confirm the conclusions from the regressions.
For robustness, in Appendix D we examine the extent to which our price and quantity results are sensitive to the choice of the sample period. As we noted above, the EIAS data are only available for the period 2005-2009, whereas the FTS data are available since 1990. In the main analysis, we chose to restrict the focus to the period for which we have complete information, using the the 1990-2004 data only to compute measures of export experience. Tables A2 and A3 in the Appendix report similar results using FTS price and quantity data for 1996-2009, leaving a shorter time interval (1990)(1991)(1992)(1993)(1994)(1995) solely to compute measures of export experience. Reassuringly, the results reported in these tables reveal that our results are quite robust. The only qualitative difference is that the positive association between export experience and export prices is now more precisely estimated. 10

Growth versus selection on initial size
In the analysis above, we characterized the evolution of firm size and export performance over the life cycle using cross-sectional data. A potential explanation for the observed heterogeneity in performance across cohorts is selection on initial conditions. If firms that are initially larger or obtain more revenue when they start serving foreign markets are more likely to survive, older firms and more experienced exporters will naturally be larger and have stronger export performance even in the absence of systematic growth patterns over the life cycle.
Following Cabral and Mata (2003) we first evaluate the empirical relevance of this mechanism by identifying the universe of entrants in 2005 and tracking their performance until 2009. We then perform a similar exercise for the universe of new exporters in 2005 and following them in export markets until 2009. From the 1,268 manufacturing firms that were born in 2005, 948 were still operating in 2009. The upper and middle panel of Figure 4 depicts the distributions of log employment and log sales of these two sets of firms in 2005, as well the 2009 distributions for survivors. Inspection of this figure reveals that the distribution of survivors in 2009 is clearly to the right of that of the universe of entrants in 2005. If selection based on initial size (exit of initially smaller firms) were to explain this evolution, the firm size distribution (FSD) of survivors in 2005 would be expected to be shifted to the right compared to the overall distribution of entrants in 2005. By contrast, if differential growth of initially similar firms were to explain this evolution, the initial FSD of survivors would be expected to resemble that of the universe of entrants in 2005. Inspection of Figure 4 shows that firm growth, as opposed to selection based on initial size, is the main driver of the evolution of performance over the life cycle.
The lower panel of Figure

Growth, size and age
We further characterize the growth process described above by examining the relationship between firm growth and age. We first examine if and how firm growth is systematically related with age, even when controlling for size. Following the literature (Evans, 1987;Sutton, 1997;Haltiwanger, Jarmin, and Miranda, 2013) we estimate a regression of the form: log where y it denotes employment or sales by firm i in year t, y it−1 represents the same variable in the previous year, and age denotes the age of the firm in t − 1. The results in Table 5 confirm the well-known result that firm growth declines with age, even when controlling for size. This finding holds irrespective of whether firm size is measured by employment or sales. We then perform a similar analysis for growth of export revenue, both overall and within individual destinations. In this case we use export-age or export-destination-age as the measure of experience in export markets: The results are reported in Table 6 and suggest once again that export growth declines with export experience. This relationship holds both for total exports and exports in individual destinations, and prevail when controlling for initial export size. As emphasized by Arkolakis, Papageorgiou, and Timoshenko (2015) this feature of the data cannot be explained by models of random productivity evolution, but can be matched by models of learning about unobserved demand. 12

The model
In this section we develop a learning model with quality choice to jointly explain the evolution of firm growth rates, and input and output prices over the firm life cycle. To capture the conditional age-dependence of growth rates documented in section 3.4 we consider a model of learning by Arkolakis, Papageorgiou, and Timoshenko (2015). To explain the pricing patterns documented in section 3.2, we introduce input and output quality choice as in Kugler and Verhoogen (2012).

Set-up
Time is discrete and is denoted by t. There are N countries. Each country j is populated by L j identical infinitely-lived consumers. There are two sectors in each economy: a finalgoods sector and an intermediate-inputs sector. The final-goods sector is populated by a mass of monopolistically competitive firms. Those firms supply horizontally differentiated varieties of various qualities. The intermediate-inputs sector is perfectly competitive and uses a constant-returns-to-scale production technology. Every period there exists an exogenous mass of entrants J j . There are no sunk costs of entry.

Consumers
Consumer preferences in country j over the consumption of the composite final good are described by the expected utility function U j given by where β is the discount factor and Q jt is the consumption of the composite final good. Q jt is given by where q jt (ω) is the consumption of variety ω in the final-goods sector, Ω ijt is the total set of varieties in the final-goods sector sold in country j originating from country i, and σ is the elasticity of substitution across varieties.
Each variety ω is subject to two sources of demand heterogeneity. First, as in Kugler and Verhoogen (2012), λ jt (ω) is the quality of variety ω in country j at time t. λ jt (ω) captures characteristics of variety ω which are chosen by a firm. If chosen, those characteristics increase the utility of a consumer. λ jt (ω) is known to both consumers and firms.
Second, as in Arkolakis, Papageorgiou, and Timoshenko (2015), a jt (ω) is the demand shock for variety ω in country j at time t. The demand shock captures inherent variation in preferences across varieties irrespective of the varieties' quality. The demand shock is given by where θ is the time-invariant component of the shock, a product "appeal" index. The appeal index is subject to the transient preference shocks jt (ω) which are i.i.d. N ∼ (0, σ 2 ). In contrast to quality, the demand shock is known to consumers, but not to firms.
Each consumer is endowed with a unit of labor which he inelastically supplies to the market, and owns a share of profits of domestic monopolistically-competitive firms. Given their income, consumers minimize the cost of acquiring the aggregate consumption bundle yielding the demand for variety ω given by where p jt (ω) is the price of variety ω, P jt is the aggregate price index, and Y jt is the aggregate spending level in country j at time t. The aggregate price index is given by (6)

Intermediate inputs sector
The intermediate inputs sector is characterized by perfect competition and a constantreturn-to-scale production technology. The sector uses labor l to produce intermediate inputs of varying quality c: production of x units of an intermediate input of quality c requires cx units of labor. Notice that such production technology implies that production of higher-quality inputs requires more labor resources. The profit of a firm producing an intermediate input of quality c is given by where w jt is the wage rate and p c jt (c) is the price of an intermediate input of quality c in country j at time t. Perfect competition leads to zero profit yielding to the price of an intermediate input equal to its marginal cost:

Final goods sector
The final goods sector consists of a continuum of monopolistically competitive firms.

Production technology
Each firm produces one good which it can supply to multiple markets in varying qualities. The production of q physical units of the final good requires x = q ϕ units of an intermediate input, where ϕ is the productivity level of the firm.
The productivity parameter ϕ is drawn from a Pareto distribution with the shape parameter ξ and the scale parameter ϕ min and is known to the firm since entry. 13 In this set-up, the productivity parameter ϕ measures the efficiency with which the firm can convert units of an intermediate input into units of the final good. A more productive firm can produce the same quantity of output with less units of an input, irrespective of the quality of the intermediate input used.
The quality of an intermediate input, however, is intimately linked to the quality of the final good: an intermediate input of quality c delivers the final good of quality λ = c γ . In addition to the quality of an intermediate input, the production of λ units of quality of the final good requires incurring f λ = λ 1 α quality-upgrading costs (measured in the units of labor), where α ≥ 0. The quality-upgrading costs f λ can be interpreted as an investment in R&D or product design necessary to deliver outputs of higher quality. With this interpretation, α measures the effectiveness of such spending: an increase in α requires incurring less costs to deliver the same level of output quality. 14 13 The probability density of Pareto distribution is given by ξϕ ξ min /ϕ ξ+1 . 14 The assumed production technology for the quality of the final good corresponds to the Kugler and Verhoogen (2012) fixed-cost-of-upgrading Leontief production function which can equivalently be written as λ = min{(f λ ) α , c γ }. The parameter α can therefore be interpreted as the scope for quality differentiation. If the value of α is low, it would be expensive for firms to upgrade quality, and hence the equilibrium will exhibit little variation in the quality of intermediate and final foods. By contrast, if the value of α is high, quality upgrading is relatively inexpensive and the equilibrium will exhibit large heterogeneity in product quality.
Finally, selling to market j from market i requires incurring a fixed overhead production cost f ij and an iceberg transportation cost τ ij , all measured in units of labor.

Belief updating
The profitability of a firm in market j depends on the firm's appeal index θ j . The firm never observes its product-appeal index in a given market and must make all of its decisions based on beliefs about θ j .
The prior belief about θ j is given by the initial distribution from which the appeal index is drawn, N (θ, σ 2 θ ). The posterior belief is given by the normal distribution with mean µ nj (ā j , n) and variance υ 2 n , where n is the number of demand shocks a jt (θ j ) that the firm has observed prior to making a current decision andā j is the mean of those observed demand shocks. 15 We assume that a firm observes one shock per period, hence we also interpret n as a firm's age. In the limit, as n → ∞, the posterior distribution converges to a degenerate distribution centered at θ j .
The static problem of a firm At the start of each period, a firm from country i decides on whether to sell to market j or not, and, conditional on selling to market j, the firm chooses the quantity q ijt and the quality λ ijt of its final good to be sold to market j, and the quantity x ijt and the quality c ijt of its intermediate input to maximize per-period expected profit. The problem of the firm is given by subject to the following five constraints We close the model in a standard way as described in Timoshenko (2015b) and Arkolakis, Papageorgiou, and Timoshenko (2015). The details are outlined in Appendix E.

Properties of the solution
In this section we examine properties of the stationary equilibrium and demonstrate how learning about demand affects the quality choice of inputs, the quality of the final good, 15 As proven in DeGroot (2004), µ nj = σ 2 σ 2 +nσ 2 θθ + nσ 2 θ σ 2 +nσ 2 θā j and υ 2 n = σ 2 σ 2 θ σ 2 +nσ 2 θ . and the evolution of prices and quantities of inputs and outputs. From the static problem of a firm (8), the optimal quality of an intermediate input c ij is given by where b j (ā j , n) = E a jt |ā j ,n e a jt σ is the expected demand level. 16 Proposition 1 establishes four properties of the input quality choice.
Proposition 1 Properties of the quality of intermediate inputs. Provided , and is declining in n otherwise.
The proofs to all Propositions are included in Appendix G. Proposition 1 states that, provided the investment in quality upgrading is sufficiently effective, i.e. α is low enough, firms will chose higher quality of intermediate inputs and thus supply final goods of higher quality (by equation (13)) to larger markets. Similarly, by part (b) of Proposition 1, more productive firms will chose higher quality of an intermediate input and thus the final output.
While parts (a) and (b) of Proposition 1 are known from Kugler and Verhoogen (2012), parts (c) and (d) are novel to the literature and describe how quality choice varies within firms over time. Part (c) states that quality choice is intimately related to a firm's idiosyncratic expected demand level. Conditional on the aggregate market size Y j , firms with higher expected demand b j will choose higher quality inputs and thus will supply higher-quality outputs.
More important, however, is that a firm's expected demand varies over time. As firms learn, they update their beliefs. Thus, firms will upgrade product quality if expected demand is growing, and downgrade quality if expected demand is shrinking, potentially leading to an exit from a market.
As stated in part (d) of Proposition 1, provided that the expected true appeal index a j is high enough, the quality of intermediate inputs will rise with a firm's age n. The intuition is straightforward. Every firm starts with the same priorθ regarding its true appeal index. If the realized posteriorā j is greater than the prior (more specifically greater thanθ + σ 2 θ /(2σ)), a firm will grow in its expected demand b j . This growth will lead to the improvement in the good's quality and ultimately to an increase in sales. 17 In contrast, firms which overestimated their demand and discover that their true appeal index is below the prior,ā j <θ + σ 2 θ /(2σ) to be precise, gradually adjust their expected demand downwards and shrink in size. Hence, the quality of intermediate inputs of shrinking firms will decline over time.
The data available to us are not sufficient to explicitly measure product quality or demand and test predictions in Proposition 1. We can however examine the model's implications for the behavior of input and output prices. From equation (10) Table 4 and Figure 3. The price of the final good charged by a firm is given by Proposition 2 below establishes properties of the final-goods prices.
Proposition 2 below establishes properties of the final-goods prices.
Similarly to Kugler and Verhoogen (2012), parts (a) and (b) of Proposition 2 state that more profitable firms (as measured by either high productivity or high demand expectations) charge higher prices for their outputs if the scope for quality differentiation is high enough. 18 Parts (c) and (d) of Proposition 2 indicate that, in contrast with input prices, the behavior of output prices depends on parameter configuration. Part (c) of Proposition 2 states that if α is high enough, α > γ σ+(γ−1)(σ−1) to be precise, output prices will increase with age for growing firms. As discussed above, a growing firm is the firm which underestimated its true appeal index and learned that the mean of the observed demand shocksā j is greater than the prior. Similarly, shrinking firms, i.e whenā j <θ + σ 2 θ 2σ , output prices will decline with age. In contrast, part (d) of Proposition 2 states that when α is below the threshold value of γ σ+(γ−1)(σ−1) , output prices will decline with age for growing firms, and increase with age for shrinking firms.
Another way to understand the intuition behind the ambiguity in the final goods pricing behavior is to consider the trade-off between the effect of quality upgrading versus the increase in profitability on prices. In the context of equation (16), suppose that a firm keeps the quality of an intermediate input unchanged. In this case, the price dynamics are solely driven by changes in demand beliefs, b j . Since demand beliefs enter multiplicatively with productivity into prices, revenues, and profits, the effect of an increase in beliefs is equivalent to an increase in productivity, or an increase in profitability, or a decline in marginal cost. Since price is a mark-up over marginal cost, more profitable firms (either due to falling costs or rising expected demand) will charge lower prices over time. The quality of an intermediate input (hence output) either does not vary or increases by an amount which is insufficient to compensate for falling marginal cost. In the model, the extent of quality adjustment is governed by α. For low values of α, high fixed costs of quality adjustment f λ deter firms from varying the quality of intermediate inputs. As a result, prices decline over time as firms age.
When quality upgrading is cheap (α is high), an increase in demand beliefs is accompanied by a corresponding increase in the quality of an intermediate input (equation (14)). If the quality of an intermediate input increases by more than one-to-one with respect to beliefs, the price of the final good increases. This occurs exactly when α > γ/(σ + (γ − 1)(σ − 1)).
In line with the behavior of quantities as a function of a firm's age depicted in Figure  2, Proposition 3 establishes the behavior of the optimal quantity of the final good given by Proposition 3 Property of the final-goods quantities. Provided α < γ (γ−1)(σ−1) , γ > 1 and all else equal, forā j >θ + σ 2 θ 2σ , q ijt is increasing in n if α < γ, and is declining in n otherwise.
From equation (11), the quantity of an intermediate input x ijt is linear in the quantity of the final good. Hence, consistently with the data presented in Table 4 and Figure 3, the model also delivers input quantities increasing with the export age of a firm. Notice that, as discussed in Appendix F, the solution to a firm's problem only exists when α < γ (γ−1)(σ−1) . Hence, the model always delivers optimal quantity increasing with age as suggested by Figure 2, as long as (γ − 1) (σ − 1) > 1. In the next section, we turn to the quantitative analysis of the model and show that the calibrated parameter values satisfy this restriction. Hence, the quantitative exercise will demonstrate that the model is able to deliver the behavior of input prices and quantities suggested by the data.

Quantitative analysis
In this section we calibrate a symmetric two-country model to match the average domestic and export behavior of Portuguese firms over the period 2005-2009, and next explore the quantitative ability of the model to predict the data.

Parameter identification
Three parameters of the model can be pinned down independently. The discount factor β is taken to be 0.9606 which corresponds to a quarterly interest rate of 1 percent. As estimated by Amador and Soares (2014) in the context of the Portuguese economy, the elasticity of substitution σ is taken to be 6.16. The exogenous death rate δ is taken to be 2.98%, which corresponds to the average death rate of Portuguese firms in the top 5 percent of the export revenue distribution. 19 Following the argument in Arkolakis, Papageorgiou, and Timoshenko (2015), the standard deviation of the transient preference shocks, σ θ , is identified by the extent of the conditional age dependence of firms' growth rates. Specifically, we target the age coefficient in a regression of the log of export revenue growth on export-age and size, as reported in Table 6, column (6). All else equal, the larger is the standard deviation, the more dispersion there is in the observed distribution of export revenue. The magnitude of σ relative to the standard deviation of the "appeal" index draw, σ θ , determines the rate at which firms update their beliefs, and thus the rate at which firms grow. The higher is the variance of the appeal relative to the variance of the shock, the more weight firms attribute towards updating their beliefs in favor of the posterior mean of the observed demand shocks, the faster they grow. Thus, σ is pinned down by the average growth rate of exporter-entrants.
The two parameters governing the quality production function, α and γ, are pinned down by the export-age coefficient in the input price regression in Table 4, and the share of sales from export entrants. From equation (33), parameter α directly governs the extent of the age dependence of the quality of intermediate inputs, hence prices of intermediate inputs. From equation (13), parameter γ governs the rate at which the quality of intermediate inputs translates into the quality of the final good and thus total sales. Given the selection of incumbents based on higher productivity or expected demand (hence quality), the size of an export-entrant relative to an average firm declines in γ, and hence the share of export sales accounted for by entrants declines.
Finally, the shape parameter of the Pareto distribution of productivity draws, ξ, is identified by the tail index of the export revenue distribution of exporting firms, and the fixed cost of selling in the export market, f x , is identified by the average revenue of exporters. All else equal, the higher are the fixed costs, the higher is the productivity entry threshold. As a result, more productive exporting firms earn larger revenues yielding higher average sales of exporters. The six parameters, σ , σ θ , α, γ, ξ, and f x are jointly calibrated to minimize the sum of the squared deviations of the simulated versus the data moments.
Having calibrated these parameters, the variable trade cost τ is computed to yield the proportion of exporters in the Portuguese data (16.7%). The fixed cost of selling in the domestic market, f d , is computed to yield the ratio of average domestic sales of firms to average export sales of exporters, which is equal to 0.35. Table 7 displays the simulated and data moments and Table 8 reports the corresponding calibrated parameter values. As can be seen from Table 7, the moments identify parameters fairly well with the criterion equal to 0.00004. Figure 5 replicates the results in Figure 3 using simulated data, and depicts estimates of a local polynomial smoother relating the log of export-age and the log of import price (Panel A) or the log of import quantity (Panel B). As expected, import prices tend to increase with export-age, since this relation was a targeted moment in the calibration. In contrast, the calibration did not target the relationship between import quantity and export-age. As can be seen from Panel B of Figure 5, the model delivers a quantity behavior that is also consistent with the data.

Calibration results
The model is calibrated to match the conditional age-dependence of growth rates and input prices. Table 9 reports the growth regression results based on the simulated data. Comparison of the size coefficients in Tables 6 and 9 reveals that the model slightly overpredicts the extent of the conditional size dependence of growth rates. The less strong size-dependence of growth observed in the data may arise due to alternative mechanisms considered in the literature such as financial constraints (Cooley and Quadrini, 2001) or random productivity evolution (Arkolakis, 2015).

Counterfactual experiments
In this section we use the calibrated two-country model to explore the implications of imposing minimum quality standards on exported goods. Due to the quality standard, any exporting firm in each country must choose the quality of intermediate inputs above a given thresholdc. 20 The corresponding problem of the firm is described in Appendix H, and Figure 6 describes the effect on the general equilibrium variables. In all panels of Figure 6, the horizontal axis measures the percent improvement in the average quality of exported goods that results from the imposition of a given minimum quality requirement. All depicted values on the vertical axis are normalized by their corresponding values in the calibrated non-constrained equilibrium. 21 As is evident from Panel A of Figure 6, a quality standard is not welfare improving. For example, a minimum standard leading to 25 percent improvement in the average quality of exported goods reduces real consumption by 2 percent. The intuition for the result is as follows. As can be seen from Panel C, the export-quality standard increases the productivity threshold for entry in the export market and thus reduces the number of exporters (Panel D). The decline in the number of exporters reduces the degree of competition in the domestic market, leading to a higher equilibrium price level (Panel B). Furthermore, the decline in foreign competition leads to entry of less efficient firms in the domestic market: as can be observed in Panels C and D, the domestic entry threshold declines and the mass of domestic varieties rises. At the extensive margin, therefore, the effect of the minimum quality standard on exports is qualitatively equivalent to an increase in the iceberg transportation cost τ , which also leads to a reduction in the number of exporters, an increase in the number of domestic varieties, and an increase in the price level (Melitz, 2003). Our model is therefore able to match recent evidence indicating that standards reduce entry in export markets and lead to an increase in product prices, especially among small exporters (Fontagné et al., 2015).
The quality standard additionally distorts the intensive margin of firm adjustment. For the firms located close to the entry threshold, i.e. either small or young firms, the quality constraint binds. Hence, in order to export, these firms are forced to comply with the standard and, as a result, choose higher quality intermediate inputs. The production of higher quality intermediate inputs requires more labor. Hence, the imposition of the minimum quality standard leads to the reallocation of resources among exporters towards young and small firms. This effect is demonstrated in Figure 7. Panel A and B depict the proportion of labor employed in the production of exports allocated between the bottom 10 and top 10 percent of exporters in the export-sales distribution (including the units of labor embodied in the intermediate inputs purchased by these firms). In Panel A, we observe that as the minimum quality standard increases, the proportion of labor accounted 20 Bown and Crowley (forthcoming) provide several examples of product standards imposed in practice, and note that it is typical for foreign suppliers to allege that such standards are either too restrictive or applied in way that discriminates against foreign relative to domestic production, potentially forcing them to undertake additional costly investments to meet compliance requirements. Fontagné et al. (2015) offer a detailed empirical treatment of restrictive Sanitary and Phyto-Sanitary (SPS) standards on imports, and note that such standards may require exporting firms to upgrade their products or substitute more costly inputs from those previously used. 21 Naturally, a stronger improvement in the average quality of exported goods corresponds to a higher minimum quality constraint on intermediate inputs embodied in exports.
for by the bottom 10 percent of exporters rises from about 0.8 to 1.2 percent. In contrast, the share of labor among top 10 percent of exporters declines from around 63 to 60 percent. In a similar way, Panels C and D show that there is a reallocation of labor units from old to young exporters.
Finally, as can be seen in Panel E of Figure 6, while the policy raises export quality it leads at best to a small improvement in the overall quality of goods available to consumers. For example, a standard leading to an increase in the quality of exported goods by about 8 percent raises the overall quality of goods available to consumers by less than one percent. Thus, consumers face higher prices and experience almost no difference in the quality of goods available to them. This effect is primarily driven by the rapid decline in the number of exporters relative to domestic firms. Although export quality rises, the proportion of exporting firms declines much faster (as seen in Panel D) yielding a small contribution of higher export quality to the overall quality of goods available to consumers. The latter effect may even dominate: a standard leading to a relatively large improvement in the average quality of exported goods (over 16 percent) leads to a decline in the overall quality of goods available to consumers.

Conclusion
We used detailed micro data from the Portuguese manufacturing sector to document new facts about the joint evolution of firm performance and prices over the life cycle: (1) within narrow product categories, firms with longer spells of activity in a destination tend to export larger quantities at similar prices to that market; and (2) older or more experienced exporters tend to import more expensive inputs. In line with previous research, we also reported evidence that the positive relationship between export revenue and market experience reflects growth, not just market selection based on initial size; and that revenue growth within destinations (conditional on initial size) tends to decline with export-age.
To account for the joint observation of these patterns in the data, we developed a theory of endogenous input and output quality choices in a learning environment. In the model, firms supply products of varying quality based on their beliefs about idiosyncratic expected demand. Through the life-cycle, an average surviving firm updates its demand expectations upwards, grows, and, as a result, finds it optimal to upgrade the quality of outputs, which requires using higher quality inputs. Because higher quality inputs are more expensive, average input prices increase with export experience. The evolution of output prices is less clear-cut. On the one hand, quality upgrading leads to a higher price. On the other hand, an increase in demand expectations increases profitability and causes a price reduction. Hence the model is able to rationalize the varying behavior of input and output prices over the firm life cycle observed in the data.
Calibrated to match the observed age-dependence of export growth and input prices, our model slightly over predicts the conditional size-dependence of growth rates that emerges from the data, and correctly predicts that the quantity of inputs increases with export-age. Using the calibrated model, we examined the implications of regulations imposing minimum product quality standards on exports. We found that the imposition of these standards reduces welfare through two distinct channels. First, it lowers entry in export markets and therefore the number of export varieties available to consumers. Second, it distorts an intensive margin of adjustment. To participate in the export market, marginal exporters are forced to comply with the minimum standard by choosing intermediate inputs of higher quality. This choice leads to a reallocation of productive resources from large and old towards small and young firms, leading to a further decline in welfare. Schott, Peter. 2004. "Across-product versus within-product specialization in international trade." Quarterly Journal of Economics 119 (2) (5) the dependent variable is the log of total export revenue of the firm in all destinations. In columns (6) and (7) the dependent variable is the log of export revenue by destination. Robust standard errors in brackets, clustered by firm-year. ***1% level, **5% level, *10% level.
Notes: In columns (1) and (2) the dependent variable is the log of export unit values by firm-product-destination. In columns (3) and (4) the dependent variable is the log of export quantities by firm-product-destination. Robust standard errors in brackets, clustered by firm-year. ***1% level, **5% level, *10% level.
Notes: In columns (1) and (2) the dependent variable is the log of import unit values by firmproduct-source country. In columns (3) and (4) the dependent variable is the log of import quantities by firm-product-destination. Mean export-destination-age is defined as the average of export-destination-age across destinations within firm-year cells. Robust standard errors in brackets, clustered by firm-year. ***1% level, **5% level, *10% level. (1) (3) (5)  (1) (3) 1. The mean of the logarithm of export sales 11.96 11.96 2. The growth rate of export entrants 31.08% 30.99% 3. The share of sales from export entrants 1.42% 1.42% 4. The age coefficient in the input price regression a 0.025 0.025 5. The age coefficient in the exports growth regression b -0.023 -0.023 6. The tail index of the export sales distribution c -1.  Table 4, column (1).
b Source: The age coefficient in Table 6, column (3).
c Source: The empirical estimate of the tail index is presented in Appendix I.  Notes: The figure depicts non-parametric estimates from a kernel density smoother with bandwidth 0.7, using data from 2005. Age is the number of years since birth of the firm. Export-age is the number of consecutive years the firm has recorded positive export revenue.    Notes: Panel A display estimates of a local polynomial smoother relating log input prices and log exportage using simulated data. Panel B depicts estimates of a local polynomial smoother relating log input quantity and log export-age using simulated data. The shaded areas corresponds to the 95% confidence interval.  Import prices: Ratio between the FOB euro value of an import flow (by firm-productsource) and its weight measured in kilograms; Import quantities: Weight in kilograms of an import flow (by firm-product-source); All monetary variables are in euros and have been deflated to constant 2005 prices using the Portuguese GDP deflator from the World Development Indicators of the World Bank.

B Data description and processing
The data used in this paper come from the Enterprise Integrated Accounts System (EIAS) and the Foreign Trade Statistics (FTS) of Portugal. The EIAS is an annual census of firms that is available for the years 2005 to 2009. We use this data set to obtain information on the number of employees, date of constitution, wage bill, capital stock, value-added, total sales, location and industry affiliation for each firm-year. We restrict the analysis to firms whose main activity is in the manufacturing sector excluding the Petroleum industry. We impose these restrictions using the firm's self-reported industry code in the EIAS data set, where industries are defined by the Revision 2.1 of the National Classification of Economic Activities (CAE). There are 99 manufacturing industry codes (3-dig level, excluding the petroleum industry) and 7 different regions, based on which we define the categorical variables included in the regressions.
The FTS are the country's official information source on international trade statistics, gathering export and import transactions (values and physical quantities) of firms located in Portugal by product category (CN classification, 8-dig) and destination or source market. These data are available from 1990 to 2009. Two firms exporting or importing in the same 8-dig CN product category may belong to different 3-dig CAE industries. We use the FTS data on values and quantities to construct export prices by firm-product-destination, and import prices by firm-product-source. From this data set, we further obtain total exports and imports of the firm in each year, and the variables export-age and exportdestination-age.
In line with Kugler and Verhoogen (2012) and Hallak and Sivadasan (2013), we implemented a number of cleaning procedures to the raw data in order to reduce the influence of measurement error and outliers: 1. In the firm-level files, we excluded all firm-year observations for which the values of sales, employment or labor costs were missing or equal to zero; 2. In the firm-level files, we excluded observations for which the value of a key variable (employment, sales, wages or export revenue) differed by more than a factor of 5 from the previous year; 3. In the firm-product-destination (firm-product-source) files, we dropped observations with missing information on values (defined in euros) or quantity (measured in kilograms). We then winsorized export (import) prices and quantities by 1% on both tails of the distribution (within each product-year cell).
The results are robust to using different bounds for the winsorizing procedure (including no winsorizing) and exclusion of outliers. They also do not depend on the inclusion of observations from firms with missing values in a subset of key variables.

D Robustness: Stylized facts, 1996-2009
This sections report results analogous to those presented in Tables 2, 4, and 6 of the main text, using data for a longer time period: 1996-2009. In this case, the trade data for the period 1990-1995 are solely used for computing the variables export-age and exportdestination-age.

Entry and Exit Decisions
Following Timoshenko (2015b), given the per-period optimal expected profit Eπ ijt (ϕ,ā j , n), a incumbent firm decides whether to continue selling to market j from market i by maximizing the expected present discounted value of the future profit stream. Denote by V ijt (ϕ,ā j , n) the continuation value of the option to export from country i to j. V ijt (ϕ,ā j , n) solves the following Bellman equation where δ is the exogenous death rate of firms. The solution to problem (18) yields a set of market-participation thresholdsā * ij (ϕ, n) such that a firm decides to continue exporting to market j ifā j ≥ā * ij (ϕ, n), and exits the market otherwise.
A new entrant draws its productivity ϕ from a Pareto distribution and decides whether to sell to a given market by maximizing the value of entry given by V E ijt (ϕ, 0, 0) = Eπ ijt (ϕ, 0, 0) + β(1 − δ)Eā j |ā j ,1 V ijt+1 (ϕ,ā j , 1). Since there are no sunk market entry costs, the entry productivity threshold ϕ * ij from market i to market j is determined by equating the value of entry to zero.

General equilibrium
The stationary general equilibrium of the model is given by the market participation thresholds ϕ * ij andā j ≥ā * ij (ϕ, n); the factor and goods prices w j , p ij (ϕ, b j ) and p c j (c); firm's optimal quantity and quality choices q ij (ϕ, b j ), x ij (ϕ, b j ), c ij (ϕ, b j ) and λ ij (ϕ, b j ); consumers' optimal consumption choice q c j (ω); the aggregate price index P j ; the aggregate expenditure level Y j ; the mass of firms selling from country i to j M ij , and the probability mass function of firms m ij (ϕ,ā j , n) such that 1. Given the equilibrium values, consumers maximize utility: q c j (ω) maximizes utility in (5).

Given the equilibrium values, firms in the intermediate-goods sector break even:
p c j (c) satisfies equation (7).

Trade is balanced:
6. The aggregate behavior is consistent with the individual behavior: equilibrium prices satisfy equation (6) and M ij = n m ij (ϕ,ā j , n)dϕdā j .

F Firm's static maximization problem
A firm's maximization problem is given by Using equations (29), (30) and (31), sales can be written as To ensure that the optimal c ijt given by equation (29) maximizes the profit function in (25), we need to verify that ∂ 2 Eπ ijt ∂c 2 ijt ≤ 0 at the found optimum. This condition is satisfied whenever α < γ (γ−1)(σ−1) .

G Proofs of Propositions
Proof of Proposition 1 Parts (a)-(c): Notice from equation (14) that the sign of the partial derivative of c ij with respect to either Y j , or ϕ, or b j depends on the sign of the exponent 1 γ α −(γ−1)(σ−1) . The exponent is positive if and only if α < γ (γ−1)(σ−1) .
Proof of Proposition 2. Part (a) and (b): Substitute equation (14) into (16)  Thus, the price is increasing in productivity ϕ when The price is increasing in expected demand b σ j when .

Part (c):
The derivative of p ijt with respect to n is given by ∂p ijt ∂n = p ijt 1 the minimum-quality policy. If (ϕ,ā j , n) are such that inequality (35) does not hold, the problem of the firm becomes Eπ ijt (ϕ,ā j , n) = max The first order conditions with respect to q ijt yield The resulting price charged by a firm is then given by p ijt (c) = σ σ − 1 e a jt σc w it τ ij ϕb j .
Thus, surviving firms with (ϕ,ā j , n) such that inequality (35) does not hold (the constrained firms), will choose a suboptimal quality level given byc > c ijt yielding a higher price compared to the unconstrained equilibrium.

I Estimation of the tail index
To estimate the tail index of the distribution of export sales we use a method proposed by Gabaix and Ibragimov (2011). We estimate the tail index among exporters in the top 5 percent of export sales distribution for each year between 2005 and 2009 and target the average value in the calibration. The estimates are presented in Table A5.   Table 2 for the period 1996-2009.
In columns (1) and (2) the dependent variable is the log of export unit values by firmproduct-destination. In columns (3) and (4) the dependent variable is the log of export quantities by firm-product-destination. Robust standard errors in brackets, clustered by firm-year. ***1% level, **5% level, *10% level.  Table 4 for the period 1996-2009.