This paper aims at assessing the optimal behavior of a firm facing stochastic costs of production. In an imperfectly competitive setting, we evaluate to what extent a firm may decide to locate part of its production in other markets different from which it is actually settled. This decision is taken in a stochastic environment. Portfolio theory is used to derive the optimal solution for the intertemporal profit maximization problem. In such a framework, splitting production between different locations may be optimal when a firm is able to charge different prices in the different local markets