A sudden stop of capital flows into a developing country tends to be followed by a rapid switch from trade deficits to surpluses, a depreciation of the real exchange rate, and decreases in output and total factor productivity. Substantial reallocation takes place from the nontraded sector to the...