TORONTO -- Canada's main stock index barely rebounded from two days of losses on a whiff of hope about the U.S. reaching a trade deal with China and higher oil prices.

The S&P/TSX composite index closed up 39.65 points to 16,397.40.

In New York, the Dow Jones industrial average was up 2.24 points at 25,967.33. The S&P 500 index was down 4.63 points at 2,879.42, while the Nasdaq composite was down 20.44 points at 7,943.32.

The Canadian dollar traded at an average of 74.26 cents US compared with an average of 74.21 cents US on Tuesday.

The June crude contract was up 72 cents at US$62.12 per barrel and the June natural gas contract was up 7.3 cents at US$2.61 per mmBTU.

The June gold contract was down US$4.20 at US$1,281.40 an ounce and the July copper contract was down 1.1 cent at US$2.77 a pound.