Oil is up! No, it's down! A reversal is just around the corner! No, it's months or years away! There's a boom looming...or is it a crash? Buy! Sell! Hold!

Paying too much attention to the ups and downs of the oil market can drive you crazy. The plain fact is, nobody knows what oil prices are going to do next week, much less years from now. The best strategy for oil investors is to look for quality oil and gas companies that are poised to outperform their industry peers regardless of what happens to oil and gas prices in the short term. 

Three such companies that look like good buys right now are Royal Dutch Shell (RDS.A) (RDS.B)Enterprise Products Partners (EPD -0.07%), and Apache Corporation (APA 1.14%). Here's why they may be good picks for your portfolio.

Check out the latest ShellEnterprise Products Partners, and Apache earnings call transcripts.

Oil pours from a golden oil barrel.

The stock market hasn't been kind to the oil industry lately. But it's still worth a look for investors. Image source: Getty Images.

Large and in charge

There's no question that oil major Royal Dutch Shell was outperforming when oil prices were high. In its Q3 2018 earnings report -- covering the quarter that ended right before oil prices dropped in October -- the company announced it had churned out $14.7 billion in cash flow, of which just $2.6 billion was eaten up as working capital, for a final operating cash flow of $12.1 billion.

That was more cash than the company had churned out in a decade. Even more astonishing, during the last quarter in which it beat this record -- Q2 2008 -- oil prices were averaging more than $100 a barrel. 

But in Q4, oil prices began to slide, ending the quarter more than 40% lower. But you'd never know that from Shell's earnings. It actually posted higher operating cash flow -- $22.0 billion -- than it did in Q3. Even after adjusting for changes in working capital, operating cash flow was $12.9 billion. On a trailing twelve-month basis, that's the highest it's been since at least 2006. Revenue and net incomes also increased both sequentially and year over year. 

This shows  how the breadth of Shell's operations pay off for its investors. Earnings in its upstream (oil exploration and production) segment were down both sequentially and year over year, thanks to those lower oil prices. But Shell was more than able to make up for it with massive gains in its integrated gas and oil products segments. Even better, oil prices rose again in January, with Brent crude now trading at about $60. 

At a current P/E of just 11.3, and with a best-in-class dividend yield of 6%, Shell is a solid pick among oil companies.

Where it needs to go

One of the places Shell -- along with many of its peers -- is producing oil and natural gas is the red-hot Permian Basin of West Texas. In fact, the sudden burst of activity in the Permian is causing a bit of a problem right now due to a lack of infrastructure to handle it. Only two short years ago, there weren't a lot of pipelines in place that could get the Permian crude to the coastal refineries and storage facilities that could handle it, and there was a lack of marine terminals that could then export it overseas.

Enter Enterprise Products Partners, a pipeline master limited partnership (MLP) that's been working to address the bottleneck by building pipelines from the Permian. Enterprise already has a substantial domestic network of pipelines that transport crude oil, natural gas liquids (NGLs) like propane, and refined products like gasoline throughout the country. But it has invested heavily in the Permian to great success. 

Enterprise's Midland-to-Sealy crude pipeline, which can handle 575,000 barrels per day, opened in late 2017 and is filled to capacity. The company is also working on the Shin Oak pipeline (550,000 barrels a day), which will transport Permian NGLs to the Gulf Coast, with an expected completion in Q2 2019.

To make sure the petroleum from those pipelines has somewhere to go, Enterprise is also expanding its export capacity for crude oil and liquefied gas by renovating its Houston Ship Channel terminal and developing a pipeline to load crude oil offshore. 

Enterprise has a top-notch management team that has been very effective at deploying the company's resources and rewarding investors. With a yield that rivals Shell's (currently 6.2%), now's an excellent time to invest.

A beaten-down company

The Permian bottlenecks combined with the decline in oil prices have torpedoed the stocks of some Permian producers, including independent producer Apache Corporation. Apache's share price has dropped more than 30% since oil prices began falling in October 2018. 

But as usual, this could represent a buying opportunity, because oil prices seem to be stabilizing. And Apache is projecting that its production is going to rise sharply in 2019, particularly from its Alpine High find in the Permian Basin. In fact, Apache's NGLs will be transported by Enterprise's Shin Oak pipeline once it's completed, and Apache has also been making big investments in the necessary infrastructure to get its Permian oil and gas where it needs to go.

Apache is shareholder-friendly. Not only did it not cut its dividend during the oil price slump like many of its peers, but it also recently introduced a share buyback program. That makes it a compelling stock for a balanced oil and gas portfolio.

Finding the upside

The fortunes of the oil industry are always going to be affected by oil prices. The problem is that oil prices rise and fall far too frequently for investors to try to time the market. The best bet for oil investors is to pick solid shareholder-friendly companies and invest in them for the long term. Shell, Enterprise, and Apache all seem to fit the bill.