TORONTO -- Canada's main stock index rallied to its highest level in seven weeks Wednesday despite crude oil prices getting hammered.

Investors are slowly "nibbling" back into the market on hopes of progress in trade issues, says Colin Cieszynski, chief market strategist at SIA Wealth Management.

"I think they're getting a feeling that some of the worst risks related to trade wars are dissipating," he said in an interview.

The U.S. and China are preparing to resume negotiations next month and the British parliament has passed a law to thwart a hard Brexit the end of October. The Chinese contributed to the improved sentiment by backing off on imposing some tariffs.

"On some selected goods they had backed off on implementing new tariffs and so that has helped," Cieszynski said.

The S&P/TSX composite index closed up 73.80 points at 16,611.14, the highest level since July 24 and less than 62 points off April's record high.

Seven of the 11 major sectors of the TSX were higher, led by technology. The sector gained 1.9 per cent as BlackBerry Ltd. was up 5.5 per cent and Shopify shares gained 3.4 per cent.

Consumer discretionary, financials, health care, telecommunications, utilities and materials were also higher.

Roots shares lost more than 13 per cent after the chief executive said lacklustre foot traffic and a challenging move to a new distribution centre weighed on its most recent quarterly results that missed expectations.

SNC-Lavalin shares climbed 4.5 per cent on the day and 17 per cent this week after a regulatory filing showed Jarislowsky Fraser Ltd. became one of the engineering giant's top three shareholders.

Materials was up as the December gold contract rose US$4.00 to US$1,503.20 an ounce while the December copper contract was down 1.35 cents at US$2.61 a pound.

Energy was down slightly despite a big draw-down for the week in U.S. stockpiles. The October crude contract was down US$1.65 at US$55.75 per barrel and the October natural gas contract was down 2.8 cents at US$2.55 per mmBTU.

Cieszynski said the firing of national security adviser John Bolton has raised concerns about possible increased oil supplies.

"He was one of the biggest hawks against Iran and now there's rumours starting to float around that the United States might re-engage with Iran and kind of back off on their sanctions," he said.

In New York, the Dow Jones industrial average was up 227.61 points at 27,137.04, also the highest level since July. The S&P 500 index was up 21.54 points at 3,000.93, while the Nasdaq composite was up 85.52 points at 8,169.68.

The Canadian dollar traded for an average of 75.87 cents US compared with an average of 76.03 cents US on Tuesday.