Weidner Apartment Homes had a strategy, and they stuck to it, with great results.

For decades, the biggest apartment owner you never heard of (the nation’s 29th largest) followed the gas and oil pipeline starting in Midland-Odessa, Texas and snaking up through Canada, reaching all the way to Alaska.

It seemed like a bullet-proof strategy, especially when oil was selling for more than $100 a barrel. In fact, as late as 2014, energy markets still seemed like no-brainers, even as the price of oil continued its descent.

Related—one of the nation’s savviest, though not entirely risk-averse, investors (see the condo market in Miami)—acquired a 3,000-unit portfolio of 21 properties in and around Midland-Odessa from Orion Residential in 2014. The market had a 97% occupancy rate then, but not for long.

Today median rents in Midland for a one-bedroom are at $1,110—the lowest since January 2013—down from $1,340 a month in December 2014, according to ApartmentList.com. About a quarter, 24.3%, of its economy is tied directly to oil, the highest concentration in the nation, according to a recent analysis from Fannie Mae.

Kudos, Orion, for cashing-out just in time.

Meanwhile, Weidner seems to have seen the drop coming from a mile away, and quickly sought to diversify. It went on a buying spree coming out of the recession, in which it scooped up many distressed, but still gleaming, assets at bargain-basement prices.

Ascierto, Jerry

In the process, it became one of the largest owners in markets like Phoenix, one of the hardest hit areas during the recession, littered with tantalizing half-completed condo communities.

But the fallacy of a gold-rush mentality can be clearly seen in Williston, N.D.—the nation’s fastest-growing city since 2010—where fracking turned no town into a boom town into a ghost town. There are some nice new distressed assets for sale there, but lease-up could be a problem.

“With an extended period of low oil prices, the Williston metro area and the entire state could fall into a recession,” warned Kim Betancourt, director of economics in Fannie Mae’s multifamily division, in a recent report.

Energy City

Midland, Odessa, and Williston are just three small examples of exuberance turned on its head—though in the former cases, it paid off for years.

But then, there’s the sprawling metropolis of Houston, our nation’s fourth-biggest city. Sure, its economy is more diverse than it was back in, say 1981, when the U.S. oil rig count reached an all-time high of 4,530.

Even so, today, that figure has literally been decimated, reaching an all-time low of just 415 rigs in mid-May, and falling. And that has had quite an effect on the city’s multifamily prospects.

“Houston is headed for a slowdown, no doubt about it,” said Betancourt. “With the anticipated slowing down of job growth, there is likely to be a short-term oversupply of units over the next 12 to 24 months.”

Houston’s vacancy rate in the 2014-2015 timeframe was just 5.8%, while its rent growth was a healthy 4.7%, according to Reis. But in a recent commentary, Freddie Mac economist Steve Guggenmos forecasted a best-case scenario of a 7.8% vacancy rate, and a worst-case rent growth metric of negative-2.2%, over the next two years in Energy City.

“That’s one market I’m a little worried about, we’ve seen some softness there,” said Mark Alfieri, president and CEO of Plano, Texas-based Monogram Residential Trust, said when asked which markets its most concerned about.

Ascierto, Jerry

Here’s what Freddie Mac’s Guggenmos had to say:

“ … developers are reacting to the slowing economy. For example, Camden Property Trust has announced recently that it will delay the development of a 550-unit luxury apartment development in downtown Houston; just one of many examples of delayed property development.

Furthermore, the number of multifamily permits in the second half of 2015 was 40 percent lower than the prior year and the lowest since 2012 for the same period … “

All of which is to say that the long view is the only view, if you can train your sites on a deeper horizon. The best investors know how to transcend the investment prejudices of their time and anticipate rather than react, extrapolate rather than follow the leader.

Meanwhile, a local developer in Sparks, Nev. just purchased a casino to turn into housing—a 15-minute drive away from Tesla’s Gigafactory. And in nearby Reno, about 1,100 units are under way.