Canada's economy contracted unexpectedly in January, with total output inching down by 0.1 per cent largely because of a slowdown in oil and in real estate.

Statistics Canada reported Thursday that the service sector was flat, while goods-producing industries produced 0.4 per cent less stuff in January than they did in December.

The mining, quarrying and oil-and-gas extraction industry declined by 2.7 per cent during the month, its largest decline since May 2016.

Output from real estate agents and brokers fell 12.8 per cent in January, the largest monthly decline since November 2008.

New mortgage rules designed to make it harder to get a mortgage came into effect during the month, which caused buyers to rush to buy before the deadline and led to a sharp drop for the month.

As the data agency put it, "Home resale activity was down in most Canadian markets, as new mortgage lending rules, including stress-testing for uninsured mortgages, announced in October 2017 took effect in January 2018."

The Canadian dollar reacted to the news, losing a third of a cent to 77.35 cents US after the news came out.

Economist Brian DePratto with Toronto-Dominion Bank said that while he sees some tiny slivers of optimism beneath the bleak headline, "it is hard to find a lot to like in today's numbers."

"This year started off with more of a whimper than a bang, at least from a growth perspective," he said. "As usual though, the trend is more important than the noise." He suggested he expects growth will pick up through the rest of the year.

"Our current tracking of 1.4 per cent growth in the first quarter may be a reflection of the noise, but over the medium-term, Canada's economic fundamentals remain consistent with growth in the 1.5 to 1.9 per cent range — enough to maintain inflationary pressures and ongoing (modest) job gains."