Back in 2014, I thought that the drastic drop in oil prices and energy stocks was the beginning of an excellent opportunity to buy oil and gas stocks. As much as shale had wholly disrupted the traditional market dynamics of supply, I thought that the market would eventually correct for this change, and oil and gas companies would remain a good long-term investment. If we were to judge my call up until today, it would look miserable (and I would understand why people may not want to listen to me ever again).

^SPX Chart

^SPX data by YCharts.

Despite this less-than-stellar performance, I still think that many of the elements underpinning that investment thesis still hold up today, and there are several investment opportunities in the oil and gas industry that could be lucrative for investors over the long haul. Here's why I think that investment has not worked out as initially planned and why I'm still bullish on the industry in general. 

Boy, that escalated quickly

One thing that very few people saw coming was the resilience of shale oil in the United States and how quickly producers were able to lower their operating costs. When the oil downturn began, most companies were generating so-so returns with a barrel of oil still higher than $90. So when the supply glut set in and prices collapsed, the prevailing assumption was that shale drillers would pack up and go home, which would lead to a rapid rise in oil prices.

Instead of seeing the widespread decline in production, a large group of producers tightened their belts and learned to do a lot more with less. In a little under three years, producers have been able to cut their per-barrel costs in half such that they can break even around $50 a barrel. Even more surprising is that production costs for other seemingly expensive sources -- offshore and oil sands -- have come down as well. 

Couple that with OPEC's decision in 2014 and 2015 to maintain production, as well as several long-lead-time development projects coming to fruition, and we had a recipe for low oil prices lasting much longer than many investors and so-called industry experts had initially anticipated. We are now approaching the fourth year of oil prices remaining well below the $100 mark that became commonplace after the Great Recession.

stock index superimposed over offshore oil platform

Image source: Getty Images.

We have seen a version of this before

For many investors, this long-term trend of lower oil prices doesn't provide a great backdrop for any investment in this industry, but it's worth keeping things in perspective here. This lull in oil prices isn't that different from what we saw in the early 1980s, when the oil market faced a similar situation. A new oil source -- offshore -- had become commercially feasible and the cost to develop that source rapidly declined, therefore opening up billions of barrels of new sources at lower costs. 

One important thing to note here is that, except for a 1990 Gulf War price spike, the price of a barrel of oil trended downward from 1980 to 1998. And yet investing in oil and gas during this time frame generated comparable returns to the broader market.

XOM Total Return Price Chart

XOM Total Return Price data by YCharts.

There is an essential lesson here about investing in oil and gas stocks. It's not the price of oil that matters as much as the cost at which a company can produce that oil. It's entirely possible that we could be in another decade-long, or longer, swoon in oil prices from their highs in 2013-2014, but many of the producing companies out there today have said in various presentations and on management calls that they are very comfortable with oil in the $60 range, with some even touting higher rates of return today than when oil prices were much higher. 

Despite signs from management that they have adjusted their businesses to the current oil price environment, Wall Street is still assigning historically low valuations to these companies. On a price-to-tangible-book basis, shares of ExxonMobil are valued at their lowest levels in over 30 years. By no means is ExxonMobil a complete representation of the oil and gas industry, but it acts as a decent proxy for the long-term trends of investing in this industry. 

XOM Price to Tangible Book Value Chart

XOM Price to Tangible Book Value data by YCharts.

Is this time different, though?

Just like in matters of the heart, the term "this time it's different" rarely bodes well for an investment thesis. History doesn't repeat itself, but it does tend to follow a rather strict rhyming pattern. That doesn't mean we can completely ignore some of the things that have changed over the past few years, though. 

There are probably two factors that concern oil and gas investors more than anything else: how shale oil and gas change conventional market dynamics, and the growing presence of alternative energy in markets that have been dominated by fossil fuels for years. 

Like prior technological developments in the oil and gas industry, making shale a commercially viable source of oil has unlocked lots of new resources we can access at relatively low prices. That isn't any different than any other tech breakthrough in this industry over the past century. The one thing that is different, though, is the speed at which we can develop shale relative to other sources. 

