After spending the majority of the year with little gains to speak of, shares of energy behemoth ExxonMobil (XOM 0.57%) are breaking out in a big way. Shares have soared from $86 per share to over $100 per share in just a few weeks, and will likely end 2013 at an all-time high.

Still, it's been a tough ride for ExxonMobil this year in terms of its underlying business. Profits have collapsed due to rough downstream results, with no clear catalyst for those trends to reverse in the coming months. As a result, should investors believe the rally and jump in, or is a dose of caution appropriate?

Should investors buy the rally?
Despite its recent ascent, ExxonMobil still trades with a trailing earnings multiple of just 13 times, which looks cheap given the fact that the overall market holds a trailing P/E in the high teens. Plus, ExxonMobil offers investors a solid 2.5% dividend.

This may cause potential investors to think the stock has plenty of room to run. While it may, some context is helpful. ExxonMobil's valuation may not be as cheap as it appears, given that close rival Chevron (CVX 1.20%) exchanges hands for 10 times trailing earnings.

Also, consider that European integrated major Royal Dutch Shell (RDS.B) holds a trailing earnings multiple of just 7 times. And, for those investors flocking to ExxonMobil for its dividend payout, it's worth noting that Royal Dutch Shell provides a dividend yield double that of ExxonMobil. Royal Dutch Shell's 5.3% payout does much more to compensate investors in the event of continued poor refining activity.

Of course, it's worth noting that ExxonMobil devotes much more to share buybacks than its rivals. ExxonMobil spends several billion dollars every quarter to repurchase its own shares. But with a rallying share price, those buybacks are less beneficial, and won't provide the downside protection of a strong dividend payment, should underlying business conditions worsen.

What ExxonMobil needs for its rally to continue
ExxonMobil clearly needs refining to reverse its decline in order for its momentum to keep going. While industry profitability is suffering for the integrated majors, Chevron has held up much better. ExxonMobil's quarterly profit fell 18%, primarily because it leans on refining to a larger extent than Chevron. ExxonMobil's earnings per share are down 27% through the first three quarters, as opposed to the same period last year.

In all, Chevron earnings are down 13% through the first nine months, and while it's understandable to be disappointed by falling earnings, it's still an entirely manageable decline. Chevron continues to tread water much better than ExxonMobil, thanks to very strong upstream results that are helping to offset its poor refining business. Furthermore, project ramp-ups in the United States, Nigeria, and Angola will serve as a catalyst for further growth in the company's upstream segment.

The Foolish bottom line
The market seems convinced that ExxonMobil's future will be brighter than its recent past, which likely explains its rallying share price. Of course, that's far from a guarantee, particularly if the company's poor downstream results persist.

Meanwhile, Chevron's underlying profitability has held up much better over the first three quarters of the year, and offers investors a lower valuation, and a better dividend as a result. While it's easy to get excited over the prospect of ExxonMobil finally breaking out, Chevron seems like a better bet going forward.

Looking to boost your dividend income outside of the energy sector?