The sharp increase in both gross and net international capital flows over the past two decades has prompted renewed interest in their determinants. Most existing theories of international capital flows are based on one-asset models, which have implications only for net capital flows, not for gross flows. Moreover, because there is no portfolio choice, these models allow no role for capital flows as a result of assets’ changing expected returns and risk characteristics. In this paper, we develop a method for solving dynamic stochastic general equilibrium open-economy models with portfolio choice. After showing why standard first- and second-order solution methods no longer work in the presence of portfolio choice, we extend these methods, giving special treatment to the optimality conditions for portfolio choice. We apply our solution method to a particular two-country, two-good, two-asset model and show that it leads to a much richer understanding of both gross and net capital flows. The approach identifies the time-varying portfolio shares that result from assets’ time-varying expected returns and risk characteristics as a potential key source of international capital flows.