Canada's main stock index notched a two-month high on Tuesday, led by gains for heavyweight financial and energy stocks, while shares of lumber companies rallied after new U.S. import duties on the product came out lower than some investors had expected.

The United States said it will impose preliminary anti-subsidy duties averaging 20 per cent on imports of Canadian softwood lumber, escalating a long-running trade dispute between the two neighbours.

RBC analysts said the rates set were at the low end of their 20 per cent to 30 per cent expectation, while top Canadian officials said the country will fight back against the tariffs and win again.

Shares of West Fraser Timber Co Ltd (WFT.TO), which would pay the highest duty rate of the affected companies, rose 8.8 per cent to 61.30, helped also by the release of better-than-expected earnings after the close on Monday. Canfor Corp (CFP.TO) stock gained 7.9 per cent to $19.61.

Gains for the Toronto Stock Exchange's S&P/TSX composite index came as improved risk appetite after the first round of the French presidential election helped push global stocks higher.

"People saw what they were hoping to see at the weekend and as a result the risk-on trade is back on in a big way," said Ian Scott, equity analyst at Manulife Asset Management.

Strong corporate earnings and anticipated announcement on Wednesday of the Trump administration's tax overhaul added to support for the market, Scott said.

The energy group climbed 1.5 per cent, as oil broke its recent losing streak, with Canadian Natural Resources (CNQ.TO) advancing 2.4 per cent to $45.33.

U.S. crude oil futures settled 33 cents US higher at US$49.56 a barrel.

The financials group gained 0.6 per cent, led by a 1.0 per cent gain for the country's largest bank, Royal Bank of Canada, to $97.03.

Shares of Metro Inc (MRU.TO) climbed 6.9 to $45.18 after the retailer met earnings expectations and upped its dividend.

The TSX closed up 32.73 points, or 0.21 per cent, at 15,745.19.

Seven of the index's 10 main groups ended higher, with the materials sector down 2.5 per cent as disappointing earnings from two major miners offset the lumber company gains.

Barrick Gold Corp (ABX.TO), the world's largest gold miner, fell nearly 11.0 per cent to $22.89, after reporting weaker-than-expected earnings and as gold prices fell to a two-week low.

Teck Resources Ltd (TECKb.TO) fell 2.5 per cent to $28.84 after North America's largest producer of steelmaking coal reported lower-than-expected profit due to higher costs, lower production and sales volumes.

U.S. MARKETS

The Nasdaq Composite hit a record high on Tuesday, while the Dow and S&P 500 brushed against recent peaks as strong earnings underscored the health of corporate America.

Caterpillar closed up 7.9 per cent at US$104.42 after earlier hitting a multi-year high of US$104.89 and McDonald's jumped 5.6 per cent to US$141.70, both after beating profit estimates.

"It's earnings coming from the Dow companies, the largest of the large, in particular Caterpillar, really driving on the theme that U.S. corporate profitability is on track to provide some significant year-over-year earnings growth. That in and of itself is a fantastic story," said Peter Kenny, senior market strategist at Global Markets Advisory Group in New York.

Overall profits of S&P 500 companies are estimated to have risen 11.4 per cent in the first quarter, the most since 2011, according to Thomson Reuters I/B/E/S.

The Nasdaq hit a record level of 6,036.02, breaching 6,000 for the first time, powered by gains in index heavyweights Apple and Microsoft.

The index first touched the 5,000 mark on March 2000 as tech stocks bubbled before tumbling nearly 80 per cent through October 2002.

The Dow Jones Industrial Average rose 232.23 points, or 1.12 per cent, to 20,996.12, the S&P 500 gained 14.46 points, or 0.61 per cent, to 2,388.61 and the Nasdaq Composite added 41.67 points, or 0.7 per cent, to 6,025.49.

The Russell 2000 also hit an intraday record high.

The S&P 500 touched its day's high after the Wall Street Journal reported U.S. President Donald Trump's tax proposal, expected on Wednesday, would include a slash to 15 per cent from 39.6 per cent on many owner-operated companies.

"[Treasury Secretary Steven] Mnuchin has to have a better-articulated answer to what the tax code changes are in a meaningful way," said Kim Forrest, senior equity research analyst at Fort Pitt Capital Group in Pittsburgh.

She said cutting taxes on partnerships and owner-operated businesses would be a strong boost to investing.

Tuesday's gains built on a day-earlier rally, which was driven by the victory of centrist candidate Emmanuel Macron in the first round of the French presidential election. Polls showed Macron, the market's favorite, was likely to beat his far-right rival Marine Le Pen in a deciding vote on May 7.

About 7.31 billion shares changed hands in U.S. exchanges, above the 6.4 billion daily average over the last 20 sessions.

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

The S&P 500 posted 85 new 52-week highs and three new lows; the Nasdaq Composite recorded 218 new highs and 43 new lows.