What happened

Oil prices continued to meander higher this week, ending up less than 1% to around $54 per barrel. That marked crude's highest finish in the past five weeks, fueled by reports that oil demand was coming in stronger than expected while OPEC members were mostly complying with their pledge to cut output.

Unfortunately, higher oil prices could not lift most oil stocks out of the doldrums this week. Lackluster earnings and a continued bleak outlook for the offshore drilling market sank several oil stocks. Leading the underperformers, according to data from S&P Global Market Intelligence, were Hornbeck Offshore Services (NYSE:HOS), Atwood Oceanics (NYSE:ATW), Bristow Group (NYSE:BRS), and Matrix Service Company (NASDAQ:MTRX):

BRS Price Chart

BRS Price data by YCharts.

So what

Matrix Service Company led this week's losers after reporting lackluster results for its fiscal second quarter. The construction and engineering company missed on both the top and bottom line, due primarily to lower volumes in its oil gas and chemicals segment. Because of that, the company pulled back the reins on its full-year guidance. Needless to say, the combination of an earnings miss and a downward revision to guidance did not sit well with Matrix Service's investors, who sold off the stock.

Atwood Oceanics' stock also plunged after releasing earnings. The offshore driller's revenue continued to slide, while earnings missed expectations because the company could not push costs down as much as expected. Making matters worse, Atwood Oceanics' outlook was not very appealing, with the company saying that it could be another year before offshore drilling activities start improving. Meanwhile, rival Diamond Offshore Drilling (NYSE:DO), painted an even bleaker picture of the offshore market this week. Diamond Offshore said that it has "yet to see a floor in the declining demand for deepwater assets." Worse yet, Diamond Offshore said it did not anticipate a recovery until 2019 or 2020. The bleak offshore drilling outlook caused an analyst from Evercore to suggest that Atwood might need to issue equity to stay afloat given its shrinking backlog and hefty debt load.

Silhouette of an offshore oil drilling rig.

Image source: Getty Images.

That gloomy outlook for the offshore drilling sector seemed to weigh on service companies Hornbeck Offshore Services and Bristow Group because it implies that they will not see an increase in demand for their services. In Bristow's case, last week's sell-off erased its post-earnings pop from the previous week after it reported better-than-expected results and secured new financing to help it stay afloat. That's because it's possible that conditions could still get worse before they start getting better.

Now what

While green shoots are popping up across the onshore oil and gas marketplace, the offshore market is quite a different story. Drilling activities continue to slow down, which is putting further pressure on offshore drillers and service providers. There's no bottom in sight, which is why investors are better off turning their attention to companies that have exposure to the improving onshore market for the time being.

Matt DiLallo has no position in any stocks mentioned. The Motley Fool owns shares of and recommends Atwood Oceanics. The Motley Fool has a disclosure policy.