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.<sup>2</sup> 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.<sup>3</sup> Finally, our paper contributes to the theoretical literature on minimum quality standards and trade, including Das and Donnenfeld (1989), Fischer and Serra (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<sup>4</sup> 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.

# **2 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-

> 2Other 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.

> 3Our 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).

> 4Our 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 ́e et al. (2015) find that standards reduce entry in export markets and lead to an increase in export prices, especially among small exporters.

4