Investing is complicated, and while it would be nice to say a stock is a screaming buy, those situations are actually few and far between. So what should you make of an industry-leading energy stock like ExxonMobil (XOM 0.39%) today? Here's a look at whether it's a buy, sell, or hold -- and why.

A quick overview

Exxon is one of the largest integrated energy companies on planet Earth, with a massive $470 billion market capitalization. Its diversified business spans from upstream (drilling) through midstream (pipelines) and all the way to downstream (refining and chemicals).

This provides an inherent balance, since downstream businesses tend to benefit from lower costs for their oil and natural gas feedstocks just when upstream businesses are seeing lower revenue from these same commodities. 

Furthermore, Exxon has a rock-solid balance sheet that it uses during bad times to support its business and dividend-paying ability (the debt-to-equity ratio is a very modest 0.2 today). The dividend, for reference, has been increased annually for four decades and counting. That's pretty impressive given the inherently cyclical nature of the energy sector, which is prone to swift and dramatic price moves in both directions.

Basically, Exxon is prepared to ride the industry's highs and lows while continuing to reward investors through the cycle. From a big-picture perspective, it is a highly attractive energy stock. But that doesn't really mean it is a buy, sell, or hold today. There are other factors you need to consider.

Buy it!

Here's the thing: Oil prices plunged during the pandemic and have since rebounded. In fact, 2022 was a huge year for Exxon and its peers, with the company more than doubling earnings year over year. The stock has reacted as you would expect and has risen nearly 200% over the past three years.

XOM Chart

XOM data by YCharts.

And yet the energy industry is highly cyclical, so a downturn is going to happen at some point in the future. If you are an investor looking to enter the energy sector today, it would make logical sense to err on the side of caution and buy a diversified industry giant with the financial strength to muddle through the next weak patch in the oil patch. On that score, Exxon looks like a good choice even today.

Sell it!

Note that "even today" is an important qualifier because the stock has had a very good run. In fact, the dividend yield, at 3.1%, is toward the low end of the company's historical range.

That suggests the stock is on the expensive side. If you have a value orientation and own Exxon, you might actually want to sell it, perhaps capturing capital gains. The same is true if you are simply trying to time the industry's ups and downs.

XOM Chart

XOM data by YCharts.

The cyclical nature of the industry is what backs up this point of view since it is a virtual guarantee that oil prices will eventually fall into another downturn (like they have throughout history). When that happens, Exxon's share price is likely to crater, too. This, however, assumes that you take a fairly active approach to your portfolio.

Hold it!

Some investors, meanwhile, just like to buy good companies when they offer historically high yields. So if you had the fortitude to buy during 2020 when Exxon's price was low, you might have locked in a dividend yield of as much as 10%.

Sure, you have material capital gains at this point, but you would be hard-pressed to find a replacement for the income Exxon is generating in your portfolio. And it would be even more difficult to find such a high yield from a company with as strong a dividend profile.

XOM Dividend Yield Chart

XOM dividend yield data by YCharts.

Basically, your yield on the purchase price could be so attractive that selling would unnecessarily upend the income your portfolio is generating. And if you are looking to live off your dividends, then selling Exxon today would probably be a mistake. Yes, your paper profits will decline in the next industry downturn, but if history is any guide, your dividend checks will keep heading higher.

It all depends

There's no single, simple answer when it comes to investing. But at the end of the day, Exxon is a well-run energy company. If you are looking to buy into this cyclical industry that currently sits at a high point, it is a reasonably safe option.

If you are trying to time the energy market's ups and downs, you would probably want to sell the stock today before the next industry pullback. And if you're a dividend investor looking for a reliable income stream, Exxon and its rock-solid dividend is likely a good one to hold on to no matter what happens with energy prices.