Canada's main stock index climbed higher Wednesday, riding a tide of energy and metal sector gains despite losses in the financial and technology sectors, while U.S. stock markets were mostly in the red.

The S&P/TSX Composite Index rose 38.59 points, or 0.19 per cent, to close at 20,259.78.

In New York, the Dow Jones Industrial Average inched up 5.14 points to 32,661.84. But the S&P 500 Index dropped 18.76 points to 3,951.39, while the Nasdaq Composite fell 76.06 points to 11,379.48.

The Canadian dollar traded for 73.46 cents U.S. compared with 73.48 cents U.S. on Tuesday.

The April crude contract was up 64 cents at US$77.69 per barrel and the April natural gas contract was up six cents at US$2.81 per mm/BTU.

The April gold contract was up US$8.70 at US$1,845.40 an ounce and the May copper contract was up seven cents at US$4.16 a pound.