The average energy stock in the S&P 500 gained 5% in the first half of 2018, which is noteworthy considering that the index was only up about 1.7% overall. While oil stocks led the charge thanks in part to red-hot crude prices, several nonproducers also had strong first halves. However, that rising tide didn't lift all boats; the stocks of several oil producers lost value. Likewise, a handful of nonproducers underperformed, led by this trio:

Energy Stock

YTD % Change

Type of Company 

Halliburton (HAL -0.34%)

-9%

Oilfield services

Williams Companies (WMB 0.31%)

-12.4%

Pipelines

Cabot Oil & Gas (CTRA 0.68%)

-17.8%

Natural gas producer

Returns as of July 2, 2018.

Oil field workers near a drilling rig.

Image source: Getty Images.

Halliburton: Higher oil prices haven't fueled more drilling just yet

Halliburton seemed to get off to a good start in 2018. In January, the oilfield-service giant posted solid fourth-quarter numbers and provided a bullish forecast for 2018, which sent its stock higher.

However, that optimism started souring as the first quarter wore on. In mid-February, the company announced that because of weather issues, it was experiencing problems getting sand used for fracking, which would cause its first-quarter results to miss expectations. Meanwhile, in that report, the company also said that it was experiencing tightness in the labor market as well as in its supply chain, and would need to absorb those costs. More problems have emerged in the second quarter as pipeline constraints in the fast-growing Permian Basin are forcing drillers to leave a record number of wells unfinished, which will likely impact Halliburton's well-completion activities in the near term.

These issues led several analysts to turn bearish on Halliburton. One of them was BMO Capital, which cut its earnings view not only for 2018 but also for next year. BMO now expects Halliburton to earn $2.24 per share this year and $2.73 in 2019. Those figures are 10% and 20%, respectively, below its initial views due in part to an anticipated 20% decline in well-completion activity in the Permian Basin until new pipelines start up toward the end of next year. That issue could continue to weigh on Halliburton's stock for the next few quarters.

Williams Companies: Going on sale

Natural-gas pipeline giant Williams Companies seemed to get 2018 off to a solid start by announcing that its growth engine restarted at the end of 2017. That growth trajectory continued in the first quarter of this year as the company posted solid results thanks to the strong showing of Williams Partners (NYSE: WPZ), its master limited partnership (MLP). Furthermore, the company noted that it secured several high-return expansion projects in recent months, putting it on pace to deliver high-octane dividend growth in the coming years.

Williams did receive some disappointing news earlier in the year when regulators said that MLPs could no longer recover an allowance for income taxes as part of their cost-of-service fees. However, the company quickly addressed that potential problem by agreeing to acquire all the units of Williams Partners that it didn't own in a transaction that will sidestep the tax issue. Once that deal closes, it should transform that headwind into a tailwind, and further position Williams to grow its now 4.9%-yielding dividend at a high rate for the next few years.

A wellhead with several valves.

Image source: Getty Images.

Cabot Oil & Gas: Still cashing in despite cooler pricing

While the price of crude oil has been red-hot this year, natural gas has cooled off, slumping about 20% through the first half of the year. That sell-off has weighed on shares of Cabot Oil & Gas, since it makes most of its money by producing gas out of the Marcellus Shale.

However, while the price of gas is down this year, Cabot is still making good money. The company generated $272.9 million in cash flow during the first quarter, which was more than enough to fund its growth-focused capital plan, providing it with free cash flow. The company has been using that excess money along with the proceeds from some non-core asset sales to buy back stock. Cabot repurchased 5 million shares last year and now has the authorization to buy back another 30 million shares, which represents 6.5% of its outstanding stock. While that buyback hasn't helped boost shares yet this year, it could prove to be a needle-moving catalyst in the coming quarters given what similar buybacks have done for its oil-producing peers.

Some interesting bargains for the second half

While issues in the oilfield service market could continue weighing on Halliburton's stock this year, the catalysts causing the sell-offs in Williams Companies and Cabot Oil & Gas seem overblown in my opinion. Because of that, both stocks look like they could rebound in the second half of 2018, with Williams in particular a compelling stock to consider buying right now.