Investing in oil stocks can feel dangerous. Oil is a commodity, so branding seems largely irrelevant. Your stocks can get swept up -- or down -- by macro events. New oil discoveries can make small caps jump overnight -- but the opposite can happen if the well runs dry, or there is no oil at all. And oil companies typically carry large debt loads, with 28 filing for bankruptcy just last year (a number that will likely increase in 2019). So what's an investor to do?

Just keep digging! There are fascinating plays in the energy sector. All you have to do is find them.

fracking drilling rig

Image Source: Getty Images.

Fracking for profit

Almost a literal picks-and-shovels play, Solaris Oilfield Infrastructure (SOI -0.23%) doesn't dig for oil, but it helps others do so profitably. As the American oil industry has made a giant shift from offshore drilling to fracking for oil, Solaris has arrived to provide the necessary technology. This is the largest fracking operator in the oil patch -- yet it's somehow still a small cap.

While 2019 has been a down year for the oil industry, Solaris has seen nothing but growth. Its profit margin is 22%, and its revenue growth is 36%. That's a Rule of 40 score of 58, which is outstanding. To add to the good news, Solaris has $36 million in cash and a debt-free balance sheet, almost unheard of in the oil sector. The company generated $26 million in free cash flow in the most recent quarter.

And Solaris is seemingly immune to competitive threats. The 90% retention rate means a vast majority of customers stay, and most that do leave -- generally because another operator has undercut Solaris on price -- return when they discover that the efficiency of Solaris's operation saves them money overall. Indeed, while the price of oil has been depressed, Solaris is stealing market share from its competition. The company has more than 30 clients now, making up one-third of the available marketplace.

From a valuation perspective, Solaris is cheap, trading at 1.5 times its book value. The company has a price/earnings-to-growth (PEG) ratio of 0.19, and the stock is priced at a little more than $12 a share. That's the same price investors saw when the company had its IPO more than two years ago; since then, the share price has doubled, then been cut in half. So while this price is a do-over for the stock, the company is firing on all cylinders. When the price of oil rebounds, this stock should jump up and then some.

Apache's pipe player

Several years ago, Apache (APA -1.66%) made a big discovery in the Permian Basin in Texas. The oil company dubbed this find the "Alpine High," and there was much surprise when it was found to be largely made up of natural gas, not oil. While some have suggested this is a disappointment, Apache has jumped in with both feet.

Last year, the company spun out its pipe operation in the Permian Basin into a start-up called Altus Midstream (KNTK). Altus owns the pipes that will distribute the natural gas out from Alpine High, and it also owns minority interests in other oil and natural gas pipelines in the area.

Altus has fantastic numbers -- 14% profit margins and 99% revenue growth. It also boasts $377 million in cash and only $26 million in debt. Yet the stock has been a disaster. It's down 72% from its IPO price. Why the pessimism?

Part of it, perhaps, is because of the level of difficulty at Alpine High. It's taken Apache four years to properly map out the area and get a grasp on how big the find actually is. Over the past year, the company has drilled 180 wells going 5,500 feet down. In one of the test wells, Apache discovered pools of natural gas in 13 different places. The finds were vertically stacked on top of each other, with rock in between.

Yet the main problem facing Apache right now is not extraction, but the lack of sufficient pipelines in the area. And that is precisely the issue Altus is designed to fix. Major pipelines are opening up this month. Revenue at the company should dramatically escalate in the second half of this year. 

While Altus is still joined at the hip to the fortunes of Apache, in many ways the spinoff seems like a better investment. Altus is trading at 40% of its book value -- just twice the amount of cash it has on hand. That is dirt cheap. While it's always hard to catch a falling knife, the stock price seems to be fast approaching a floor. Given that 30% of the float is sold short, we might be at maximum pessimism right now. And that's a lot of future buyers who have to cover. For a calculated risk, this seems like a strong one.