We develop a general policy analysis framework for an open economy that features nominal rigidities and financial frictions giving rise to endogenous PPP and UIP deviations. The efficient allocation can be implemented with monetary policy closing the output gap and FX interventions eliminating the UIP deviations. When the “natural” real exchange rate is stable, both goals can be achieved solely by monetary policy that fixes the exchange rate — an open-economy divine coin- cidence. More generally, the optimal policy features a managed float/crawling peg complemented with FX forward guidance and macroprudential accumulation of FX reserves, in line with the “fear of floating” observed in the data. Capital controls are not necessary to achieve the frictionless al- location, but they facilitate the extraction of rents in the currency market. Constrained unilateral policies are not optimal from the global perspective, and international cooperation features a com- plementary use of FX interventions across countries.