offshore oil platform at sunset.

Image source: Getty Images.

Traditionally, a newly discovered oil and gas reservoir will take years to develop -- that's especially true for offshore discoveries. Some of the major offshore projects in the U.S. Gulf of Mexico that have just recently produced first oil were discovered as early as the 1990s. The long lead time for these kinds of projects has been the modus operandi of the industry for decades. 

Shale is a completely different story because of how fast a new well can go live. In some parts of the U.S. where robust transportation and logistics networks are already in place, a company can go from a prospective location to a completed, producing well in a matter of weeks. It's also worth mentioning that shale wells have a much shorter shelf life than conventional or offshore wells. It's not uncommon for a shale well's overall production to decline by 50% or more in its first year of operation, whereas decline rates for conventional production sources are in the single digits.

What this means is that production from shale can respond to changes in oil prices much more rapidly. We've seen this phenomenon in action already. Oil prices started to decline in the middle of 2014, and within six months, oil production in the U.S. plateaued and started to decline. Likewise, once producers made the necessary cost cuts and oil prices climbed back to the $50-a-barrel range by mid-2016, it only took six months for production to start increasing again. Were it not for speed of shale production, that kind of supply response would not be possible. 

US Crude Oil Production Chart

US Crude Oil Production data by YCharts.

This trend isn't necessarily a good or bad thing for the oil industry as a whole, but it could change the way oil prices move over time. A production source that can rapidly respond to price drops or spikes has the potential to smooth out some of the price volatility we've become accustomed to in this industry. Also, since shale has become a much cheaper source, it should help reduce the risk of hitting extremely high oil prices for some time.

It's no surprise, then, that many of the integrated oil and gas companies have been making their long-term capital allocation decisions based on oil prices remaining in the $60- to $80-a-barrel range as far out as a decade from now.

At the same time, shale is still a small percentage of global oil production -- somewhere around 5%. The rest of the world's oil supply plays by the same rules we have known for decades. 

The other looming threat for oil and gas comes from another area with rapidly declining costs: alternative energy sources and energy storage. According to financial advisory firm Lazard's most recent "Levelized Cost of Energy" study, the costs of solar and wind projects have declined 86% and 67%, respectively, over the past decade. Similarly, the firm projects lithium-ion battery storage costs to drop 10% annually over the next five years.

The decline in costs for these energy sources is happening at a much faster rate than many had anticipated. As a result, we're likely going to see a speedier deployment of alternatives in both electricity generation and electric vehicles. The possibility of this is real, and some oil executives admit it is going to happen fast. The CEOs of both Total and Royal Dutch Shell anticipate that electric vehicles will account for 30% or more of all vehicle sales by 2030. 

It's easy to see how this development could completely blow up a long-term investment thesis in oil and gas, but there are a couple of things to keep in mind here. While electric vehicles have an opportunity to capture considerable market share, it is estimated that they will make up 30% of new-vehicle sales 12 years from now. Considering that the average life span of a vehicle today is about 11.4 years, that leaves a lot of internal-combustion vehicles on the road for at least 20 years. It's also worth noting that demand for other petroleum-based products such as petrochemicals and jet fuel is likely to remain robust. Jet fuel demand is expected to double between now and 2050, and fossil fuel consumption for petrochemical production is slated to grow by one-third by 2025.

So alternative vehicles may be a long-term threat, but it looks like there is at least a decade-long window, or longer, to make a good return on oil and gas investments. It also gives the larger companies time to invest in their non-fossil fuel segments.

What a Fool believes

Even though my 2015 prediction has yet to pan out, I still think there are ample investment opportunities among oil and gas stocks. Valuations are low, both relative to the overall market and by most historical measures, and we have seen how major changes to the supply dynamic play out over time

Eventually, the rise of alternative energy sources will lower demand for fossil fuels so much that many oil and gas investments will look like coal stocks today. That said, there is at least a decade of robust returns to be had in this industry -- that's hard to turn down. For investors looking to make some value investments today, oil and gas looks like the market where you should go looking.