The oil industry is in the midst of a downturn, with the stocks of U.S. exploration and production (E&P) companies largely underperforming the broad U.S. stock market. While the industry copes with a current volatility as well as the massive shifts on the supply side brought on by horizontal drilling and hydraulic fracturing, or fracking, investors have largely walked away. But the need for oil will continue as global demand increases, especially from emerging markets.

So, what should investors do?

Understand the changing economics of the industry. Identify individual companies that have realigned their corporate strategy to the structural shift in the industry.

And be patient.

Yesterday’s Oil Industry

Prior to the shale revolution, the market’s concern was peak oil and reserve replacement. Companies would access ever more challenging reservoirs in a drive to capture “dwindling” resources.

Companies created value by buying land cheaply and—with teams of geologists and some luck—struck oil. Companies constantly had to find new resources as the inventory of future well locations was relatively limited.

Reining in spending wasn’t an issue because of the pressure to find new reserves. In fact, E&P companies routinely outspent their operating cash flows. Rising oil prices only helped to reinforce the sense of urgency to bring on new supplies.

Today’s Oil Industry

As the industry has moved from resource scarcity to resource abundance with the advent of shale, energy companies are being forced to change their business model. For example, they can no longer spend 100 percent—or more—of their cash flows.

And chasing new inventory isn’t the primary focus anymore. Companies now have decades of inventory of repeatable locations on their acreage, making them resource rich.

Instead, their challenge is figuring out how to maximize the monetary value of the resources they have. A unique feature of shale oil is its high decline rate, meaning the rate of oil production from a specific well that starts out high but falls very quickly in the first year of a well’s life. The industry’s average natural decline rate is about 6 percent on a global basis. But production from a well drilled in shale can decrease dramatically, falling about 60 to 70 percent in the first year.

The Bottom Falls Out

In the midst of these shifts, the global oil industry is in flux. In 2018, WTI crude oil peaked at $75 per barrel in the third quarter. But in the fourth quarter, it dropped to $42. Today, it’s at $59.

There were two basic causes: Slower drop-off in Iranian exports in the face of rising Saudi/OPEC production and rising production of oil in the United States.

Anticipating that more than two million barrels of oil from Iran would drop out of the market, Saudi Arabia and other OPEC members ramped up production. But then the Trump administration granted waivers to countries that allowed some to continue importing Iranian oil. That meant oil production was higher than anticipated when Saudi/OPEC and Russia increased production in 2018.

At the same time, U.S. oil production increased more than anticipated in the second half of the year.

The result? Crude prices dropped.

The price pressure continued into late December as Russia and OPEC reversed course and cut production. Meanwhile, Venezuelan and Iranian production continued to decline.

The Investor Mindset

While U.S. E&P companies are working to re-engineer themselves, the general sentiment in the market is bearish. Putting aside the oil industry’s extreme cyclicality, the companies to look at today are those that have been able to develop an efficient business model that allows them to monetize their resources over 30+ years. It means finding the right corporate structure, balance sheet and free cash flow ratios. The ones that can show good profit margins, solid returns on capital and free cash flow generation are likely to attract investor interest.

As we wrapped up the fourth quarter 2018 earnings season, a number of companies have announced spending cuts in favor of cash generation. In general, these companies have highly economic resources and are shifting to balance the pace of development with cash generation priorities.

Merger and acquisition activity in the sector could also renew investor interest. It’s possible the market could see one or two large deals with the major integrated oil companies looking to expand their footprint in the Permian basin, an oil-rich area in western Texas and southeastern New Mexico. This is the first time in four years where the multiples for the major players are on par with or even higher than the large-cap E&Ps while their business plans have moved to prioritize the Permian basin.

Dimitry Dayen is senior research analyst for energy at ClearBridge Investments, a subsidiary of Legg Mason.