Two treacherous forces, with impeccable timing.

In the city of San Francisco, the median condo price is $1.11 million and the median house price is $1.25 million, up 72% and 88% respectively from the first quarter 2012. Median means, 50% of the units cost more, and 50% cost less.

Which creates an absurd situation: only 11% of the households in San Francisco can afford to buy a median home, according to Paragon Real Estate’s report on “affordability.” In other Bay Area counties, it’s similar. In the Silicon Valley counties of San Mateo and Santa Clara, 14% and 20% of the households can afford a median home; in Marin (just north of the Golden Gate), 17%; in Napa 21%, Alameda (East Bay) 22%, Sonoma 26%. In the US overall, 58% can.

But the calculations assume that buyers are able to make a 20% down-payment, which on a median home in SF amounts to $240,000. And it also assumes the persistence of super-low interest rates and points for a 30-year mortgage.

Under these assumptions, households in SF wanting to buy that median home must have a minimum qualifying annual household income of $254,000, on top of the $240k in cash for the down-payment. And this is where the absurdity re-surfaces: the Census Bureau estimates that the median household income in San Francisco is $75,600 (it has gone up a little since that estimate).

The monthly costs – principal, interest, taxes, and insurance, but not including the benefits of income tax deductions – for this median home amount to $6,350. And this causes a little bit of a problem with “affordability”: If only 11% of the households can afford to buy a median home, who is going to buy the other homes?

Renting a median one-bedroom apartment will set you back $3,400 a month, parking not necessarily included. And a median two-bedroom will set you back $4,650 a month.

But kinks are already appearing. According to Zillow data, those rents are down 5.4% from the respective peaks in June and August last year. And just then, with impeccable timing, this housing market is now facing by two powerful forces.

1. The startup boom has run aground.

Startup valuations are plunging, sometimes by as much as 50% overnight when new money needs to be raised. And the exit doors for investors are closing or getting very awkward to wriggle through. It’s easy during the boom for a few people behind closed doors to decide that a company with no revenues has a $1 billion “valuation.” Turns out, it’s much harder – or impossible – to turn that “valuation” into money via an IPO or a sale to a big corporation.

Those startups that did make it through the IPO window over the past year or two are getting punished. While the S&P 500 is down only 5.6% so far this year, the Renaissance US IPO index is down 13.7% despite the rally over the past few days. It has plunged 29% from June last year. The 87 tech IPOs over the past two years have gotten hit hard: 80% are trading below their IPO price, and many of the stocks have essentially collapsed from their peaks.

Venture capital is getting nervous. And the flood of new money has become a trickle. As money dries up, startups have to tighten their belts and lower their burn rates in order to live another day. In the process, big hiring plans are shelved.

The formerly rosy scenario has turned grim. Companies like Twitter fell all over each other to lure tech gurus with blue-sky compensation packages that then allowed these folks to rent or buy whatever they wanted to, and drive up prices in the process. Now Twitter is laying off people.

Yahoo is laying off. Numerous other old and new companies in the area have started the same process. This makes laid-off tech workers available to companies that are still hiring. Those companies no longer have to bring as many new people into the area; they can hire more locally.

So the stream of new arrivals with big compensation packages slows down. As more companies are laying off, fewer of the tech workers can be absorbed locally. Down the road, given the expense of living in the area, some of these unemployed tech workers may well go back where they came from. That’s how it happened every time before.

2. Just then, a flood of new housing units hits the market.

San Francisco finds itself in one of its most phenomenal construction booms in history. High prices have lured the Big Money from all over the world. For example, Shenzhen-listed real estate company Oceanwide Holdings is planning to build a mega project with two million square feet of residential and commercial space in the center of the City. This project, its third in California, includes two towers, one of which will be the second tallest in the City.

The SF Planning Department’s new Pipeline Report lists 62,500 units at various stages in the pipeline, from “building permit filed” to “under construction.” Many will come on the market this year, on top of the thousands of units that hit the market in 2014 and 2015. Once they’re complete – if they ever get completed – they’ll increase the city’s existing housing stock of 382,000 units by over 16%.

Most of them are expensive units – because that’s where the money is. They need buyers and renters who can afford them. Homes in San Francisco are occupied on average by 2.2 people. At this ratio, the new supply would create expensive housing for 137,500 people, in a city with a population of 852,000!

Where are those people with big incomes going to come from? No one knows. Hence a vague sense of panic. Twitter and other companies better start re-hiring and offer big-fat compensation packages to lure tens of thousand of highly-paid workers to SF, and they better make sure their shares or “valuations” start re-skyrocketing for years to come, because that sort of miracle is required to make this math work. If not, that phenomenal boom, as it has always done before, will turn into a bust royale.

The US economy, at the worst possible time, is now facing a “significant risk” of “falling into contraction” with “worse to come.” Read… Is This the Beginning of the Next Recession?

Enjoy reading WOLF STREET and want to support it? Using ad blockers – I totally get why – but want to support the site? You can donate. I appreciate it immensely. Click on the beer and iced-tea mug to find out how:

Would you like to be notified via email when WOLF STREET publishes a new article? Sign up here.