What happened

In January, oil and natural gas refinery Valero Energy Corporation's (VLO -2.91%) shares jumped 17%, according to data provided by S&P Global Market Intelligence. That was the biggest gain of this trio, but Marathon Petroleum Corp. (MPC -3.80%) and its 12% gain wasn't far behind. Even Phillips 66 (PSX -2.43%) got in the act with a nearly 11% gain. All of them beat the roughly 8% rise in the S&P 500 index.

Check out the latest Phillips 66Marathon Petroleum, and Valero earnings call transcripts.

A woman pumping gas at a gas station.

Image source: Getty Images.

That was a notable reversal from 2018, when the broad market downdraft at the end of the year left Valero down a painful 18% last year. Phillips 66's stock was down just under 15%, and Marathon's shares lost around 10%.

So what

The broader moves of the market had a huge impact here, suggesting that investors shouldn't read too deeply into the ups and downs. Investor sentiment is as variable as the weather. The end of 2018 was a period in which investors were looking to avoid risk. The mood brightened in January and investors were once again willing to embrace risk. But such market swings can obscure other things that are taking place on a company- or industry-specific level.

SPY Chart

SPY data by YCharts.

For example, Valero started off the year with the completion of a merger with its controlled limited partnership Valero Energy Partners LP on Jan. 10. That simplification transaction brought to a close a period in which Valero was able to sell assets to the partnership to raise cash, which hasn't been as beneficial since limited partnership prices were laid low a few years ago. It was a good move, as it allows Valero to benefit from the full cash flows of these assets without the need to share them with partners. 

Following that up, Valero increased its dividend 12.5% on Jan. 24. That was a generous boost and nice to see following the merger with Valero Energy Partners. It was a pretty obvious statement that Valero remained strong even after the nearly $1 billion acquisition. It followed that up with fourth-quarter and full-year earnings on the last day of the month. It was good reading, with adjusted earnings of $7.37 per share in 2018, up from $4.96 in 2017. The biggest benefit came from the company's ability to use lower-priced feedstock from U.S. sources. Not surprisingly, Valero's stock rose sharply at the end of the month, which was the main driver of the monthly outperformance.   

Marathon, meanwhile, increased its dividend 15% on Jan. 28. However, the really interesting news all dates back to 2018, when the company bought peer Andeavor. That deal was completed on Oct. 1, basically the same time that the broader market started to shift toward risk avoidance. However, in early December the company held its investor day and painted a fairly bright picture for the newly combined entity. Marathon increased its expected synergy savings by 40% and outlined its capital spending plans, modest leverage profile, and increasingly balanced portfolio. It was generally good reading, only investors weren't interested at the time. However, when investors got back into the buying mood, Marathon's January gain was larger than its 2018 loss. The big January dividend hike, meanwhile, was an indication of just how positive management is about the company's future.   

SPY Chart

SPY data by YCharts.

The only company here with basically no news in December and January is Phillips 66. The stock was up in January, but the gain was smaller than the loss it incurred in 2018. It reported solid third-quarter earnings in late October, but recency matters on Wall Street. Valero's and Marathon's upbeat news helped their shares to more impressive gains when investors shifted back toward risk-taking.   

Now what

Anyone who has been around the market for a while knows just how mercurial investors can be. Mr. Market is subject to swift and often volatile mood shifts. Those ups and downs usually take center stage, which makes sense. But dramatic market moves can obscure fundamental issues taking shape at individual companies. The performance of these three refiners are an example of that fact in practice. Don't read too much into big market moves, but do take the time to understand the positives (and negatives) taking shape at the companies you own.