TORONTO -- Canada's main stock index closed at its fourth record high of the week on Friday to defy decreases in the U.S. over renewed trade concerns.

The S&P/TSX composite index gained 41.34 points at 16,899.69, a new record close after hitting an intraday record of 16,947.23 in earlier trading.

Wednesday was the only day of the week in which a new high wasn't reached as the TSX rose for a fourth consecutive week

Despite setting new records, the market's performance was not as impressive as it might seem given its movements over the last decade, says Philip Petursson, chief investment strategist at Manulife Investment Management.

"We're not that far ahead of where we were in 2008, so if you annualize that performance it's less than stellar," he said in an interview.

"So while it looks like we should be getting excited about an all-time high, it's taken a long time to actually get there."

Petursson said the Toronto stock market is much more attractively valued than markets south of the border so there would be greater upside yet to come.

"Plus when you have something such as oil prices positively impacting a large sector as we have, then that's the recipe for continued new highs."

Seven of the 10 major sectors of the TSX were higher including heavyweight materials, energy and financials.

Materials gained one per cent on higher gold prices as shares of several miners rose, led by First Quantum Minerals Ltd, Kinross Gold Corp. and Barrick Gold Corp.

The December gold contract was up US$8.90 at US$1,515.10 an ounce and the December copper contract was down 0.2 of a cent at US$2.61 a pound.

Energy prices ended the week six per cent higher following last weekend's attack on Saudi Arabia that initially caused them to spike.

The November crude contract was down 10 cents on the day at US$58.09 per barrel and the October natural gas contract was down 0.4 of a cent at US$2.53 per mmBTU.

But Petursson said the week's rally could mark the start of a longer bullish run or reversal for the energy sector.

"If you look at what's been driving the TSX over the last month it's been the energy sector, the energy sector is starting to rebound a little bit," he said.

U.S. markets ended a choppy week by closing lower Friday after a Chinese delegation cut its visit short to the U.S., fuelling concerns about upcoming trade talks.

In New York, the Dow Jones industrial average was down 159.72 points at 26,934.46. The S&P 500 index was down 14.80 points at 2,991.99, while the Nasdaq composite was down 65.21 points at 8,117.67.

Markets rose earlier in the day closer to all-time highs before falling on reports that Chinese officials cancelled a trip to farms in Montana and Nebraska.

"That is setting the tone that perhaps a deal might not get done as quickly as I think the market had hoped and certainly an interim deal is probably off the table," said Petursson.

U.S. President Donald Trump said Friday that he doesn't need a trade deal with China before the 2020 election, adding that he's not looking for a partial agreement.

Market movements show that investors took Trump at his word that he's not willing to strike just any deal but Petursson believes it's a bargaining ploy and that the president wants to get a deal done to have something to promote to voters.

The Canadian dollar traded for an average of 75.33 cents US compared with an average of 75.42 cents US on Thursday.

This report by The Canadian Press was first published Sept. 20, 2019