What happened

Shares of ExxonMobil (NYSE:XOM) declined a painful 18.5% in 2018 according to data provided by S&P Global Market Intelligence. Fellow international energy giant Chevron (NYSE:CVX) lost 13.1% of its value. The pain, meanwhile, wasn't confined to U.S.-based companies; Royal Dutch Shell (NYSE:RDS-B) and PetroChina (NYSE:PTR), one of the largest energy players in China, were both down around 12% last year. Other big names took hits too, including BP and Total, though their declines were more modest at less than 10%.

So what

It's never pleasing to see a stock you own have a down year. But sometimes the ups and downs are simply to be expected. That's particularly the case with energy companies like Exxon, Chevron, Shell, and PetroChina. Although all these companies have diversified businesses, with assets both on the upstream (oil drilling) and downstream (refining and chemicals) sides, sentiment around the price of oil is and always has been a big driver of the stock prices in the energy industry. Oil, meanwhile, is known for often swift and dramatic price swings.

An offshore oil rig in the water

Image source: Getty Images

That's exactly what happened in 2018, with oil hitting a particularly nasty downdraft in the final months of the year. That drop, which quickly wiped out months of steady gains, pushed oil into a bear market. The prices of most oil-related names followed oil lower. In fact, the ups and downs in the stock prices of Exxon, Chevron, Shell, and PetroChina all roughly mirrored the price of oil through most of last year. Sadly, oil ended on a weak note, and so did these companies' stock prices.

Still, you can't paint with too broad a brush. For example, Chevron and Exxon have both been working to increase production in the U.S. onshore space lately. That's been a mixed blessing. Production volumes have been increasing for both companies, but logistics bottlenecks in the U.S. market have left a supply glut that has pushed West Texas Intermediate (a key U.S. oil benchmark) prices below those of Brent Crude (the international oil benchmark). That helps explain why investors were, perhaps, a little rougher on Exxon and Chevron.

WTI Crude Oil Spot Price Chart

WTI Crude Oil Spot Price data by YCharts.

Shell, for its part, has been working in recent years to increase its exposure to natural gas. A key end market for that fuel, however, is Asia. China, which is PetroChina's main market and the region's 800-pound gorilla, has been experiencing a slowdown in growth. Add the global trade tensions brewing between the United States and China, and there's even more uncertainty in the air. A bad outcome could mean even slower growth in China and the rest of Asia. That's a bigger issue for PetroChina, which is largely focused on its home market, but China's growth slowdown is just a symptom of larger regional concerns that have investors worried about Shell as well.

Now what

Energy prices are notoriously volatile, so there's nothing really shocking in the declines investors saw in the shares of oil-related names like Exxon, Chevron, Shell, and PetroChina in 2018. They basically tracked along with ups and downs in the price of oil. And with oil prices so volatile lately, investors should probably expect such heightened gyrations to continue for a little while. That, however, is just par for the course for these companies. What you shouldn't do is think all oil companies are equal. Yes, they may move in tandem at times, but there are often important differences under the covers that you should ensure you understand before buying.

Check out the latest ExxonMobil and Chevron earnings call transcripts.