We provide a theory of the determination of exchange rates based on capital flows in imperfect financial markets. Capital flows drive exchange rates by altering the balance sheets of financiers that bear the risks resulting from international imbalances in the demand for financial assets. Such alterations to their balance sheets cause financiers to change their required compensation for holding currency risk, thus impacting both the level and volatility of exchange rates. Our theory of exchange rate determination in imperfect financial markets not only helps rationalize the empirical disconnect between exchange rates and traditional macroeconomic fundamentals, but also has real consequences for output and risk sharing. Exchange rates are sensitive to imbalances in financial markets and seldom perform the shock absorption role that is central to traditional theoretical macroeconomic analysis. Our framework is flexible; it accommodates a number of important modeling features within an imperfect financial market model, such as non-tradables, production, money, sticky prices or wages, various forms of international pricing-to-market, and unemployment.