To calculate the risk factor of a specific market hitting a real estate bubble, experts like Joseph Pingaro look at things like housing price-to-income ratio; home-loan-to-home-value ratio; how the prices shift year-to-year; the percentage of homes that have been flipped; and changes in the percentage of the GDP that mortgages and construction occupy.

Currently, the US market is fairly stable, but some cities are riskier than others. The key to smart real estate investing is doing your research not only on the property you are considering, but also on the surrounding market. Here, we will examine some of the best and worst cities in the United States to invest in.

Cities Most At-Risk of a Real Estate Bubble

New York, NY

New York City is still struggling to recover from the bubble it hit during the last recession. Real estate prices are still 10% lower than they were when they peaked in 2006. Slow economic growth for the city is one factor making homes unaffordable. According to the UBS, the average homeowner must sink more than ten years’ worth of his salary into purchasing a home.

In addition, new rental laws will take effect and the “mansion tax” will increase in 2020, leading to reduced incentive to invest in real estate in NYC. Owners will have more limitations on their ability to increase rent, and investors will have to pay an increased tax rate on homes that cost $2 million dollars or more.

San Francisco, CA

Between 2012 and 2018, average home prices rose from $600,000 to over $1.6 million, and home sales dropped by more than 9%. Homes are becoming less and less affordable to the average worker. Despite the lack of affordable housing, there was a shortage in the supply of housing until recently.

That problem has started to correct itself, with the most housing permits the city has seen since the 1980s. The abundance of supply could drive prices down, and San Francisco may be at risk for market woes in the near future.

Los Angeles, CA

The sunny city of Los Angeles, California has seen home prices increase by 50% since 2012. Just as in San Francisco, homes are becoming less affordable. Even with negative factors accounting for this increase, Los Angeles is not likely to see a sharp or sudden decline in prices.

This is due to the fact that despite the high number of building permits and overpriced homes, the shortage of housing shows no signs of letting up. Supply is low, demand is high, and it looks like this will continue into the future.

Chicago, IL

Chicago is not at risk of hitting a bubble but is worth mentioning because of its problematic market. Chicago’s home prices are still 25% lower than they were in 2006. Even though rental and income growth could keep up with a price increase, investment is likely to stay low due to a number of factors.

People of working age have been moving out of Illinois overall, and Chicago specifically, for the last four years. Property taxes are the highest in the country, and there is a new hike in state income tax as well. Employment opportunities in Chicago are lower than in some other larger cities, and so the long-term investment is less appealing.

Cities Least Likely to Hit a Real Estate Bubble

Despite the market woes of these four cities, most of the United States is still enjoying stable real estate market growth. The country’s most recent real estate bubble burst came in 2008, but the issue then was overinflation of prices in every market.

Prices are steadily on the rise currently, but not due to inflated values. Instead, the market is struggling to bring the supply up to meet the demand, which means steady growth into the foreseeable future. Here are the cities most likely to continue to remain stable even in a recession:

Minneapolis, MN

Minneapolis is not only one of the friendliest metro-areas in the country, but it is also one of the most stable. The regional economy is booming with a robust labor market. The low vacancy rate combined with higher sale prices means that people will continue to prefer to rent their home, making rental property investment in Minneapolis a lucrative endeavor.

Raleigh, NC

Southern states are becoming more popular to live in, and the Raleigh metro-area is no exception. Incomes are slightly higher than the national average, increasing the affordability of higher-priced homes. With a supply shortage, with homes quickly selling close to list price, it is definitely a seller’s market.

Cleveland, OH

Real estate prices have gone up 7.8% in the past year, and are expected to continue to rise. Once thought of as a has-been market, Cleveland is making a comeback with an economy shifting from manufacturing to research and medical industries.

Real estate prices are currently below the national average, but with all of the redevelopment projects underway, you may want to jump on the Cleveland market now, because prices will only continue to rise.

Rochester, NY

Rochester, New York is currently the hottest real estate market in the country. Inventories are low, and the market is being driven by young people. Homes are selling for higher than list price due to the shortage in supply. Added benefits of living in Rochester, are the high quality of life ranking and lower property taxes.