For an integrated oil company like ExxonMobil (NYSE:XOM) or Chevron (NYSE:CVX), it stings when gasoline prices lag the rise in crude oil and refining margins get squeezed. But it's not all bad news, because those companies make big bucks in their upstream segments.

Then there is a company like Tesoro (NYSE:TSO), where refining is the raison d'etre. That margin squeeze doesn't just sting -- it burns. It burns very badly, indeed.

In case you didn't make it out to a haunted house this past week, you could always take a look at Tesoro's income statement for a fright. Revenue rose 5% quarter on quarter, but crack spreads collapsed from nearly $22/barrel last quarter to $9 and change this time around. In Hawaii, the margin actually narrowed to $0.11. All in all, the refining segment's operating profit plummeted 83% to $132 million.

Yes, there is a retail segment at Tesoro as well, but with negative $7 million in operating income year to date, it does not and will not move the needle much. It's all about the crack spread, and she can be a cruel mistress. The Elvira of Energy, if you will.

Things have already turned around a bit through the first month of the new fiscal quarter. Management reported current West Coast cracks of about $17.50, about 50% above the third-quarter average in California. Unless you're an investor in a shipper like Frontline (NYSE:FRO) or Excel Maritime (NYSE:EXM), the volatility here may shock you. But if you're convinced that cracks are where it's at, you could do much worse than a leader like Tesoro or Valero Energy (NYSE:VLO), both of which boast solid balance sheets and a great depth of operating experience.

Fool contributor Toby Shute doesn't have a position in any company mentioned. The Motley Fool has a totally nonspooky disclosure policy.