BP ( BP) and Valero ( VLO) posted earnings this morning, which gives terrific insight into the space of two leaders -- one with an integrated energy company and one with a dedicated independent refiner. If we look closely at the numbers, maybe we can find the best way to play these sectors.

It's excellent that both BP and Valero posted on the same day -- you can expect the rest of the sector leaders that are posting in the next week to show the same kind of trends that these two have.

And remember, we've got a lot of big players preparing to post numbers, including Exxon Mobil ( XOM), ConocoPhillips ( COP) and Chevron ( CVX).

But BP is probably the blueprint: Second-quarter earnings were down 53% from the quarter last year. It's even worse than it sounds -- the clean replacement cost profit, a number that strips out the value of oil in inventory, was down 66%. In other words, inflated crude prices this quarter kept the earnings report from being a disaster.

While BP is ahead of its schedule for cost-cutting initiatives, CEO Tony Hayward saw "little evidence of any growth in demand and expect the recovery to be long and drawn out."

Expect similar reports and similar outlooks from the rest of the majors reporting this week.

But there's reason to continue to follow BP. Prices are as volatile as they've ever been and the recent run-up to keep crude above $60 a barrel will be a big help going into the third quarter. And there's that dividend, the best in the sector - 6.6 %

The integrateds are not the best proxy for crude oil prices, even though their earnings reports seem to rely so completely upon them. There are better plays in the space if you want to bet on oil going up.

Instead, use BP and other integrated oil stocks as the "consumer staples" piece of your energy portfolio. And in that area, although I have usually preferred Chevron for that role, you still cannot do badly with BP.

This report will have its desired effect - along with the similar reports from others in the sector, you should get an opportunity of cheaper shares. Look for a better than 7% dividend yield to start your scale in buying, corresponding to a price of $48 a share or lower.

Valero is another case. Although BP also has significant refining exposure, Valero is a pure independent refining company. And the numbers for the refiners have been miserable. Margins for the products they've been selling, like gasoline and heating oil, have been at historic lows, even while crude prices were flying high.

Crack spreads, the measurement of the price of refined products compared to the raw crude that is used to make them have been historically low for gasoline even in the traditionally strong summer period. In the years from 2003-06, summer cracks often traded north of $25, sometimes as high as $45.

In the last two years, summer cracks have traded below 10 dollars and sometimes even at negative prices. Because of this, Valero and other refiners have been on a downward slide for the better half of two years.

But things have gotten so bad, it's hard to imagine them getting much worse.

Remember that Valero, which posted a $254 million loss in the second quarter, was a $70 stock less than two years ago.

At $18.25, with a 3.50% dividend, there's an opportunity to be had here for the longer-term, forward-looking investor

Yes, things are miserable for Valero. Yes, the forecasts are for things to not get much better soon. But when things do get better, the price of the shares will be a lot higher, and you'll be too late to take advantage of these depressed prices. Even a short-term increase in margins could make Valero ramp strongly and deliver a 50% share increase.

Keep an eye on these two and others reporting in the energy space this week. I think you'll find your work will be well rewarded.
Dan Dicker has been a floor trader at the New York Mercantile Exchange with more than 20 years' experience. He is a licensed commodities trade adviser. Dan's recognized energy market expertise includes active trading in crude oil, natural gas, unleaded gasoline and heating oil futures contracts; fundamental analysis including supply and demand statistics (DOE, EIA), CFTC trade reportage, volume and open interest; technical analysis including trend analysis, stochastics, Bollinger Bands, Elliot Wave theory, bar and tick charting and Japanese candlesticks; and trading expertise in outright, intermarket and intramarket spreads and cracks.

Dan also designed and supervised the introduction of the new Nymex PJM electricity futures contract, launched in April 2003, which cleared more than 600,000 contracts last year alone. Its launch has been the basis of Nymex's resurgence in the clearing of power market contracts over the last three years.

Dan Dicker has appeared as an energy analyst since 2002 with all the major financial news networks. He has lent his expertise in hundreds of live radio and television broadcasts as an analyst of the oil markets on CNBC, Bloomberg US and UK and CNNfn. Dan is the author of many energy articles published in Nymex and other trade journals.

Dan obtained a bachelor of arts degree from the State University of New York at Stony Brook in 1982.

If you liked this article you might like

Video: 5 of the Biggest Losers From the New Tax Code

Video: 5 of the Biggest Losers From the New Tax Code

Live From NAPE: Oil and Gas Drillers Excited About $60 Oil

Live From NAPE: Oil and Gas Drillers Excited About $60 Oil

A Regular Winning Trade Becomes Roadkill in Market Meltdown

A Regular Winning Trade Becomes Roadkill in Market Meltdown

The Dow's Wild Ride - 5 Things You Must Know Before the Market Opens Tuesday

The Dow's Wild Ride - 5 Things You Must Know Before the Market Opens Tuesday