We provide a new interpretation of the statistical relation between the trade balance and the terms of trade. This relation includes the J-curve, the tendency for trade balances to be negatively correlated with contemporaneous movements in the terms of trade, positively correlated with lagged movements. We document this property in international data and show that it arises, as well, in a two-country stochastic growth model. In the model trade dynamics result, in large part, from fluctuations in investment. A favorable productivity shock in the domestic economy leads to an increase in domestic output, a decrease in its relative price, and a rise in the terms of trade. The increase in domestic productivity also leads to a temporary investment boom. This boom results in an initial trade deficit, followed by future surpluses, and thus a J-curve. We also use the model to provide a new perspective on earlier theories of trade and price dynamics.