Evolution of the external account under international capital market frictions