NEW YORK (TheStreet) -- Oil has made a stunning rally, with the domestically traded West Texas Intermediate contract (WTI) changing hands at more than $104 a barrel, and the European Brent contract trading at more than $116 a barrel.

Remembering that the $114 price for Brent is much more representative of global oil prices, we can measure an almost $50 rise in the price of crude in the last nine months -- the rise of integrated oil stocks has been similar.

In the wake of such stunning gains, investors may ask whether the rally in the integrated oil stocks has run its course and whether they should shift their attention elsewhere.

Although I believe oil has found a relative floor in prices and is unlikely to travel much lower any time soon, better value in the oil space right now might be found in the refiners.

We need a little perspective on the refiners to come to this conclusion. This was a sector that was on top of the world during the years from 2003 to 2007, enjoying incredible summer demand spikes and minishortages.

We can appreciate the terrific margins that the refiners were enjoying during these years by looking at the "crack" spreads, an industry measurement of the relative values between crude oil and gasoline. In essence, these spreads measure what refinery costs are, compared with what they can charge for the finished product. A higher crack spread indicates a better margin and better profits.

In 2005, 2006 and 2007, gasoline crack spreads spiked to $42, $28 and $38, respectively. But since then, refiners have had to labor often with single-digit cracks and sometimes even negative cracks! Imagine if the final product you made had even less value than the raw costs you incurred to make it -- this is what refiners saw during parts of the years since 2008.

And their stocks have reflected those margin difficulties.

Valero

(VLO) - Get Report

, at its peak a $75 stock in 2007, has labored in the teens throughout much of 2010.

Tesoro

(TSO)

, a $60 stock four years ago, experienced similar problems and actually traded in the single digits in 2009.

But a few very strange disconnects and the events in the Middle East and Japan have changed the equation for the refiners, at least temporarily. The crazy discount and disconnect between WTI and virtually all other global crude grades has continued for far longer than most have expected. This has been the biggest driver of increased margins for refiners, and the May gasoline crack spread is now back to a very healthy $23, a premium the refiners haven't enjoyed since 2007.

To this lagging of WTI to the rest of global crude, add the real supply shortages of refined products that will emerge both from the unrest in the Middle East and the horrific earthquake and tsunami in Japan, and you've got a recipe for an even better profit opportunity for the refiners.

Air strikes on Libya assure reduced export of crude to Europe. Although Libya represents a relatively small 1.3 million barrels of daily supply, those are sweet barrels like European-traded Brent crude, much preferred by refineries and sure to add a premium to product prices.

In Japan, the tsunami slowdown and destruction of refineries has put further premium on refined products, while the shortfall in electricity and slowdown in nuclear power production from China, Germany and Japan will force heating oil and other distillate products to be in greater demand to run generation assets.

All events seem to be converging at once to make the next few months a rare opportunity for refiners to make a mint. And the summer driving season, also historically bullish, is still approaching.

The refiners have already run quite a bit, with Valero now trading close to $28 and Tesoro around $24. Still, I think the profit numbers these two will enjoy will leave a lot of room for a run here. Sooner or later, the business will again find historical problem. But for right now, the refiners seem to have caught a perfect storm of positive events for their shares.