Whenever the supply of a good is limited, there is potential for exuberance.
San Francisco's property market is intertwined with the technology sector: since 2008 there has been a 93% correlation between the monthly movements in the NASDAQ and house-price inflation in its metropolitan area.
Since bottoming out in early 2012, prices in Silicon Valley have risen by 73%, compared with 31% in America as a whole.
To determine whether homes are fairly valued The Economist looks at the relationship between prices and disposable income (an indicator of affordability) and between prices and rents (a substitute for buying a home) .
If rising prices move these ratios above their long-run averages, then either incomes or rents are likely to rise, or house prices to fall.
Across America house prices, after falling by 25% from their peak between 2007 and 2012, are now at fair value compared with rents and incomes.
In San Francisco, too, they are at fair value when compared with rents, but 45% overvalued relative to incomes.
Thanks largely to their big cities, housing appears to be more than 40% overvalued in Australia, Britain and Canada, according to the average of our two measures.
Between 2002 and 2012 the typical London home sold for seven times the city's average annual salary. That figure has since risen to 12 times.
As property developers from Las Vegas to Limerick will attest, when supply does eventually respond to soaring demand, property prices fall.
Restrictive planning laws curb new construction in the area around San Francisco Bay; the narrow peninsula that San Francisco itself occupies compounds the problem.
London suffers from an even more severe planning regime.
Yet housing starts are at a nine-year high in San Francisco.
In London, too, builders are finding a way: construction began on 24,000 new homes in the capital in 2015, the highest rate for ten years.