NEW YORK ( -- Oil refining has not historically been considered a business with particularly attractive returns on capital, but recent conditions in the oil markets have led to highly desirable conditions for two refiners in particular, HollyFrontier(HFC) - Get Report and Western Refining (WNR) .

As a result, and of investors not sold on the longevity of those favorable conditions, both stocks are currently a part of the Magic Formula® Investing (MFI) "universe."

Let's take a look at the business, why the going is good at present, whether it can last, and which of these two players is the more attractive choice for investors intrigued by the story.

Oil Refining: The Quick and Dirty

Refining is a relatively simple business to understand. Crude oil pumped out of the ground by exploration and production firms (E&Ps) is then transported to refineries, usually via a network of pipelines and storage terminals. There, crude is heated to separate, or "crack," it into the industrial end products sold by the refiners: gasoline, diesel, jet fuel, asphalt, motor oil, lubricants and so forth.

The profits earned by the refiners are the difference between the prices they can obtain crude at and the prices they can sell their end products for. In the industry this is sometimes referred to as the "crack spread."

Given the volatility of crude oil prices and less volatile nature of end-product selling prices, refining can be quite an up and down business, with dramatic peaks and valleys in profitability. In general, though, this is a historically low-margin business. Even the most well-run refiners only earn operating margins of 2% to 3% over the long run, and returns on capital struggle to exceed 10%.

The Flavors of Crude

There are actually over 160 different types of crude oil, but the two that are traded on commodity markets are West Texas Intermediate, or WTI, and Brent. WTI is produced mainly in North America, while Brent is imported. Historically, these two types of crude have been priced fairly close to each other.

However, this has changed dramatically over the past year and a half. Huge production increases in North America, due mainly to shale fracking, have brought a tremendous amount of WTI crude into the system, more than the existing refining, pipeline and storage terminal system can efficiently process.

True to Economics 101, the increasing supply has led to decreasing prices for WTI. Since the start of 2011, WTI has priced between 10% to 20% lower than Brent, spiking up to above 25% and currently at about a 15% discount.

HFC and WNR: Taking Advantage

This WTI price discount has benefited refiners that are geographically close to WTI production areas, or are connected directly via pipeline to WTI hubs like Cushing, Oklahoma. HollyFrontier and Western Refining are two such refiners. Four of HollyFrontier's five refineries fit this description (Cheyenne, El Dorado, Navajo and Tulsa), and Western Refining operates two refineries, in El Paso and Gallup, New Mexico, both in the region.

Easy access to lower-cost WTI gives them a cost advantage against other refiners, and this can be seen in the margins. While firms like


(VLO) - Get Report




continue to generate gross margins around 10%, HFC and WNR produced 18% and 17%, respectively, for 2011. In the refining business, where revenue levels are tremendous (HFC was over $15.5 billion last year), each point of margin leads to big gains in profits.

Can It Last?

HFC and WNR are in MFI because the market doesn't believe the current situation will last indefinitely. Steps are already being taken to free up the WTI backlog. The Seaway pipeline from Cushing to the Gulf Coast was recently reversed, sending flow out of Cushing to alleviate the bottleneck. Combined with planned new refining and pipeline projects, over time the WTI/Brent spread will most likely reduce back to more historically normal levels. But this could take some time to come to fruition.

Which is Better?

Let's take a quick look at the metrics:

Earnings Yield: HFC 29.3%, WNR 29.9%.

Free Cash Yield: HFC 19.1%, WNR 19.9%.

Dividend Yield: HFC 1.86%, WNR 0.78%.

Debt-to-Equity Ratio: HFC 0.25, WNR 1.02.

Interest Coverage Ratio: HFC 20.9, WNR 5.8.

Clearly, the numbers are in favor of HFC. It is in much better financial condition than WNR, pays a better dividend (with two special dividends in the past year), is larger and more diversified (particularly after the Frontier merger), and boasts a seasoned management team. If the refining story sounds intriguing, HFC looks to be the better pick of the two.

The Wrap

I'm not a big fan of either stock as a Magic Formula investment. Refining is just too unpredictable and historically difficult of a business. Neither stock looks particularly cheap against reasonable future expectations. These kinds of situations are difficult to handicap in MFI -- sometimes favorable conditions last long enough to generate ongoing great results, sometimes they do not. MagicDiligence is more interested in finding the sustainably great businesses the screen turns up.

At the time of publication the author had no position in any stocks discussed in this article.

This commentary comes from an independent investor or market observer as part of TheStreet guest contributor program. The views expressed are those of the author and do not necessarily represent the views of TheStreet or its management.

This contributor reads:

Value Investing News

Feed the Bull

On Twitter, this contributor follows: