TORONTO -- Canada's main stock index closed in positive territory on Wednesday as oil prices and the loonie strengthened and gold reached another all-time high.

In Toronto, gains were widespread as the S&P/TSX composite index rose by 133.58 points at 16,501.61.

Nine of 11 sectors were in the green, led by energy and financials, leaving just telecommunications and utilities posting modest declines of less than one per cent.

"What we're starting to see, which feels a little more optimistic, is we're getting a bit more attention on some of the commodity stocks," said Greg Taylor, chief investment officer of Purpose Investments.

"For most of this year, it's been really focused on the large-cap tech stocks and gold. But in the last few days, we're starting to see a little bit more of that broadening out."

The September crude contract rose 49 cents to US$42.19 per barrel after the U.S. Energy Information Administration reported a sharp decline in oil inventories during the week to July 31.

That suggests that capital spending cuts in the wake of poor prices earlier this year are working to reduce overproduction and support healthier prices.

Oilsands producer and refinery owner Suncor Energy Inc. rose 62 cents to $22.07 in Toronto while fellow producers Crescent Point Energy Corp. and Cenovus Energy Corp. were ahead by 10 cents to $2.32 and 43 cents to $6.61, respectively.

Meanwhile, the September natural gas contract was down slightly at US$2.19 per mmBTU.

The December gold contract was up US$28.30 at US$2,049.30 an ounce after earlier reaching US$2,070.30 an ounce. The September copper contract was up 2.25 cents at nearly US$2.92 a pound.

The rise in commodities and base metal prices stands to allow Canadian markets to catch up with their American peers which have benefited by having more large technology companies on their rosters, said Taylor.

"Really, the biggest trend everyone's watching has been this rotation away from some of the large-cap tech stocks towards some cyclicals," he said.

"If that takes hold, that's going to be really good for the Canadian market which has underperformed some of the U.S. markets because of the lack of technology stocks."

Kinross Gold Corp. rose 22 cents to $13.10, Yamana Gold Inc. was up nine cents to $9.04 and Barrick Gold Corp. fell 11 cents to $39.60.

Taylor added that Canada is still a "petro-market" and the rise in oil prices is a good sign.

"The big thing is no one owns these stocks right now, they've really fallen out of favour and if we do get a positive momentum in the commodity price and people come back to it, it looks like it could go on a fairly substantial run here."

The Canadian dollar traded for 75.40 U.S. compared with 74.78 on Tuesday.

Manulife Financial Corp, the most active of the financial stocks, gained 82 cents, or 4.55 per cent, to $18.83 on Wednesday, while Royal Bank of Canada rose by $1.31 or 1.42 per cent to $93.80.

In New York, the Dow Jones industrial average was up 372.84 points at 27,201.31 and the S&P 500 index was up 21.26 points at 3,327.77, just 1.7 per cent below its record.

Meanwhile, the Nasdaq composite was up 57.23 points at 10,998.40 after surpassing 11,000 for the first time earlier in the day.

Taylor said trading volumes on both sides of the border have been low due in part to the season but also because investors are waiting on news.

The jobless statistics out this Friday are widely anticipated, as is an expected agreement in the United States on more stimulus spending to help power through the economic crisis caused by the COVID-19 pandemic.

This report by The Canadian Press was first published Aug. 5, 2020.