This paper extends the firm heterogeneity model of Melitz (2003) by introducing a new concept of endogenous investments in process R&D. The novelty is that if a firm invests more in R&D its expected innovation return hazard rate stochastically dominates the return of less R&D investments. Due to this property, entrants invest more in R&D in response to trade liberalization. As a result, the aggregate productivity is affected by a reallocation of resources to more productive firms and a simultaneous increase in firms' investments in innovations, which is consistent with empirical findings. At the same time the firms' increased R&D investments lead to a sector distribution with a higher right-tail compared to the distribution prior to trade liberalization. Hence, the model gives an explanation for the empirically found differences in the distribution tails among sectors with different trade openness levels. Another advantage of this paper's framework compared to other trade models with innovations is its foundation in and extension of Melitz (2003). It enables most of the heterogeneous firms trade models to be extended by endogenous firm-level R&D in an empirically relevant and analytically tractable way.