As New Year's Eve quickly approaches and we prepare to make our 2013 investing resolutions, it is a good time to reflect on the energy sector in the year that was 2012.

In this December series, our writers will be recapping some of the most popular, highest-performing stocks in this sector. We will examine whether the gains these companies provided their shareholders in 2012 are sustainable, or whether they merely can be attributed to one-time events or fizzling trends. Consider these pieces as gifts to benefit our Foolish, long-term investors seeking exposure to the energy sector. Enjoy, and Fool on!

Today, we will take a look at HollyFrontier (HFC), which is up 84% year-to-date. More importantly, we'll try and find out whether this independent refiner continues to remain a solid investment for 2013 and beyond.

A brilliant run so far
HollyFrontier has been among the best performing refiners in 2012. Thanks to the strategic locations of its refineries, HollyFrontier's easy access to the cheap West Texas Intermediate, or WTI crude, and the even cheaper Canadian crude, has turned out to be a huge advantage. In addition, the company has its own pipeline and storage facilities, thanks to its 44% interest in Holly Energy Partners (HEP).

In short, HollyFrontier has a fantastic business model. Not only did management focus on expansion plans, but also on keeping down costs in the form of transportation and storage. The net result? Increased cash flows resulting in increased margins.

The metric I'm interested in
Below is a table that summarizes the refining gross margin per barrel for five refiners in the first nine months of 2012 (which is the latest data available). Also shown is the percentage change in gross margin from the corresponding period in 2011:

Company

Refining gross margin per barrel in 2012  (in $)

Refining gross margin per barrel in 2011 (in $)

Percentage change

HollyFrontier

25.20 

23.40

7.7%

Marathon Petroleum (MPC 0.70%)

12.32 

11.59

6.3%

Phillips 66 (PSX 0.91%)

13.34 

10.62

25.6%

Valero Energy (VLO 0.86%)

10.51 

11.65

(9.8%)

Western Refining (WNR)

17.90 

20.30

(11.8%)

Sources: Company filings, author's calculations.

Clearly, HollyFrontier seems to be way ahead of the rest in terms of refining margins. To put it in simpler terms, for every barrel of the refined product sold, HollyFrontier gets to keep more cash than the rest. Also, it has managed to increase its refining margin by a healthy 8% when compared against the corresponding period in 2011. Phillips 66, too, recorded a notable change here -- a phenomenal 25% -- thanks to its spin-off from ConocoPhillips (COP 1.23%) this year.

Operational prowess
Maintenance-related shutdowns or unplanned events, such as accidents, can eat into the efficiency of these refineries. HollyFrontier stepped up efficiency by ensuring lower refinery downtime, and this has helped in better refinery utilization. For the first three quarters, refinery utilization stood at a healthy 94% -- up 5 percentage points from the corresponding period in 2011. For readers not well-versed with the technicalities, refinery utilization indicates the actual amount of crude oil processed against the total (or maximum) possible processing capacity.

The company is also expanding its Woods Cross refinery in Utah to process waxy crude oil. This expansion is actually taking place in response to the increased availability of waxy crude from the upcoming Uinta Basin and the nearby Niobrara shale play. The $225 million project will see Woods Cross refining capacity going up more than 45% to 45,000 barrels per day. Management expects to complete the expansion by late 2014. Another strategically important move that should benefit the company in the long run.

Investor friendly
From a shareholder perspective, HollyFrontier has done a fine job. The company increased its dividends in each of the three quarters and also paid out a special dividend in the third quarter. Also, by the end of the third quarter, the company bought back stock worth $190 million. Actually, this doesn't really come as a surprise given the strong operating margins and a well-fortified balance sheet. However, I'll definitely give management credit for not putting the excess cash into some mindless expansion project. As an investor, this is exactly what I'm looking for.

What holds for 2013 and beyond?
One of the primary reasons why HollyFrontier did so well was the advantage of having access to cheap crude inputs in the form of the Bakken crude, Canadian crude, and the WTI. The company does not have to buy the more expensive Brent crude for any of its five refineries situated in the Mid-Continental region. Going forward, I believe, HollyFrontier will continue to hold this advantage. The reason's pretty simple.

Crude oil supply in the United States is exploding, thanks to the booming shale plays. However, increased production does not automatically mean increased takeaway capacity. Growth in corresponding pipelines that can transport the additional production is painfully slow. Cushing inventories are at an all-time high. Additionally, WTI prices have further dropped this week to $85 per barrel -- the lowest since July.

The other feasible option to transfer this excess capacity is by railroad, which still an expensive option. Crude oil from the Bakken is still trading at a discount to the WTI, thanks to lower takeaway capacities. Until the Keystone XL and the Bakken-to-Cushing pipelines come online, HollyFrontier and other refineries situated in the mid-continental region will continue to have access to cheap crude oil for its refineries.

The company's still cheap
With a trailing twelve month P/E of 6.2, HollyFrontier is also among the cheapest refining stock. The table below summarizes it:

Company

Trailing P/E

Forward P/E

HollyFrontier

6.2

7.8

Marathon Petroleum (MPC 0.70%)

8.4

6.9

Phillips 66 (PSX 0.91%)

6.0

8.0

Valero Energy 

16.9

7.0

Western Refining

21.6

7.0

Source: Yahoo! Finance.

The market doesn't seem to have realized HollyFrontier's potential as yet. As value investors, Fools should consider this stock for their portfolio. You can start watching the company by adding it to your watchlist.