País sobe em ranking de investimento externo