The Dynamics of Foreign Investment.