This past year has been a bit of a let-down for Helmerich & Payne (HP -2.43%) investors considering that the stock shed a quarter of its value, erasing a big chunk of last year's rebound. That slump came despite the fact that the price of oil, drilling activities in the U.S., and the company's revenue all rose this year. Profits, though, remained elusive, which is something investors couldn't forgive.

Here's a look at why the company couldn't pull out of the red this year -- and why that trend might continue.

Drilling rig with the setting sun.

Image source: Getty Images.

A mixed bag

Helmerich & Payne reported its fiscal 2017 results in late November. On the positive side, revenue rose 11% to $1.8 billion, driven by a rebound in the company's U.S. rig count. Overall, the company put 102 rigs back to work and had 197 rigs drilling at the end of September, which was the largest ramp-up in activity in the company's history. Further, its share of the U.S. market increased from 15% to 20%. Despite these improvements, though, the drilling contractor's net loss widened from $56.8 million to $128 million.

One of the issues is that despite the huge surge in drilling activities, only 55% of the company's rigs were back to work by the end of its fiscal year. Meanwhile, margins compressed significantly, with the company's average rig margin per day in the U.S. falling from $17,252 in fiscal 2016 to $7,984 in 2017's fiscal year despite the fact that fleet utilization rose from 30% to 45%. The culprit was the roll off of more lucrative legacy drilling contracts, and the higher costs incurred as it activated or upgraded rigs for customers.

This issue wasn't specific to Helmerich & Payne. Rival Precision Drilling's (PDS -1.87%) revenue and profitability also went in opposite directions this year. Again, the culprit was weaker margins in the U.S. In Precision Drilling's case, utilization nearly doubled while revenue per rig sank 30.5% even as operating costs rose 13.5%.

An oil field at sunset.

Image source: Getty Images.

The chill of low oil prices frosts demand

While higher oil prices earlier in the year drove the pickup in drilling activities, Helmerich & Payne noted that the industry quickly lost its momentum. CEO John Lindsay stated last quarter that "headlines were dominated by oil price uncertainty which remained range-bound in the mid $40s and set expectations for a substantial rig count reduction for the balance of 2017." While the rig count in the U.S. did decline for several weeks in a row after peaking during the summer, they've started coming back as oil rebounded:

US Rig Count Chart

U.S. Rig Count data by YCharts.

That said, even with some improvement in oil and the rig count, Helmerich & Payne expects its margins to fall in the near term. For its fiscal first quarter, the company is guiding for a $7,600 per day margin in its U.S. land operations, which is down from the roughly $8,000 per day it earned last quarter. That outlook makes a return to profitability all the more elusive in the current quarter.

Further, there has been a notable shift in strategy from oil companies over the past several months. Instead of pouring everything that comes in back into new wells, many drillers are starting to return cash to shareholders. Anadarko Petroleum (APC), for example, expects to spend between $4.2 billion to $4.6 billion next year, which is enough money to grow its oil production 14%. However, Anadarko noted that its plan breaks even at $50 oil. Because of that, it's on pace to generate $700 million in free cash flow in 2018. That would give it even more cash to send to investors above the $2.5 billion buyback it announced earlier in the year as it returns some of the $6 billion cash war chest it built up during the downturn.

Hess (HES -0.76%), likewise, isn't exactly hitting the accelerator now that oil is in the mid $50s since it only plans on increasing its rig count in the Bakken Shale from four to six next year. While Hess could afford to spend more, it has decided that the better course of action would be to repurchase $500 million in stock and use another $500 million of its cash to reduce debt. This decision by drillers to return money to shareholders could keep rig rates from rising sharply in 2018, which could slow Helmerich & Payne's ability to get back into the black.

So close to the turn

While Helmerich & Payne lost money last year, it's getting closer to the turning point. That's because the company owns some of the most sought-after drilling rigs in the industry since they can efficiently and cost-effectively drill wells right into the best spots of a shale formation. That fleet could be in high demand next year if oil prices keep improving, which points to the possibility that Helmerich & Payne's stock could rebound sharply in 2018.