Shares of Phillips 66 (NYSE: PSX) hit a 52-week high on Tuesday. Let's take a look at how it got there and see if clear skies are still in the forecast.

How it got here
Falling oil prices generally cause mixed emotions. Consumers often rejoice as it results in lower gasoline and diesel prices. But on a macro scale, lower prices can be bad news as they could signal demand weakness and an economic slowdown.

One area that's going to thrive on lower oil prices, at least in the near term, is U.S. refiners like Phillips, Tesoro (NYSE: TSO), and Valero Energy (NYSE: VLO).

All three have surged in recent months as oil prices have dropped, which has reduced their input costs and allowed them to crank out robust margins. Phillips 66 reported a 53% jump in refining and marketing earnings in the second quarter, while its midstream segment reported an adjusted profit of $79 million after taking a one-time $170 million writedown in the Rockies Express Pipeline. Even Phillips 66's chemicals segment excelled, with adjusted earnings of $242 million.

Another catalyst for the company was its split from ConocoPhillips (NYSE: COP), separating the upstream operations from the midstream and downstream segments. Better earnings clarity and Phillips 66's initiation of a $0.20 quarterly dividend is paying sizable rewards for shareholders. This is the second time within a year we've seen shareholder value unlocked in the oil sector through a spinoff. Last year, Marathon Oil and Marathon Petroleum (NYSE: MPC) split and shareholders have been rewarded with robust dividend growth since.

How it stacks up
Let's see how Phillips 66 stacks up next to its peers.

PSX Chart

PSX data by YCharts

Lower oil prices and higher margins are good news for the entire refining sector.

Company

Price/Book

Price/Cash Flow

Forward P/E

Dividend Yield

Phillips 66 1.3 5.5 8.1 2%*
Tesoro 1.2 3.7 7.8 0.0%
Valero Energy 1 4.4 6.6 2.5%
Marathon Petroleum 1.9 6.5 5.4 2.8%*

Source: Morningstar, *Indicates projected yield based on recent dividend announcement.

Here is yet another case where we aren't going to get a lot of differentiation by looking at the financial metrics of these refiners. All four are relatively inexpensive with dividend yields around 2%, with the exception of Tesoro, which suspended its dividend in 2009. Phillips 66, as I mentioned above, recently initiated an aggressive $0.20 quarterly dividend while Marathon Petroleum boosted its quarterly payout twice within a year.

What's really imperative to understand about refiners is that their businesses are highly cyclical and subject to margin contraction if oil prices rise. With prices falling below $100, it's not surprising to see Valero and Phillips 66 easily surpassing Wall Street's expectations, but keep in mind that these results can turn on a dime. That's the primary reason why this sector remains cheap on paper.

What's next
Now for the $64,000 question: What's next for Phillips 66? That question really depends on what happens with oil prices, the crack spreads that regulate Phillips 66's margins, and if oil demand remains strong.

Our very own CAPS community gives the company a highly coveted five-star rating, with just two of the 144 members who have chimed in on the stock looking for it to underperform. Although I have yet to enter a CAPScall in either direction, I do tend to side with the majority, but am choosing to wait on the sidelines in the meantime.

As my Foolish colleague Selena Maranjian noted earlier this week, there are far more reasons to be optimistic about Phillips 66 than there are reasons to be negative. However, the recent run-up in its share price, coupled with the cyclicality of its business, doesn't often make refiners a favorable long-term hold. Usually, you can pilfer double the yield from the upstream side of the oil business, so it really requires you to be picky with regard to when to buy into the refiners' story. Don't get me wrong, I really like Phillips 66 and think Conoco's decision to spin off its refining operations is one of the smartest moves it could have made, but I'm not convinced it can head much higher from its current levels.

Refiners are definitely basking in lower oil prices, however, it never hurts to be prepared if oil crests $100 per barrel yet again. At the Motley Fool, our team at Stock Advisor has scoured the oil sector and discovered the three oil stocks you need to own if oil spikes higher. Find out their identities, for free, by clicking here to get your copy of this latest special report.