Canada’s net debt as proportion of its economy is likely to reach a 20-year high, jeopardizing the country’s top credit rating, according to Macquarie Capital Markets.

The federal deficit could rise close to $400 billion as the government extends emergency programs to help buffer the impact of the coronavirus shutdowns, Macquarie analysts David Doyle and Neil Shankar said in a report on Wednesday.

That would push the federal net debt-to-gross domestic product ratio to about 55 per cent, the highest since 1998-99. Add in provincial deficits, and the shortfall rises to about $500 billion, or net debt of 90 per cent of the nation’s output in 2020-21, the analysts estimate.

“These figures may catch the eye of rating agencies and could jeopardize Canada’s AAA rating particularly if the economy continues to underperform in 2021 and beyond,” they wrote. They expect that is likely, “given how growth has come almost exclusively from housing and energy over the last decade,” they said.

The budget deficit of Ontario, the world’s largest sub-sovereign debt issuer, will be more than double the latest official government projections as its economy contracts nine per cent in 2020 from the coronavirus shock, the Financial Accountability Office of Ontario, a provincial fiscal watchdog, said earlier this week.

Quebec, which was running surpluses before the Covid-19 crisis, said it is on track to post a budget deficit between C$12 billion and C$15 billion and it will need as long as five years to balance its book again, the province’s Finance Minister Eric Girard said Wednesday.