Oil is a commodity prone to large, and often rapid, price swings. The painful drop during the early days of the coronavirus pandemic, for example, has been rapidly replaced by a massive price spike. The trend isn't unusual, though each swing does have its own story. And yet, even though oil is at a peak today, there are still some great long-term opportunities here for investors to consider, including TotalEnergies (TTE 1.72%), Shell (SHEL 1.46%), and Enterprise Products Partners (EPD 1.41%).

1. Putting cash to work for investors

When the pandemic hit, TotalEnergies stated very clearly that it would support its dividend so long as oil remained above $40 a barrel. It was the only integrated oil major to make such a bold statement. In fact, some of its peers chose to cut their dividends. 

An oil well with wind turbines in the background.

Image source: Getty Images.

That said, there's an important caveat here. The dividend cuts at companies like Shell and BP were coupled with pivots toward clean energy. The logic being that the cash freed up from the dividend cuts would be used to pay for investments in things like solar and wind power. TotalEnergies said it could both support its dividend and invest in clean energy. With oil prices now back over $100 a barrel, TotalEnergies looks like it is actually speeding up its investment in noncarbon energy options. It also increased its dividend 5% this year, so investors haven't given up dividend growth here.

TotalEnegies' dividend yield, meanwhile, is a generous 4.7%. That's toward the high end of the peer group. Investors looking for a high-yield oil name that's shifting along with the energy market would do well to take a closer look. That said, TotalEnergies is French, so U.S. investors need to pay foreign taxes on the dividends, though you can claw some of that back when you file taxes.

2. Getting back on track

As noted, Shell cut its dividend in 2020 as it announced a pivot toward clean energy. However, a key part of the plan was to quickly return to dividend growth. Management has lived up to that pledge, enacting several dividend hikes since the 2020 cut. The cut dropped the quarterly payment from $0.47 per share to $0.16. As of the first quarter of 2022, it was up to $0.25 per share. Clearly that's nowhere near where it once was, but management is also clearly focused on living up to its promise. In fact, the dividend has increased an impressive 56% in just two years!

The current dividend yield is around 3%. That's not huge and is, in fact, at the low end of the oil major peer group. However, the dividend growth has been way above the group and, given the drastic cut, it could remain elevated for a little while longer. That should entice those with a dividend growth bent that want to get in on the oil space. But the really exciting thing here is that Shell, like TotalEnergies, is putting a fair amount of cash to work investing in the cleaner future of energy. That means clean alternatives like solar and wind power, among other things. Shell is foreign as well, so U.S. investors will need to pay foreign taxes on the dividends.

The big takeaway, however, is that Shell is using the cash windfall from high oil prices to both expand beyond oil and to reward investors with a return to dividend growth. 

3. Forget about energy prices

So far we've looked at two oil and gas producers that have top and bottom lines tied to often volatile commodity swings. Master limited partnership (MLP) Enterprise Products Partners sidesteps this complication by operating a massive midstream portfolio. Essentially, it owns the pipes, storage, processing, and transportation assets that move oil from where it is drilled to where it is consumed globally. This is a largely fee-based business, so demand is more important than the price of oil or natural gas. 

Right now, the distribution yield on offer from Enterprise is a hefty 6.6%. That payment, meanwhile, has been increased annually for 23 consecutive years. The hikes of late have been modest, so don't expect Shell-like growth in the payout. But if slow and steady is fine with you, then Enterprise is an energy name worth a closer look.

That said, it isn't being nearly as aggressive in the clean-energy space as TotalEnergies or Shell. But carbon fuels are expected to remain an important part of the world's energy pie for decades to come, so this isn't inherently a bad thing. You just need to understand the broader dynamics -- a still-growing world population will need an "all of the above" approach that suggests a rapid clean energy shift is highly unlikely. Thus, demand for Enterprise's pipes should remain robust for longer.

There are plenty of options 

Oil prices may have taken off, but that doesn't mean you can't find solid long-term investment ideas in the oil patch. You just have to go in with a different mindset. TotalEnergies is a high-yield energy transition play using today's lofty energy prices to further its clean-energy diversification plans. Shell is working in a similar direction, but its dividend cut has left it with a lower yield and faster-growing dividend. Enterprise sidesteps all of that with a fee-based portfolio that will likely keep throwing off cash for years to come.