When you think expensive major American metro housing markets, you think San Francisco and New York right off the bat. Maybe Washington D.C. if you’re into that sort of thing.

But according to the New Yorker (it’s the financial page so it’s not a waste of time and it’s credible, ZING!), the single most expensive housing market in North America is not a major market and it’s not “technically” in America but rather America’s attic, Canada.

More specifically, it’s Vancouver, British Columbia.

Now, Vancouver is a beautiful city…but nothing about its economy explains why—in a city where the median income is only around seventy grand—single-family houses now sell for close to a million dollars apiece and ordinary condos go for five or six hundred thousand dollars.

When price-to-income or price-to-rent ratios get out of whack, it’s often a sign of a housing bubble. But the story in Vancouver is more interesting. Almost by chance, the city has found itself at the heart of one of the biggest trends of the past two decades—the rise of a truly global market in real estate.

Investor money is flooding the United States – in real estate, in bonds, in Treasurys. (Russians oligarchs and officials are buying up American paper despite the Ukrainian turmoil and sanctions, laundering their investments through “Belgium.”) Arab petro sheiks, Chinese “industrialists” and Latin American investors are still pouring money into North America, and a lot into real estate.

The annual survey of members of the Association of Foreign Investors in Real Estate showed that foreign investors think the United States is the most "stable and secure" country for real-estate investment "by a wide margin."

Survey respondents also said that the United States is also the best market in terms of capital appreciation and for real estate purchases in 2014.

A recent report by Sotheby’s International Realty Canada examined more than twelve hundred luxury-home sales in Vancouver in the first half of 2013 and found that foreign buyers accounted for nearly half of sales, the New Yorker reported.

What’s so special about the places that attract all this foreign money? You’ve heard of Edge Cities – Vancouver is a "hedge city."

The economists Joseph Gyourko, Christopher Mayer, and Todd Sinai have developed a theory about what they call “superstar cities.” Looking at data from 1950 to 2000, they found a small number of cities where housing prices rose steeply, and concluded that high earners tended to cluster together over time, with the result that rich cities tend to get richer.

Vancouver isn’t an obvious superstar. It’s not home to a major industry—as New York and London are to finance, or San Francisco to tech—and it doesn’t have the cultural cachet of Paris or Milan. Instead, Vancouver’s appeal consists of comfort and security, making it what Andy Yan calls a “hedge city.” “What hedge cities offer is social and political stability, and, in the case of Vancouver, it also offers long-term protection against climate change,” he said. “There are now rich people around the world who are looking for places where they can park some of their cash and feel safe about it.” A recent paper by two Oxford economists bears this out, showing a tight correlation between London house prices and turmoil in southern and Eastern Europe. The real-estate boom in Miami has been magnified by political unrest in Venezuela. And Vancouver, which has a large Chinese population, easy access to the Pacific Rim, and nice weather, has become a magnet for Chinese investors looking for insurance against uncertainty. A Conference Board of Canada report found that Vancouver’s real-estate market is tightly connected to what happens in the Chinese economy.

Local fundamentals rule, and a healthy portion of investor activity is good for the housing market most anyplace.

While there are positive effects from investor activity, it also has the same effect on housing as a when a car runs over a bicycle tire. Vancover needs only to look south for examples of the impact of foreign investment.

Home prices have nearly recovered in most markets from the real estate crash. Home prices in the United States are just 12.8% off the 2006 peak, according to the comprehensive March home price index report from Black Knight Financial Services.

But those price increases are being driven by cash investors (foreign investors, arguably) and institutional buyers, which are still accounting for almost half of all home sales. This is hurting traditional buyers, who have seen income stagnate over the past four decades.

More than four in 10 residential property sales in the first quarter this year were all-cash sales, the highest level since RealtyTrac began tracking all-cash purchases in the first quarter of 2011.

And institutional investors — entities that have purchased at least 10 properties in a calendar year — accounted for 5.6% of all U.S. residential sales in the first quarter.

RealtyTrac says that the biggest annual increase in share of institutional investor purchases were Baton Rouge, La., (up 131%), San Francisco (up 92%), McAllen, Texas (up 62%), Allentown, Pa., (up 49%), and Omaha, Neb., (up 49%) – at least three of those could be considered “hedge cities.”

“Institutional investors have bought up much of the affordable inventory they are traditionally interested in, which explains the decrease in institutional investor sales,” said Chris Pollinger, senior vice president of sales at First Team Real Estate, covering the Southern California market.  “We are seeing a rise in foreign buyers purchasing high-end homes, which is contributing to the rise in all-cash purchases.”

Anthony Sanders, distinguished professor of real estate finance at George Mason University, sums up the problem by taking a step back from the details and letting mortgage rates rise naturally, which they haven’t.

“The problem remains a slow recovery for the middle class in terms of employment and income,” Sanders said. “Of course, The Fed could speed up tapering and allow rates to rise (cutting off cheap funding sources to investors). As it stands, house prices are rising while affordability for the middle class is shrinking.”

The problem too much foreign investor action creates is self-evident, or it should be.

If there are enough rich people in China who want property in Vancouver, prices can float out of reach of the people who actually live and work there. So just because prices look out of whack doesn’t necessarily mean there’s a bubble. Instead, wealthy foreigners are rationally overpaying, in order to protect themselves against risk at home. And the possibility of losing a little money if prices subside won’t deter them.

The challenge for Vancouver and cities like it is that foreign investment isn’t an unalloyed good. It’s great for existing homeowners, who see the value of their homes rise, and for the city’s tax revenues. But it also makes owning a home impossible for much of the city’s population. And the tendency of foreign buyers not to inhabit investment properties raises the spectre of what Yan has called “zombie neighborhoods.” A recent study he did found that a quarter of the condos in a luxury neighborhood called Coal Harbour were vacant on census day.

Of course. Zombies. Why did it have to be zombies?