After an initially tepid response, the market lit a fire beneath shares of independent refiner Frontier Oil (NYSE:FTO) after the company reported first-quarter 2009 results last week. Frontier's definitely in good shape, but as far as the stock's concerned, this may be a case of investor pyromania.

Crude, crack, and cash
First-quarter 2009 earnings of $0.70 per share handily beat the $0.44 per share the company earned in the year-ago period. However, Frontier is experiencing new challenges in a much different energy market environment. Crude oil price differentials -- a measure of the discount at which Frontier can acquire lower-quality raw product -- narrowed by more than half from fourth-quarter 2008 levels. Also, the diesel crack spread -- the difference between the cost of crude inputs and the price of refined diesel fuel -- also got cut almost in half over the same time frame. Good old gasoline helped saved the day: The crack spread here recovered mightily, from an average shortfall of $0.95 per barrel in fourth-quarter 2008 to a much healthier average of $7.04 per barrel.

Further crude and crack talk would likely go to your brain like a lungful of fumes, so let's move on to cash. The balance sheet was flush with $632 million at quarter's end, up almost $150 million from the previous quarter. Management was mum on free cash flow projections, but considering that the company expects to spend only about $160 million on remaining 2009 capital expenditures and has no expectation of 2009 operating losses, that's a big pile of dough. Management made clear on the conference call that it's in no rush to deploy its billfold, which strikes me as a prudent stance in the current credit environment.

Like buying stock in the U.S. economy
Frontier is optimistic that gasoline demand has bottomed -- a view supported by a widening of the gasoline crack spread in April and May. The thirst for diesel, however, has continued to wane, and the company's landlocked refineries don't give it the same opportunities that a competitor like Valero (NYSE:VLO) has with its Gulf Coast operations, which lend it the ability to ship diesel to stronger European markets as conditions warrant.

Investors should keep in mind that management predicts a tough market until the U.S. economy recovers. While mining companies such as Freeport McMoran (NYSE:FCX) and BHP Billiton (NYSE:BHP) have seen strong stock gains lately, it's important to recognize that Frontier's refined products don't share the price profile of other commodities. While copper prices can be stimulated by global infrastructure projects, for example, no single policy lever could realistically firm up the price of gasoline and diesel. Much like United Parcel Service (NYSE:UPS) and FedEx (NYSE:FDX) rely on high levels of economic activity to support their delivery operations, Frontier's fate is similarly dependent on a strong U.S. economy.

As I see it, Frontier's strong balance sheet and operational flexibility give it a great chance to be a winner over the long haul. But if shares continue to heat up, I'm concerned that overeager investors could end up with short-term burns.

Further ultra-refined Foolishness:

FedEx is a Motley Fool Stock Advisor recommendation. United Parcel Service is a Motley Fool Income Investor pick. Try any of our Foolish newsletter services free for 30 days.

Fool contributor Mike Pienciak does not hold shares in any company mentioned. The Fool's disclosure policy minds the gap, but not the crack spread.