This paper develops a complete-markets model to analyze the determinants of endogenous trade imbalances across countries. We introduce a framework where countries can trade in Arrow-Debreu securities to insure against different states of the world, which enables them to run deficits in some states and surpluses in others. The model allows for counterfactual analysis of various trade policy scenarios, such as unilateral tariff impositions. We derive the conditions under which trade deficits arise endogenously and discuss implications for welfare and trade policy analysis.