This paper introduces endogenous quality innovations in a multi-country model with heterogeneous firms. We show that investments lead to an additional margin of adjustment the gravity equation. In industries high scope for differentiation, elasticity bilateral exports respect fixed costs is lower due adjustments at extensive margin, whereas variable remains unaffected. find robust and consisten...