This paper analyzes how increasing trade integration affects individual utility when the international specialization pattern is stochastic, i.e. when the number of varieties each country produces depends on the realization of a random variable. I employ a Ricardian continuum of goods model to show that in this case a trade off emerges. As in the standard model, higher trade integration reduces prices and increases expected real income. However, higher trade integration, reducing the number of active sectors in the economy, also increases the displacement cost the worker would suffer in a bad state (i.e. when the sector she is employed into has to close down because, ex-post, the foreign country’s competing sector results to be more efficient). The main result of the model is that there exists an optimal level of protection that it is higher the smaller the price reduction induced by trade integration and the more technologically similar are countries.