Since late 2014, oil prices have been steadily falling. While that makes US drivers very happy, plunging prices can deliver a hit to the recovering real estate market in areas where the oil industry has a high profile.

US oil prices are now dropping below $200 a barrel, down from over twice that a year or so ago. But Big Oil flourishes when prices are high. That means more investment toward production, more workers, more money filtering out into the local economies of areas like Houston and Tulsa where oil production is a longstanding and well-established part of the landscape.

A recent report from Forbes points out that in oil dependent areas of the country, there’s a correlation between housing prices and oil prices. An oil boom, with high prices and lots of demand, means an economic boost for the local economies hosting the oil companies. When oil is riding high, more jobs open up, so workers move in and buy homes. They help keep the local economy humming and all goes well – until the cycle of boom and bust turns to bust.

The drop in prices means less profit for the local oil industry. That leads to layoffs, and the workers brought in to support a boom may start looking for work elsewhere. The houses snapped up by those workers who moved into the area specifically for work hit the market – often for prices far lower than their original ones. There may be a time lag between the decline in oil and the drop in housing prices, but the trend can be tracked in cities both large and small.

The slowdown in oil production in a slump period also has an impact in various other areas including education, manufacturing and retail sales. Oil companies hire directly but also need support from local businesses and manufacturers, all of which may suffer if the industry falls into a down period.

That impact isn’t always felt in the same way. Large industrial areas like Houston, Bakersfield and Tulsa have other kinds of manufacturing and businesses to keep the economy afloat if the local oil company hits a slow patch. Workers who relocated for the job may not have to leave the area to find new work. And the housing market doesn’t have to falter due to sudden sales and falling prices.

In smaller towns where oil production makes up a major part of the local economy, things may be different, though. An oil boom can inject much needed new life into a stagnant economy – and a slowdown can deliver a major blow to the area’s economic health.

That’s what happened to Williston, North Dakota. According to Forbes, this small city got a major boost in 2010 when Big Oil came to town. New drilling brought new workers for the company on all levels, more demand for housing, and more money for local businesses and institutions.

Over the course of the next five years, oil production would account for a third of the jobs in Williston and a major source of revenue for just about every business in town. But when the boom was over, and prices fell, the whole town suffered. Without oil company jobs and nothing to replace them, workers moved on to greener pastures. Williston’s entire economy faltered as small businesses failed and housing prices fell.

The connection between oil and the housing market points up the many ways a local housing market can be affected by the larger context of its economy. The boom and bust cycle of oil production isn’t all that different from the ups and downs of any other industry. And when that industry props up an entire community, a down period can be devastating.

The kind of situation Williston is facing points up one of Jason Hartman’s key commandments for real estate investors: Thou shalt diversify. Diversifying your real estate investments over as many different areas as possible creates a hedge against scenarios like Williston.

Communities with a diverse and thriving local economy offer the best chance for investing success. And if a crash does happen in one area, the investor with a diverse portfolio of properties won’t lose all.

Oil and real estate do mix – and their relationship illustrates a bigger lesson about market conditions and the risky business of putting all investing eggs in one basket. (Featured image:Flickr/cliftonsteele)

Read more from Jason Hartman:

Zillow Zetimate May Not Get You Very Far

Tech Expert’s Proposal: Self-Driving Cars

The Jason Hartman Team

Creating Wealth Show logo 2015