After a brutal stretch, the oil industry is beginning to recover. Oil prices have improved significantly in the past year, which has helped sentiment. That said, oil stocks, for the most part, haven't followed crude higher. We think that's providing an opportunity for investors to buy some high-quality oil names at excellent prices right now. Read on to learn why our Foolish investors like Anadarko Petroleum (APC), Apache (APA 0.67%), and Marathon Petroleum (MPC 0.55%)

500 million more reasons to think this oil stock could be heading higher

Matt DiLallo (Anadarko Petroleum): Oil giant Anadarko Petroleum has undergone a dramatic transformation over the past few years. It drove down costs and sold off lower-margin assets, which put the company in the position to prosper at lower oil prices. In fact, at $50 a barrel, Anadarko can generate enough cash to finance the projects needed to increase its oil output at a 10%-14% compound annual rate.

Oil pumps at sunset.

Image source: Getty Images.

As a result, the company no longer needed the $6 billion cash war chest it built up during the downturn. That led Anadarko to announce plans to return $2.5 billion of that money to investors by the end of this year via a share buyback program. The company has already repurchased $1.6 billion of shares, which helped fuel a nearly 40% gain over the past few months.

That said, while shares rocketed off their bottom last summer, they're still down about 11% over the past year. That suggests they could have much further to go, especially since the company recently added another $500 million to its share repurchase program and boosted its dividend fivefold, bringing that payout nearly back to where it was before oil prices crashed. Meanwhile, if oil remains in the $60s, Anadarko would stay on pace to generate more than $1 billion in excess cash annually, which could provide the company with even more money to repurchase shares. Those buybacks, along with an improving oil market, could keep this oil stock's upward momentum going.

Ups and downs...and hopefully ups

John Bromels (Apache Corporation) Owning stock in Apache Corporation isn't for the faint of heart lately. The company's shares seem perpetually poised to break through the $50 threshold, only to get battered down again and again. 

The latest beatdown was a one-two punch after the company projected lower-than-expected Q4 2017 production thanks to a third-party pipeline issue, followed by the market correction last month. That's knocked the company's stock back under $40 per share, which I think is an excellent price given the company's growth prospects.

Apache made several savvy moves in 2017 to shore up its operations, including selling off its underperforming Canadian assets and investing heavily in its monster Alpine High play in West Texas, which should come fully on line this quarter. Those changes, combined with the rising price of oil, should put Apache on firm footing for outperformance. And when you factor Apache's best-in-class 2.6% current dividend yield into the mix, you get a stock with great prospects currently trading at a dirt-cheap price. It's a great time to buy.

Playing small ball for big returns

Tyler Crowe (Marathon Petroleum): There is something impressive about companies that can manufacture earnings-per-share growth in industries where revenue growth is difficult to come by. Oil refining is quite possibly the poster child for a no-growth industry -- total gasoline supplied to the U.S. market has only grown 20% over the past 30 years. Despite this go-nowhere industry, Marathon Petroleum has done a great job in manufacturing returns for its investors.

The combination of refining and marketing, midstream pipelines and processing, and retail businesses gives Marathon a diverse offering that helps to offset the inherent volatility of the oil refining industry. In fact, the company's midstream business -- which mostly comprises of its equity investment in master limited partnership MPLX -- and its Speedway retail network combined for $2 billion a year in operating income. This means that Marathon's business throws off a lot of cash that management generously gives back to investors in the form of dividend increases and share repurchases. These initiatives have led to the company delivering incredible returns since Marathon Oil spun it off in 2011. 

MPC Average Diluted Shares Outstanding (Quarterly) Chart

MPC Average Diluted Shares Outstanding (Quarterly) data by YCharts.

Generating value for investors through share repurchases and steady dividend increases isn't nearly as sexy as growing revenue at a double-digit clip, but they accomplish the same goal. With shares of Marathon trading at 20 times earnings, that seems like a reasonable price to pay today.