A sign board displaying Toronto Stock Exchange (TSX) stock information is seen in Toronto June 23, 2014.
A sign board displaying Toronto Stock Exchange (TSX) stock information is seen in Toronto June 23, 2014. Reuters / Mark Blinch

Canada's main stock index fell on Friday to close out its worst week in more than two years, as the energy sector continued its recent losing streak and offset gains by technology and consumer discretionary stocks.

The Toronto Stock Exchange's S&P/TSX composite index ended down 73.58 points, or 0.4%, at 18,930.48, its lowest closing level since March 2021.

For the week, the TSX was down 6.6%, its biggest weekly decline since March 2020.

U.S. stocks were also volatile this week as investors grappled with a likely recession on the heels of rate hikes by multiple global central banks, including a three-quarter-percentage-point move by the Federal Reserve on Wednesday, seeking to tame rising inflation.

"All this chatter about recession has had investors really concerned," said Elvis Picardo, portfolio manager at Luft Financial, iA Private Wealth.

"And on top of that we've seen a bit of a pullback in oil prices ... Energy equities were riding so high I think there has been a massive bout of profit taking in them."

The energy group on the Toronto market fell 5.7%, its seventh straight day of declines, as oil prices tumbled to a four-week low. U.S. crude oil futures settled 6.8% lower as investors worried that a global economic slowdown could cut demand for energy.

The materials group, which includes precious and base metals miners and fertilizer companies, was also a drag, losing 0.9% as gold and copper prices fell.

In contrast, the technology sector added 2.2%, with Lightspeed Commerce leading gains with a surge of 7.1%.

Consumer discretionary rose 1.7%, while industrials ended 1% higher.

Separately, Canada's antitrust regulator said the merger of Rogers Communications and Shaw Communications should not go ahead, arguing the deal poses threats to competition in Canada.

Shares of both companies ended higher.