The New York Stock Exchange ends higher