Oh Canada! The first two words of that country’s national anthem are also what many people in Toronto and Vancouver must be saying when they pay their rent or mortgage.

Toronto’s costs posted the biggest jump from a year ago in the annual Bloomberg Global City Housing Cost Index, which analyzes more than 100 municipalities worldwide. Canada’s financial hub surged 18 places to rank 28th globally in the survey, while Vancouver had the second-largest leap: 16 spots to 16th overall.

Canada was a bargain, though, compared to Hong Kong and San Francisco -- which maintained their positions as the world’s two most-expensive cities, based on four equal-weighted factors that comprise the index: the average monthly mortgage on a 1,000 square-foot home downtown, payments for a similar unit in the suburbs, and rents for a three-bedroom apartment in the city-center and on the outskirts of town.

“Over the course of the last five years, house prices in major cities have increased by 35 per cent on average," UBS Group AG said in a report on prospects for property bubbles in 20 territories, and ranked Hong Kong, Toronto, Munich and Vancouver most at-risk. “Even for highly skilled workers, property ownership is now out of reach" in Hong Kong, where prices have risen about 10 per cent annually in the period, according to the report.

New York, London, Geneva and Singapore rounded out the Top 6 in total costs, though there was minimal movement from a year ago in the top tier.

But no city was close to Hong Kong for breaking the bank accounts of loan-assisted buyers.

A typical 1,000 square-foot home (93 sq.m.) -- cozy but not spacious for a four-person family -- in the city centre commanded an average mortgage payment of nearly US$8,000 per month, according to Bloomberg-analyzed statistics from Numbeo.com, a database of cost-of-living statistics contributed by users.

The good news for those who need a roof over their head in Hong Kong is that recent interest-rate hikes and lower stock-market-prices will "result in home prices that are 10-15 per cent lower than current peak readings by mid-2019," according to Bloomberg Intelligence analysts Patrick Wong and Michael Tam.

Looking to rent a nice three-bedroom apartment? Avoid San Francisco and New York if you can. Downtown locations could go north of $6,300 and $5,700, respectively, while non-prime locations average $4,200 and $3,300 per month.

Boston, Los Angeles and Seattle rose most among U.S. cities in the Top 20, with Washington D.C. dropping.

“There will be a breaking point for employees forced to choose between sky-high rents, substandard conditions or long commutes -– and they are likely to pick getting out of L.A.,” Mary Leslie, president of the Los Angeles Business Council, said in a statement after the council this week released a report on city housing. “Housing is not a siloed issue – it has a domino effect far beyond the housing market."

China’s capital Beijing and financial hub Shanghai each moved into the Top 10 this year thanks mainly to surging prices faced by buyers of downtown units -- only Hong Kong had higher average mortgage costs. Self-reported average financing rates for cities on the mainland ranged from 5 per cent to 5.5 per cent, similar to those of last year.

The rent-versus-own equation in the two Chinese cities offered a different view. Monthly rents cost barely one-third of the average mortgage payment, the data show -- though that doesn’t take into account the potential investment gain that’s made millionaires of buyers in cities like Shanghai, Beijing and Hong Kong.

There was good news in some locations -- though lower housing costs typically go hand-in-hand with weak economic growth. Seven cities dropped more than 10 spots from last year’s housing-cost ranking, including Dubai, Moscow, Istanbul, Rio de Janeiro and Mumbai.

Residential costs are relative, with take-home pay a key barometer. The pairing Bloomberg Global City Housing Affordability Index also analyzed the relative ability to put a roof over one’s head in different places. In many cities, particularly in emerging-market economies, home ownership is a pipe dream to most of the populous.

In 15 of the 100-plus municipalities surveyed, the monthly housing cost for units used in the analysis would be at least double an average income. Buenos Aires, Kiev and Mumbai led the "impossible dream" pack.

Beijing and Shanghai also ranked in the hard-to-afford group -- making them the only mega cities in the Top 10 of both the high overall-cost and low-affordability measures.

Silver lining anywhere? Try Dubai. The commerce centre on the Persian Gulf fell 29 spots -- or, rather, rose -- in the affordability ranking. Last year it took 71 per cent of the self-reported average income of just over US$3,300, to get shelter in Dubai. This year’s proportion was 47 per cent.

The only cities where housing was cheaper relative to income than in Dubai were Houston and Riyadh, Saudi Arabia.

METHODOLOGY: The Bloomberg Global City Housing Cost and Affordability Indexes ranked more than 100 global and regional financial centers based on the cost of housing and the cost relative to income. Housing cost was based on four equally-weighted components: the monthly mortgage payment for a 1,000 square-foot residence and monthly rent for a three-bedroom apartment in city centers and suburbs. Calculation of the monthly mortgage payment was based on the assumption that a standard 20 per cent down payment had been met and a 30-year fixed-rate loan applied in all cases. Bloomberg converted and used self-reported data, as of August 31, 2018, from Numbeo.com. Only cities with a minimum of 15 responses for each related metric were included. Caracas, Venezuela, has been excluded from the ranking due to the complex currency situation.