The Toronto Stock Exchange’s main index was relatively flat as gains in lumber operations were offset by losses in marijuana companies.

The S&P/TSX composite index gained 21.24 points to 16,308.18.

“It’s basically being pulled at two sides,” said Ian Scott, an equity analyst at Manulife Asset Management.

“It’s basically like trees versus weeds today.”

West Fraser Timber Co. shares jumped 5.38% or $4.33 to $84.83 after RBC upgraded West Fraser from under-perform to sector-perform, he said, removing the final under-perform rating for the company.

That bump permeated throughout the industry, Scott said. Interfor Corp. and Canfor Copr. also both gained more than 5% cent.

But the boost from the materials sector was offset by a fall in health care. Shares in the sector shed more than 6% on average, with two marijuana companies being the index’s biggest losers of the day.

Canopy Growth Corp. shares dropped 13.87% or $5.21 to $32.35, while Aphria Inc. shares fell 12.31% or $2.53 to $18.02.

Volatility is the name of the game in the marijuana sector now, Scott said.

“Any time a stock climbs over 40% in six days with no news flow, you should be prepared to see some profits taken,” he said.

Canopy Growth shares closed at $29.74 on Dec. 29 and hit a 2018 high of $42.07 on Jan. 9 — a 41.46% increase.

On Wall Street, all three indices reached a second consecutive day of record highs.

The Dow Jones industrial average rose 228.46 points to 25,803.19, the S&P 500 index advanced 18.68 points to 2,786.24 and the Nasdaq composite index moved up 49.28 points to 7,261.06.

U.S. markets will be closed on Monday, Jan. 15 for Martin Luther King, Jr. Day.

The Canadian dollar closed at an average trading value of US79.97¢, up 0.19 of a U.S. cent.

The February crude contract advanced US50¢ to US$64.30 per barrel and the February natural gas contract rose US11.6¢ to US$3.20 mmBTU.

The February gold contract gained US$12.40 to US$1,334.90 an ounce and the March copper contract shed roughly US1.5¢ to about US$3.22 a pound.