This paper develops a heterogeneous firm-dynamics model to jointly study firms’ currency debt composition and investment choices. In our model, foreign currency borrowing arises from a dynamic trade-off between exposure to currency risk and growth. The model endogenously generates selection of productive firms into foreign currency borrowing. Among them, firms with high marginal product of capital use foreign loans more intensively. We assess econometrically the model’s predicted pattern of foreign currency borrowing using firm-level census data from the deregulation of these loans in Hungary, calibrate the model and quantify the aggregate impact of this financing. Our counterfactual exercises show that understanding the characteristics of firms borrowing in foreign currency is critical to assess the aggregate consequences of this financing.