Shares of Tesoro (NYSE:TSO) hit a 52-week high Monday. Let's look at how it got here and whether clear skies are ahead.

How it got here
Refiners have been raking in cash lately because of an expansion in what the market calls the "crack spread." This is the difference between the price of a gallon of gas and the cost of a barrel of oil. When the spread widens, there's more profit for refiners to make, and when it narrows, refiners make less and may even begin shutting down production.

You can see by the chart below that over the past five years the spread has widened pretty dramatically.

RBOB Gasoline Futures Contract 1 (Daily) Chart

RBOB Gasoline Futures Contract 1 (Daily) data by YCharts.

This has benefited Tesoro and other refiners, particularly over the past year. As you can see below, Valero Energy (NYSE:VLO), HollyFrontier (NYSE:HFC), and Western Refining (NYSE:WNR) are all at or near 52-week highs.

TSO Total Return Price Chart

TSO Total Return Price data by YCharts.

This performance is happening because earnings are growing rapidly even if revenue isn't.

Company 

Price/Book

Quarterly Revenue Growth

Quarterly Earnings Growth

Forward P/E

Tesoro

1.5

1.5%

77.5%

8.2

Valero Energy

1.1

10.8%

11.7%

6.8

HollyFrontier

1.6

62%

156.7%

7.9

Western Refining

2.4

-3.5%

138.3%

6.9

Source: Yahoo! Finance.

What's next?
The big question is whether these current conditions will continue.

I don't think there are market forces that will shrink crack spreads or add supply to the market, since refining capacity isn't easily added. With that said, spreads have widened far enough that I don't think there's a lot of upside from an earnings perspective. But with stocks trading at reasonable multiples, refining stocks could continue a slow and steady rise. I just wouldn't expect a market-crushing return and would consider the downside risk if oil prices jump.

The CAPS community is somewhat mixed, giving Tesoro a three-star rating, a middle-of-the-pack mark. 

Fool contributor Travis Hoium does not have a position in any company mentioned. You can follow Travis on Twitter at @FlushDrawFool, check out his personal stock holdings or follow his CAPS picks at TMFFlushDraw.

The Motley Fool owns shares of Western Refining. The Motley Fool has a disclosure policy. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. Try any of our Foolish newsletter services free for 30 days.