The external risks of financial integration for emerging economies