Temporary migration and capital market imperfections