After four successive days of declines, the Canadian stock market ended higher on Wednesday, staying firm after a bright start on positive global cues amid rising optimism about a U.S.-China trade deal.