When the cyclical nature of the economy does bring a recession, it shouldn't come with a housing crash like in 2008. Still, many cities will be negatively affected, the only questions being which ones and by how much.

"Home prices are high right now, but they're high because there's not enough supply to meet demand, which means there's not a bubble at risk of bursting," Daryl Fairweather, Redfin chief economist, said in a press release. "Most of today's financed homeowners have excellent credit and a cushion of home equity, making them unlikely to default on their mortgage even if their weekly grocery bill grows or their stock portfolio shrinks in the next recession."

Certain metro areas will see falling prices and an oversaturation of homes for sale. Those facing the highest risk tend to be the ones with the higher investor and flipping activity. Others will be relatively safe by comparison, with minimal effects on values.

"If the U.S. enters a recession in the next two years, it will likely be caused by the global trade war. U.S. industries that rely on exports, like the automotive industry and the agricultural industry, would be the most vulnerable and susceptible to layoffs," Fairweather continued. "Homeowners who are laid off may not be able to continue covering their monthly mortgage payment and may be forced to sell their homes. And would-be homebuyers won't feel so confident about making a big purchase when they don't feel confident about their job security or their financial wellbeing. That could cause declines in home prices in markets whose economy depends on global trade, but home prices nationwide are likely to hold steady."

From the tech hub of San Francisco to upstate New York, here's a look at the top 15 housing markets providing the safest harbors in the case of an economic downturn, according to Redfin.

For the analysis, Redfin weighed seven factors: Median home sale price-to-household income ratio, average loan-to-value ratio of recently purchased homes, home price volatility, share of home sales that are flips, diversity of local employment, share of the local economy dependent on exports, and share of local households headed by someone age 65 or older.
NMN09092019-Redfin.png
No. 15 San Francisco, Calif.
Overall risk score: 42.9%
Home price volatility: 16.6%
Home sale price-to-income ratio: 15.1
NMN020718-san-francisco.jpg
No. 14 Kansas City, Mo.
Overall risk score: 42.5%
Home price volatility: 13.8%
Home sale price-to-income ratio: 1.9
NMN121918-kansas-city.jpeg
No. 13 Oklahoma City, Okla.
Overall risk score: 41.7%
Home price volatility: 13.8%
Home sale price-to-income ratio: 3.3
NMN021219-oklahoma-city.jpg
No. 12 Denver Colo.
Overall risk score: 41.5%
Home price volatility: 10.4%
Home sale price-to-income ratio: 5.8
NMN052218-denver.jpg
No. 11 Philadelphia, Pa.
Overall risk score: 41.4%
Home price volatility: 13.9%
Home sale price-to-income ratio: 4.8
NMN022118-philadelphia.jpg
No. 10 Minneapolis, Minn.
Overall risk score: 40.8%
Home price volatility: 13.6%
Home sale price-to-income ratio: 3.8
NMN053018-minneapolis.jpg
No. 9 New Orleans, La.
Overall risk score: 40.6%
Home price volatility: 9.1%
Home sale price-to-income ratio: 4.4
NMN092517-12-neworleans.jpg
No. 8 Milwaukee, Wis.
Overall risk score: 40.4%
Home price volatility: 15.1%
Home sale price-to-income ratio: 3.8
p18rpmvqn0kfr1nl219st14nh1cocf.jpg
No. 7 Columbus, Ohio
Overall risk score: 38.3%
Home price volatility: 10.9%
Home sale price-to-income ratio: 3.6
NMN051018-columbus.jpg
No. 6 Chicago, Ill.
Overall risk score: 37.9%
Home price volatility: 13.2%
Home sale price-to-income ratio: 3.8
p183nvb545g586cd1lhk121616rgc.jpg
No. 5 Raleigh, N.C.
Overall risk score: 35.2%
Home price volatility: 12.1%
Home sale price-to-income ratio: 4.2
NMN021219-raleigh.jpg
No. 4 Cleveland, Ohio
Overall risk score: 34.6%
Home price volatility: 10.9%
Home sale price-to-income ratio: 3
NMN053018-cleveland.jpg
No. 3 Hartford, Conn.
Overall risk score: 33.9%
Home price volatility: 13.1
Home sale price-to-income ratio: 3
NMN031119-Hartford.jpg
No. 2 Buffalo, N.Y.
Overall risk score: 31.9%
Home price volatility: 10.4%
Home sale price-to-income ratio: 2.8
NMN121918-buffalo.jpeg
No. 1 Rochester, N.Y.
Overall risk score: 30.4%
Home price volatility: 11.7%
Home sale price-to-income ratio: 2.6
NMN082817-rochester.jpg
MORE FROM NATIONAL MORTGAGE NEWS