Moody’s Analytics calls it “mortgage meltdown math”, but the subsidiary of the ratings agency paints an ugly picture of what could happen to the Canadian economy if everything goes wrong in the housing market.

A report from Moody’s economist Brendan LaCerda says total outstanding credit to the non-financial sector is well above international averages with the government backing most of Canada’s mortgage insurance.

“Fortunately, the government’s finances appear healthy enough to sustain a large bailout in a severely adverse scenario,” writes LaCerda. “Canadians’ borrowing binge has put the economy in a precarious position.”

Moody’s says low interest rates have driven the demand for mortgages and homes and caused the increase in residential property prices. That has led to more expensive homes, forcing new home buyers to borrow even more.

“This cycle is inducing fears of a bubble. If a recession were to hit the economy, many households would find themselves with negative equity and reduced incomes, raising the spectre of a swell in non-performing loans as homeowners default,” the report notes.

The problem for the government is that although banks hold the loans, a little over half of all mortgages are insured by the Canada Mortgage and Housing Corp., which is 100 per cent backed by Ottawa. Two private companies, who hold the rest of mortgage default insurance market, are 90 per cent backed by Ottawa.

“Mortgage insurance is required for loans obtained with less than a 20 per cent down payment, which implies that the loans CMHC is insuring have a smaller-than-average equity cushion,” LaCerda states.

The analyst notes that the likelihood of a major downturn in the housing market is low and Moody’s Analytics own forecast shows that housing prices will slightly dip and then level off over the next year. “But supposing such a severely adverse scenario comes to pass, the ability of the government to absorb CMHC’s losses is worth considering.”

The report focuses on the rise of credit in Canada’s non-financial private sector and compares it to the international average. Based on data from the Bank for International Settlements for 42 countries, the average credit outstanding to the non-financial sector was 154 per cent of GDP in the first quarter of 2017, compared to Canada’s 217 per cent.

“Considering only the debt of households and nonprofits as a share of GDP, Canada ranks fifth highest in the world,” writes the economist.

The positives for Canada is it’s in relatively good shape compared to its industrialized peers with a debt-to-GDP ratio of about 79 per cent of GDP in the first quarter of 2017, says Moody’s.

“Even if CMHC realized a total loss on its more than $500 billion of insurance guarantees, which is nonsensical given the collateral value of the underlying homes, and the government completely bailed them out, its debt-to-GDP ratio would rise to about 105 per cent,” writes LaCerda. “Such an increase would raise Canada above the U.S. at 99 per cent but still keep it below many of Europe’s largest economies.”

In a scenario where all of CMHC’s insured borrowers made only the five per cent down payment and house prices fall 25 per cent, and all borrowers default, that would mean a 20 per cent loss of its portfolio and $100 billion government bailout. In that case, Canada would still have a lower debt-to-GDP ratio than the U.S.

“Government finances would face additional sources of stress during a severe recession, but the prior considerations do not even include the potential assistance from the Bank of Canada. On the other hand, a bailout for the private mortgage insurance would also be necessary. But their exposure is less than half of CMHC. A bailout of CMHC would be extremely costly and unpopular, but the rise in the government’s debt-to-GDP ratio would not put Canada on the fringe of the world’s economies,” the report concludes.