Shares of HollyFrontier (NYSE: HFC) 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
Oh the catch-22 of falling oil prices. On the bright side, they lead to happy consumers as gas prices drop and potentially happier investors as operational expenses for businesses drop. On the other hand, they could signify weakening oil demand and a global slowdown in manufacturing, which is bad news for everyone. Refiners, however, love it when oil prices fall because their margins go through the roof.

Last week we took a look at Phillips 66 (NYSE: PSX), the recently spun-off downstream operations of ConocoPhillips, and saw the exact same effect, whereby lower oil prices were driving robust crack spreads and increasing profits. This effect is even more noteworthy with HollyFrontier and Tesoro (NYSE: TSO), which call the Midwest their home, and Western Refining (NYSE: WNR) in the south and southwestern U.S. and Mexico. As the Fool's Aimee Duffy has noted in the past, Tesoro, HollyFrontier, and Western Refining all refine oil from their own neck of the woods, keeping costs low, while Phillips 66 and Sunoco (NYSE: SUN) suffer the added costs of oil imported from abroad in their margins.

In HollyFrontier's latest quarter, the company reported a 157% increase in net income, as well as a sizable increase in refining operating margins. As with all refiners, though, rising oil prices or a severe decline in oil demand threaten to crush margins or curb refined oil needs.

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

HFC Chart

HFC data by YCharts

Trust me, refining shareholders aren't complaining one bit about their returns over the past year and change.

Company

Price/Book

Price/Cash Flow

Forward P/E

Dividend Yield

HollyFrontier 1.5 6.5 7.9 6%*
Tesoro 1.3 4.1 8.7 0%
Sunoco 5.4 5.8 9.2 1.6%
Western Refining 2.5 4.2 6.2 0.6%
Phillips 66 1.3 5.5 7.9 2%**

Source: Morningstar. *HollyFrontier has paid out $2 in special dividends over the trailing 12 months. **Phillips 66's yield is projected.

As you can see, most of the refining sector trades in tandem, with the biggest differences being more robust margins from Midwest and Western refiners as opposed to those on the East Coast.

HollyFrontier has done a marvelous job of rewarding shareholders with special dividends. In its recently ended quarter it tacked on another $0.50 one-time payment. Aside from HollyFrontier, Phillips 66 seems to offer the healthiest dividend yield at 2%, proving that splitting ConocoPhillips into its upstream and downstream parts was indeed a very smart move.

Overall, the strength of the refining sector lives and dies based on oil prices. With oil ticking moderately higher over the past couple of weeks, refining shareholders should begin getting slightly nervous.

What's next
Now for the $64,000 question: What's next for HollyFrontier? That depends on whether it continues to see cost synergies from its Holly and Frontier merger, whether the price of oil remains stable or heads lower, and whether it can continue to reward shareholders with dividend boosts and special dividends.

Our very own CAPS community gives the company a highly coveted five-star rating, with an overwhelming 95.6% of members expecting it to outperform. Although I've yet to make a CAPScall on HollyFrontier, I have in the past felt it was Watchlist worthy. Today, I'm going to keep that same stance.

The thing with refiners is that they can be very profitable if you catch them at the right time, but they can also turn on a dime if oil prices head in the wrong direction. That makes refiners much more volatile than the exploration and production side of the business and means they often make very poor long-term investments. Aside from Holly, they also offer very weak dividends relative to the upstream portion of the business. HollyFrontier has made good strides in reducing costs because of its merger, and its margins have been top-notch. However, with the stock at a new high, I wouldn't be clamoring to get into it now given that oil prices are rising and its recurring yield is minimal.

Refiners are definitely basking in lower oil prices; however, it never hurts to be prepared in case 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.