Shares of Sonic (NASDAQ:SONC) recently jumped 19% to a new all-time high on the announcement that the drive-in chain is being acquired by Inspire Brands. It's been a great run for the throwback fast-food chain; shares were up 50% in the last year before the news broke. The sale will close out a profitable journey for owners of the stock, and now looks like a great time to exit for shareholders.

Where Sonic is headed

Sonic is being scooped up for $2.3 billion, including the company's debt. For owners of the stock, that means a cash payout of $43.50 per share -- a 19% premium over the share price the day before the announcement.

The chain will become part of multi-restaurant operator Inspire Brands, which was formed after Arby's acquired Buffalo Wild Wings in late 2017. Inspire is majority owned by private equity firm Roark Capital Group.

When Arby's and Roark Capital announced the purchase of Buffalo Wild Wings nearly a year ago, it was after a two-year stretch of poor restaurant industry performance. Shares of Buffalo Wild Wings and other restaurant stocks had pessimism priced in, and I argued it was a great time for the private restaurant company to make its move but a poor time for B-Dubs owners to sell out.

The industry has recovered in a big way this year, and Inspire said it is taking Sonic private to capitalize on its rebounding bottom line. While I thought selling out of B-Dubs a year ago was unfavorable, this time around I think it's a good time for shareholders to part ways with their restaurant holding.

A close-up shot of a man taking a bite out of a hamburger.

Image source: Getty Images.

Selling when others are greedy

Sonic's resurgent share price in 2018 has been driven by stabilizing same-store sales and a big share-repurchase program. During the drive-in's 2017 fiscal year, company-operated locations finished with a 3.2% decrease in same-store sales, and franchised locations had a 4.7% decrease. The story in 2018 has been different; through three quarters of the fiscal year, management was forecasting full-year comps to be flat to down 1%. Preliminary fourth-quarter results showed company-operated comps up 2.5%, and franchises up 2.6%.

That reversing trend should lead to higher profits for the drive-in and its new owner. However rosy that outlook may be, though, Sonic has actually lagged behind the overall industry recovery this year. According to the U.S. Census Bureau, consumer spending at restaurants is up 6.2% in 2018, and since the fourth quarter of 2017, industry researcher TDn2K has been reporting positive comps for the first time since 2015.

A bar chart showing negative restaurant industry comparable sales from 2016 through third quarter 2017. Starting in fourth quarter 2017, sales have been positive, though under 1%.

Chart by author. Data source: TDn2K.

But in spite of those increases, there are still serious issues. To capture all the extra spending on eating out, restaurant chains have been opening new locations -- at a faster pace than spending can keep up. As a result, foot traffic at existing stores remains in decline. TDn2K said average industry foot traffic fell 2.7% and 2% in the first and second quarters of 2018, respectively.

Competitors expanding their footprint, especially in the better-burger segment, have taken a bite out of Sonic's otherwise stellar rebound. With consumer spending riding high and restaurants fighting over foot traffic, any slowdown in dining out could spell disaster for the industry. That isn't exactly priced into Sonic's stock. Forward P/E sits at 26.2.

It's possible that Sonic could generate some more upside if it went it alone, but Inspire's near-20% premium seems more than fair given the restaurant world's persistent problem of overexpansion. With others acting greedy, now looks like a good time to get out of Sonic stock at a premium price -- and maybe other hot restaurant stocks as well.