One way to invest in the energy industry without actually buying stock in oil and gas companies is to buy shares of oilfield services companies. But there's no guarantee that they won't be affected by the same trends that hit the drilling companies they serve.

In October, sure enough, shares of three of the biggest oilfield services companies -- the French giant Schlumberger (SLB 0.26%), Halliburton (HAL 1.60%), and Baker Hughes, a GE Company (BKR 0.56%) -- all underperformed the market; they lost 15.8%, 14.4%, and 21.1% (ouch!), respectively, according to data provided by S&P Global Market Intelligence. Some smaller players fared even worse, with frack sand and services provider Hi-Crush Partners, L.P. (HCRS.Q) down 30.3% for the month.

Here's what had these companies down, and what to do next.

Men in hard hats stand near an onshore oil rig silhouetted at sunset.

The oilfield services industry has received little love from the stock market this year. Image source: Getty Images.

It's all about the price

As with many energy companies, the price of oil has an outsized influence on the performance of oilfield services stocks. When oil prices rise, it becomes more profitable to drill for oil, and oilfield services companies can charge more for the equipment and services they offer. When oil prices are down -- as they were during the oil price slump of 2014-2017 -- oilfield services companies feel the pinch. That's what led to General Electric (GE -1.75%) merging its oil and gas division with Baker Hughes to form Baker Hughes, a GE Company.

For much of the year, crude oil prices had been on an upward trajectory. In fact, both Brent crude (the benchmark that governs most international oil sales) and WTI crude (which governs most domestic oil sales) hit three-year highs at the beginning of the month. Brent crude was trading for $85 per barrel, and WTI crude topped $75 per barrel.

But in October, both those benchmark oil prices declined. The Brent crude spot price dropped 9.5% during the month, to $74.84 per barrel, while the spot price for WTI crude fell by 10.7% to end the month at $65.31 per barrel. That made October the worst month for oil prices this year. It's not surprising that the market reacted to punish oilfield services stocks.

Baker Hughes may have a GE problem

In addition to the declining oil price, Baker Hughes -- whose share price fell further than those of its main competitors Halliburton and Schlumberger -- may have been hurt by the ongoing woes at parent company General Electric. Although Baker Hughes is a stand-alone company, GE retains a 62.5% ownership stake, which GE has announced plans to sell as part of an ongoing streamlining effort.

It's been another rough year for General Electric. Continuing underperformance from its flagship power segment led the company to revise its 2018 guidance downward (again). An aggressive turnaround plan by then-CEO John Flannery did nothing to stop the stock's precipitous fall, and that got Flannery abruptly ousted by the board on Oct. 1. Flannery's plan included divesting GE's stake in Baker Hughes over the next two to three years, but new CEO Larry Culp hasn't addressed this issue directly. That uncertainty may be weighing on Baker Hughes' shares.

Why Hi-Crush got crushed

As a supplier of sand for fracking, Hi-Crush operates in a specialized niche of the broader oilfield services sector. In fact, about half of its sand is sold to larger oilfield services companies like Schlumberger and Halliburton. The rest is sold directly to oil and gas producers. Either way, lower oil prices still hit Hi-Crush in the end.

But higher oil prices, ironically, have also been a thorn in the company's side in recent months. As oil prices increased, more oil companies started producing oil through fracking, which was good for Hi-Crush and its oilfield services peers.

All that black gold had to be transported, though, which led to network constraints as oil pipelines hit full capacity. Full-capacity pipes meant that some producers had to cut back on fracking, which led to a glut of frack sand on the market and lower prices for Hi-Crush; its stock is now down 41.4% for the year. Adding to the complexity, Hi-Crush is in the process of converting itself from a master limited partnership to a C-corp structure, which may materially change the investment thesis. We'll have to wait and see.

Now what

Oilfield services companies haven't performed particularly well over the last five years. They actually held up pretty well during the oil price slump -- at least, compared to independent exploration and production companies -- but they've massively underperformed the broader market, and October didn't help any.

Investing in oilfield services is a marathon, not a sprint, and the month's losses don't materially alter the investment thesis in this sector, which is a long-term thesis, to be sure. In fact, the price declines could make this a good time to consider buying in for the long haul. But be prepared for a long haul.