Shares of Devon Energy (DVN -0.95%) have been all over the place so far in 2018. Investors initially pounded the stock after it reported disappointing fourth-quarter results to start the year. However, it has recovered since then after posting much better numbers in the first quarter as well as surprising investors with a big-time dividend increase and share buyback program. Still, shares are only up about 7% this year even though crude prices have been scorching-hot, rocketing more than 20% year to date.

That underperformance, though, could reverse in the second half of 2018 thanks to Devon Energy's expanded share buyback program, making it a top oil stock to consider buying right now.

Pump jack with orange sunset.

Image source: Getty Images.

Backing up the truck

After selling some noncore assets in March, Devon Energy announced plans to send back significantly more cash to its shareholders going forward. It boosted its dividend 33% while also authorizing a $1 billion share repurchase program, which was enough to retire 6% of its outstanding stock at the time. The company quickly got to work buying back shares, spending $204 million on 6.2 million of them by the end of April, putting it on pace to complete the program by year-end.

However, after announcing the sale of its interest in EnLink Midstream Partners (NYSE: ENLK) and EnLink Midstream (NYSE: ENLC) for $3.125 billion in June, it boosted its buyback authorization up to $4 billion. That represents enough cash to retire roughly 20% of its outstanding shares. Devon expects the sale of EnLink to close this July, which will enable it to accelerate the pace of repurchases through the end of 2019.

Unrivaled in its peer group

The size of Devon's buyback is worth noting given the impact that smaller plans have had on the shares of rivals in the past year. Last fall, for example, Anadarko Petroleum (APC) announced a $2.5 billion share repurchase program, which at the time could have retired 10% of its outstanding shares. Anadarko would go on to add $500 million to that plan earlier this year, which it expected to complete by the end of the second quarter. It's been a needle-mover for the company's stock, which has rocketed 63% since it made the initial announcement in September. For comparison's sake, Devon's stock is up about 27% over that time frame while crude has surged 39%.

Hess (HES -0.90%), meanwhile, authorized a $500 million buyback last fall, which it boosted by $1 billion earlier this year. At the time, that was enough money to retire about 10% of Hess' outstanding stock. The company has been making quick work of that authorization, buying back the first $500 million by the end of the first quarter and commencing an accelerated share repurchase in April for another $500 million. Those repurchases have helped drive Hess' stock up more than 50% since the initial announcement last November, vastly outperforming oil -- up 27% since then -- and Devon Energy, which is up about 16% over that span.

Those needle-moving repurchase programs are a key reason why Anadarko and Hess are two of the best-performing oil stocks so far in 2018. Given that Devon Energy's buyback is even larger, and its shares have underperformed, its stock has the potential to significantly outperform most other oil stocks in the second half of this year as it starts buying back shares hand over fist.

The run is nowhere close to being done

Devon Energy's buyback has already started to move the needle for investors considering that shares have rebounded 43% since hitting bottom in early March. However, the stock still has plenty of room to run since it's barely up for the year and still trades at a discount to its peers, which it hopes to address by accelerating its share repurchase program. That buyback-fueled upside potential is why I think it's the top oil stock to buy heading into the second half of 2018.