Canada's main stock index posted a fresh record high on Tuesday as higher oil prices and bond yields supported energy and financials, while auto suppliers benefited from U.S. President Donald Trump's warm words for Canadian trade the day before.

Bond yields jumped after Federal Reserve Chair Janet Yellen said it would be unwise to wait too long to raise U.S. interest rates.

Higher yields reduce the value of insurance companies' liabilities and increase banks' net interest margins.

Manulife Financial Corp rose 1.5 per cent to $24.95, while the overall financials group advanced 0.3 per cent.

The group has soared more than 13 per cent since the U.S. presidential election, helped by the prospect of U.S. economic stimulus and deregulation.

"Canadian banks are getting a bit pricey," said Ian Scott, equity analyst at Manulife Asset Management.

"You are seeing a bit of a move but just not nearly as much as you have seen in the past."

The consumer discretionary group climbed 0.7 per cent, with Magna International Inc gaining 1.2 per cent to $59.10.

Auto supplier stocks such as Magna had been held back by investor worries of a proposed U.S. border adjustment tax, Scott said.

Imposition of such a measure would "hit Canadian exports hard," said the C.D. Howe Institute in a research report.

On Monday, Trump said he only wants to tweak trade ties with Canada.

But his pledge to renegotiate the North American Free Trade Agreement (NAFTA) to focus on Mexico is almost impossible and Canada will not emerge unscathed, Canadian officials and trade experts said.

Energy gained 0.9 per cent as oil prices rose.

U.S. crude oil futures settled 27 cents higher at US$53.20 a barrel but some gains were pared amid concerns about rising supply from U.S. shale output.

The Toronto Stock Exchange's S&P/TSX composite index closed up 29.45 points, or 0.19 per cent, at 15,786.03.

It was the sixth straight day of gains for the index, which has rallied nearly 37 per cent from a three-year trough in January last year.

The utilities group, which tends to underperform as bond yields rise, fell 0.8 per cent and the materials group, which includes precious and base metals miners and fertilizer companies, dipped 0.2 per cent.

Teck Resources Ltd fell nearly two per cent to $32.67 as copper pared some recent gains.

Copper prices declined 1.4 per cent to US$6,020.85 a tonne and gold futures rose 0.4 per cent to US$1,229 an ounce.

Five of the index's 10 main groups ended higher. 

U.S. MARKETS

Major U.S. stock indexes established record highs on Tuesday, led by bank stocks after Federal Reserve Chair Janet Yellen's comments on interest rates.

Apple racked up a record high close for the second straight session, contributing to gains in the S&P 500, Dow Jones Industrial Average and Nasdaq Composite indexes.

Yellen said delaying rate hikes could force the U.S. central bank to tighten monetary policy quicker down the line, which could risk a recession. She also expressed uncertainty over economic policy under the Trump administration.

Banks, expected to gain from higher interest rates, led the market higher. Goldman Sachs rose 1.29 per cent and Bank of America added 2.82 per cent. The S&P 500 financial index jumped 1.24 per cent.

So far in 2017, the KBW banking index has increased 4.5 per cent.

President Donald Trump's pro-business stance sparked a record-setting rally in stocks following his November election. However, he has given scant detail on his policies, leaving the Fed with limited visibility about the economy's future direction.

Speaking to the U.S. Senate Banking Committee, Yellen did not indicate whether the Fed still planned to raise rates three times this year, nor did she indicate whether a hike might come in March or in June, as most analysts expect.

"With the new president, there is still the uncertainty of the economic policy," said Jeff Carbone, co-founder of Cornerstone Financial Partners in Charlotte, North Carolina.  "How much growth we get out of the market will affect policymaking and how quickly they need to react."

The Dow Jones Industrial Average climbed 0.45 per cent to end at 20,504.41 points, while the S&P 500 gained 0.40 per cent to 2,337.58.

The Nasdaq Composite added 0.32 per cent to 5,782.57.

Yellen's comments lifted the dollar and U.S. Treasury yields.

Eight of the 11 major S&P sectors rose, with healthcare adding 0.73 per cent.

Apple rose as high as US$135.09, an intraday record high, before ending with a gain of 1.30 per cent at US$135.02, its highest-ever closing price.

General Motors added 4.84 per cent after Peugeot owner PSA Group said it is in talks to buy GM's European Opel business.

The prospects of sector consolidation caused Fiat Chrysler to jump 4.39 per cent, while Ford gained 0.72 per cent.

Advancing issues outnumbered declining ones on the NYSE by a 1.09-to-1 ratio; on Nasdaq, a 1.31-to-1 ratio favored advancers.

The S&P 500 posted 60 new 52-week highs and no new lows; the Nasdaq Composite recorded 124 new highs and 22 new lows.

About 6.7 billion shares changed hands on U.S. exchanges, in line with its daily average over the last 20 sessions.