Mexico's federal antitrust agency has closed its investigation into the purchasing practices of Wal-Mart de Mexico, on the condition that the retailer subscribes to a code of conduct relating to its dealings with suppliers.