Moody’s Investors Service Inc. affirmed its AAA rating on Canada, with a continued stable outlook, despite risks posed by the housing market and household debt levels.

The New York-based credit-rating agency expects Canada’s government debt ratios will remain stable in the next two years, declining gradually after that. It also notes that Canada’s well regulated financial services system would absorb a potential housing shock with minimal fiscal costs for the government; and that the economy is supported by strong institutions and economic policy management.

Moody’s is forecasting Canada’s real gross domestic product (GDP) growth to average 1.7% annually in 2016-18, adding that, over the longer term, “Canada’s growth potential is robust, underpinned by steady increases in the working age population, including a regular flow of immigrants. High competitiveness also points to robust productivity growth.”

Moody’s also forecasts that general government debt “will remain essentially unchanged” relative to GDP in the next two years “before falling gradually as the fiscal stimulus is phased off after 2017 and nominal growth strengthens.

“The ongoing adjustment to a prolonged period of low oil and gas prices and somewhat slower growth in the U.S., combined with financial risks from rising house prices and household debt levels pose downside risks to our economic and fiscal projections,” it says.

However, Moody’s stable outlook for Canada’s credit rating is based on expectations of “continued vigilance by Canadian authorities” that will mitigate these risks and preserve sovereign credit quality.

“In particular, while GDP growth would likely slow should house prices fall significantly as construction activity fell and negative wealth effects dampened consumption, banks’ and mortgage insurers’ financial strength would limit the fiscal costs to the government to minimal amounts,” it says.

“More generally, demonstrated capacity to adjust fiscal, monetary and economic policy to buffer the economic impact of negative shocks points to resilience of Canada’s credit metrics at levels consistent with a AAA rating,” Moody’s adds.