TORONTO -- Canada's main stock index eked out a small gain on the first day of trading after the Thanksgiving holiday, while U.S. markets rose on positive earnings reports.

The S&P/TSX composite index closed up 3.23 points at 16,418.39.

In New York, the Dow Jones industrial average was up 237.44 points, or about one per cent at 27,024.80. That's just 1.4 per cent from the all-time high set last July. The S&P 500 index rose 29.53 points at 2,995.68, while the Nasdaq composite added 100.06 points at 8,148.71.

The Canadian market benefited largely from gains in the health-care and financials sectors, which more than offset losses in the materials and energy sectors.

Health care rose 3.2 per cent on the day as Aphria Inc. closed up 15.5 per cent after the cannabis producer posted a second consecutive quarter of profitable growth. CannTrust Holdings Inc. was up 51.7 per cent after the pot producer announced it will destroy $77 million worth of cannabis plants and inventory as part of its efforts to comply with Health Canada regulations.

Aphria's share price gain is primarily the result of short-covering by investors rather than being reflective of great results, says Dominique Barker, portfolio manager at CIBC Asset Management.

Technology rose 1.55 per cent and the heavyweight financials sector climbed 0.55 per cent as investors took a shine to the sector on Tuesday after several U.S. banks posted better than expected quarterly results and commentary that consumers continue to be strong.

"I think expectations were fairly tepid going into the quarter so the fact that they reported decent numbers or that they didn't disappoint was enough to get them into green territory," Barker said in an interview.

The busiest day of the quarter so far beat the pessimistic outlook of analysts who have forecast a dip in earnings. The cautious view is based partly on the negative impact of a trade battle between the U.S. and China., which eased after the two sides reached a partial agreement on Friday.

"Even though we're not seeing details, it seems to be enough to be an excuse to put risk-on in this market," she said.

Materials fell 2.2 per cent as the price of gold dipped further and several mining companies faced some "esoteric issues."

Shares in Alamos Gold Inc. fell 12.1 per cent after the company said it has stopped construction on its Kirazli project pending the renewal of its Turkish mining concessions.

Teck Resources Ltd. shares were down 3.7 per cent as it faces a strike at its Chile mine by a union representing 473 workers.

"Generally, it's the materials that's bringing things down in Canada and of course we overindex on materials versus the U.S.," Barker said.

The December gold contract was down US$14.10 at US$1,483.50 an ounce and the December copper contract was down two cents at US$2.61 a pound.

Energy also dipped as Encana Corp. shares lost about three per cent.

The November crude contract was down 78 cents at US$52.81 per barrel and the November natural gas contract was up 5.9 cents at US$2.34 per mmBTU.

The Canadian dollar traded for an average of 75.69 cents US compared with an average of 75.77 cents US on Friday.

U.S. rail results starting Wednesday should provide a good indication of how the economy is doing, said Barker.

"You don't even need to beat. You just don't disappoint."