Refiners have had a terrible few weeks. After the revelation that the US commerce department was allowing a form of lightly refined crude to be exported, refiners slumped as investors quickly assumed that the crude export ban had been lifted.

But this is not the case. Indeed, many analysts believe that a full lifting of the export ban is still far off, and the small amount of exports allowed will not meaningfully affect domestic crude prices.

Still, refiners such as HollyFrontier (NYSE:HFC) and Marathon Petroleum (NYSE:MPC) have failed to find any buyers.

Multiple headwinds
Unfortunately, refiners are facing multiple headwinds, not just the specter of US oil exports. For example, new refining capacity is coming online within the Middle East and Russia while refiners are closing at a slower pace within the Atlantic basin. These factors are likely to push margins together. Of course, there is also the closing Brent/WTI spread to consider.

On the other hand there are multiple catalysts that will work in favor of the refiners during the near future. In particular, Canadian oil production continues to grow, continued volatility in the Middle East will support oil prices, oil price differentials within the US remain somewhat contained, and more refinery closures are expected in the Atlantic basin over time.

Not all refiners are created equal
The broad sell-off across the refining sector has been unforgiving. Indeed, now many refiners are trading at near 52-week lows despite healthy outlooks.

According to Wall Street analysts, one of the refiners that has been overlooked is Marathon Petroleum. Marathon has been building its presence through acquisitions during the past few years, including the Hess retail acquisition, and many analysts now believe that the market is not taking the earnings power, gained as a result of these acquisitions, seriously.

What's more, Marathon is progressing well with its midstream investments. The company is spending around $1 billion this year, $1 billion during 2015, and around $800 million during 2016 to develop numerous midstream infrastructure projects, which will become a major growth driver.

And this is not to mention Marathon's shareholder returns, which are the best in class. During 2013 the company returned cash to investors through both buybacks and dividends, coming out to an equivalent yield of 14.6% per share. HollyFrontier was Marathon's only comparable peer on this front, returning an equivalent of 8.9% per share. Specifically, during the first quarter of this year alone Marathon returned $3.5 billion to investors.

Plenty of experience
Meanwhile, HollyFrontier, which has also seen its share price collapse over the past week or so, has similar industry-leading qualities.

That said, HollyFrontier is not immune to industrywide pressures but it is in a better position to weather the storm.

You see, HollyFrontier was built around a tight Brent/WTI spread. During the period 2001 to 2010, the Brent-WTI spread averaged +$1, meaning that WTI traded at a $1 premium to Brent -- a scenario which seems impossible right now, but if the ban on crude exports is lifted, WTI could once again trade at a premium to Brent.

Nevertheless, from 2001 HollyFrontier still managed to achieve an average return on capital invested of 22% and net income per barrel of $2.7. To accomplish this return, HollyFrontier uses a mix of crude oils from around the U.S., all of which trade at a discount to WTI.

To make HollyFrontier an unprofitable refiner it is likely that WTI would have to trade at a $2 or $3 premium to Brent, which is unlikely considering the supply glut of crude within the U.S. and rising international production.

The bottom line
All in all, refiners have had a rocky past few weeks but things are not as bad as they seem. Both Marathon and HollyFrontier are well run businesses that aren't dependent on a wide Brent/WTI spread. Indeed, the two refiners have plenty going for them, and profits are not going to evaporate overnight.

There is certainly no reason for investors to flee HollyFrontier or Marathon just yet; the two refiners still have plenty of gas left in the tank.