Morocco has become the second-largest African investor on the continent following a surge in direct investments over past two decades, IFC notes.