NEW YORK (TheStreet) -- Yes, energy stocks are cheap, as crude prices reach a four-month low. But if you're looking to beat the market, look no further than refineries.

"The pocket of energy that is working are the refining stocks, those stocks are going up," said Mary Ann Bartels, chief investment officer of portfolio solutions at Bank of America's Merrill Lynch Wealth Management. With crude prices down 17% over the past month and 52% over the year, refiners can buy cheaper raw materials and turn out higher profits.

U.S. refiners, in particular, are worth considering, analysts said. That's because the price of U.S. crude, as measured by West Texas Intermediate pricing, and overseas crude, as measured by the Brent oil price, differs by more than $4 a barrel, said Fadel Gheit, an analyst with Oppenheimer & Co. West Texas Intermediate trades at $50.10 a barrel, while Brent trades at $56.56, representing a $6 spread.

"A spread above $4 is a 'buy' sign for refineries," Gheit said. "This makes U.S. refineries more attractive than overseas refineries, as the domestic ones can tap cheaper U.S. oil." 

In other words, the wider difference between WTI and Brent means higher profits for U.S. refineries, which can purchase oil at a lower price via WTI and sell it overseas for a profit. 

Also driving up refining profits is higher gasoline demand during the summer vacation season. "We have excess supply [of oil] and there's a lot of demand to refine," Bartels said.

Gheit has a "buy" rating on Valero Energy (VLO - Get Report) and Marathon Petroleum (MPC - Get Report). He also maintains "buy" ratings on refineries Phillips 66 (PSX - Get Report), Tesoro (TSO) and HollyFrontier (HFC - Get Report).

Overall, refining stocks have outpaced those of integrated oil companies so far this year, with a gain of 25% versus a drop of 13% on their respective S&P 500 sector indexes. While Valero shares have risen 35% so far this year, shares of titan Exxon Mobil (XOM - Get Report) slipped 11% and Chevron (CVX - Get Report) dropped 16%.

Overall, Bartels said the entire energy sector including integrated oil companies is cheap on a price-to-book basis, with a ratio of 0.61 compared with an average of 0.89 since 1986. But she said it's going to take time for oil producers to beat the market because crude prices will have to rise. 

Aside from refiners, analysts said oil field services company Halliburton  (HAL) and its acquisition target  Baker Hughes (BHI) are worth considering. Halliburton agreend to pay $34.6 billion for Baker Hughes, or $78.62 a share, a premium to Baker Hughes' current price of $60.65.

"If I'm a long-term investor who wants to buy Halliburton and agrees with us that the deal will close, you can buy Baker Hughes for a 9% discount," said Sterne Agee CRT analyst Stephen Gengaro, referring to the deal's spread. He maintains a "buy" rating on Halliburton and Baker Hughes.

Halliburton has said it hopes to close the deal towards the end of 2015.