Based on the recent performance of Core Laboratories' (NYSE:CLB) shares, you would expect that this quarter's earnings were going to look rough. Its shares have traded almost in lockstep with the price of Brent crude over the last year, and the decline in oil and gas activity would make it easy to assume that Core's earnings would reflect that. 

Well, I guess that's what happens when we assume. 

This past quarter, Core's earnings were not only able to beat analyst expectations, the company was also able to increase its operational margins compared to the last quarter despite the decline in activity. That's pretty impressive. Let's take a look at Core's earnings report to see how the company was able to pull off earnings in the time of low oil prices. 

By the numbers

 Core Labs quarterly results Q2 2015 Q1 2015 Q2 2014
Revenue $204 million $213 million $267 million
EBITDA $54.8 million $57.0 million $89.1 million
Earnings per share (normalized)  $0.82 $0.86 $1.35

Source: S&P Capital IQ and company earnings release

Core Lab's results were quite the pleasant surprise when compared to predictions from Wall Street analysts. Quarterly revenue beat analyst expectations compiled by S&P capital IQ by 5% and earnings per share beat those same expectations by a robust 14%. While it was a bit of a surprise from Wall Street, management had previously said that last quarter would be the weakest in terms of operational margins, and that this quarter would be the weakest in terms of total revenue. 

The first half of that prediction came true, as operational margins across the board rose 30 basis points to 24%.

You may ask yourself, how did I get here?
It almost seems puzzling that Core Labs was able to increase margins across the board in a market that is supposed to be in decline. Many producers have said numerous times that they plan to cut back spending and renegotiate prices with its service contractors in order to preserve costs.

For Core, it has three primary competitive advantages working in its favor. The first is that the company has a very strong presence internationally. Yes, oil and gas activity in general across North America and a few other places are down, but in places like the Middle East production activity has remained rather constant. Some of Core's largest clients are in the Persian Gulf region and are looking to maintain production in their supergiant reservoirs through enhanced oil recovery. These long-term projects help to insulate Core somewhat from the wild ups and downs of the North American market.

Core has been able to remain very strong in the North American market because of its technological advancements in segments such as production enhancement. The company recently rolled out several new production enhancement technologies for use in shale drilling and hydraulic fracturing, and based on current field results they are reducing costs and improving well economics. Since Core's offerings allow producers to cut back spending on hydraulic fracturing, it is able to preserve pricing power on its offerings while others bear the brunt of the cost cuts.

Also, Core has the advantage of being a very low capital intensity business with much fewer fixed costs than many other oil service companies. Since it doesn't have a lot of hard equipment like drill rigs and pumping equipment that need constant maintenance, it is much easier for Core's management to cut costs when times get rough. Management even mentioned in its quarterly release that much of its margin improvement over the sequential quarters came from its ability to quickly cut costs and adapt to market conditions. 

These three factors have played a huge part in allowing Core to not only remain profitable through these rough times, but also suggest that when oil and gas drilling activity picks up again there will be some very good times ahead for this stock.

What a Fool believes
If anything, this quarter was a confirmation that Core remains one of the best performing oil services companies. Based on aftermarket trading following the earnings release, Wall Street is starting to remember why it was such a darling just a couple years ago. Core's business of improving well economics through its high-tech offerings will be in demand for years to come as more expensive barrels of oil, such as from ultradeepwater reservoirs, make up a larger percentage of the world's oil production. Knowing this and seeing Core's ability to work through the down cycles of the industry, it's hard to not like owning this stock.

Tyler Crowe owns shares of Core Laboratories. You can follow him at Fool.com or on Twitter @TylerCroweFool.

The Motley Fool recommends Core Laboratories. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.