For starters, countries should embrace policies that favor foreign direct investment (FDI) over inflows that can be withdrawn more quickly, such as foreign bank loans, debt, or equity investments. My research with Hui Tong of the International Monetary Fund shows that countries whose capital inflows that are mainly in the form of FDI tend to be more resilient to foreign financial shocks.