TORONTO -- North American stock markets were relatively flat Friday to end a second consecutive positive week since being hammered by concerns about the impact of the novel coronavirus.

"It's been a great week, probably a bit surprising given the continued fears around COVID-19," said Kevin Headland, senior investment Strategist at Manulife Investment Management, referring to the virus that has killed 1,380 people in China and sickened more than 64,000.

The S&P/TSX composite index gained 1.1 per cent over the last five trading sessions after closing up 27.19 points at 17,848.36, less than 25 points off its record high set Wednesday.

U.S. corporate earnings have beaten expectations this quarter. With three-quarters of companies reporting so far, about 72 per cent of them have beat expectations, he said.

"Markets tend to react positively to any type of beat, whether it's negative, it's still a beat," he said in an interview.

In New York, the Dow Jones industrial average lost 25.23 points at 29,398.08. The S&P 500 index was up 6.22 points at 3,380.16, while the Nasdaq composite was up 19.21 points at 9,731.18.

Markets were in a data tug of war Friday with consumer confidence and industrial production beating expectations and clothing sales plunging 3.1 per cent.

Core retail sales, excluding gas, autos, building materials and food services, were unchanged last month. However the survey was conducted before the coronavirus was fully digested by the U.S. consumer.

"I think it'll be interesting to see what happens next month or in the next couple of months to see if we see the real contagion effect that this virus is having on the actual fundamental data," said Headland.

The week has turned out stronger than expected given ongoing concerns about the virus as the number of cases spiked following a change in the way they are counted.

The amount of stimulus or liquidity being injected by the Chinese government seems to be positive for markets.

"Only time will tell to see whether those stimulus measures actually do protect the downside of the Chinese economy," he said. "It's definitely going to be disruptive, it's a matter of to what level it's going to be destructive."

Headland said the impact will start to appear when data starts rolling in, including PMI numbers at the end of February.

The Canadian dollar traded for 75.48 cents US compared with an average of 75.44 cents US on Thursday.

A surging health care sector helped push the TSX higher as shares of several cannabis producers posted gains. The sector rose nearly six per cent with Hexo Corp. up 19 per cent while Canopy Growth Corp. climbed 15.8 per cent after its third-quarter losses were less than expected on higher revenues.

The materials and energy sectors were both lower despite higher prices for energy and gold. Materials was the weakest sector as Agnico Eagle Mines Ltd. lost 15.6 per cent.

The April gold contract was up US$7.60 at US$1,586.40 an ounce and the March copper contract was down 1.35 cents at US$2.60 a pound.

The March crude contract was up 63 cents at US$52.05 per barrel and the March natural gas contract was up 1.1 cents at US$1.84 per mmBTU.

Consumer discretionary was lower as shares of MTY Food Group Inc. lost 8.4 per cent after the Quebec-based fast food restaurant chain said it is delaying the release of its quarterly results citing allegations made by a whistleblower employee.