You may not have noticed, but Shake Shack (NYSE:SHAK) stock has quietly gained 51% this year. Shares of the fast-casual chain were once maligned by investors after they collapsed from a peak around $95 a share following a wave a post-IPO euphoria. However, given the stock's gains so far this year, the market now seems to believe in the company's growth story.

Shake Shack shares surged 18% after its most recent earnings report in May as the company sprinted past analyst estimates: Adjusted earnings per share increased from $0.10 to $0.15, crushing the consensus at $0.08, and the company beat on the top line as well. The burger chains also raised its full-year revenue guidance from $444-$448 million to $446-$450 million, and said comparable sales increased 1.7%, the fastest pace in several quarters.

From there the stock continued its rise, tacking on another 20% even though there was little news out on the company in that period. Investor enthusiasm following the latest earnings report seemed to suffice to push the stock higher.

Since the run-up the stock trades at a lofty P/E of 105. Given that figure, it's clear investors are expecting big profit growth ahead. Let's take a look at where the company is going to determine whether the stock is a buy today.

A line outside a Shake Shack in West Hollywood

Image source: Shake Shack.

The growth story

A stock doesn't get a triple-digit P/E without big growth expectations, and Shake Shack has captured investors' imaginations in a way that almost no restaurant stock has in recent years. The company carries the pedigree of well-respected restaurateur Danny Meyer, and its original location in Manhattan became a bona fide tourist attraction with consistently long lines.

As of the May report, Shake Shack had 95 domestic company-owned restaurants, but the company sees room in the market for 450 locations, meaning the domestic base could grow nearly fivefold from here. The brand has also been popular internationally, with huge lines at openings in Asia, and the stock even moved higher when the company announced plans to go into the Philippines. 

Shake Shack hasn't provided international guidance, but the company has 63 international locations as of its most recent report. Considering that chains like McDonald'sStarbucks, and Yum! Brands have thousands of stores abroad and thousands in Asia alone, there should be plenty of growth opportunity abroad for Shake Shack as well.

Reasons for concern

Despite a seemingly clear path for growth, expansion hasn't always been easy for Shake Shack and its ilk. Plenty of fast-casual chains IPOed earlier this decade chasing the popularity of Chipotle stock. However, growth quickly faded at companies like Potbelly, Noodles & Company, and Habit Restaurants, and their stocks subsequently dove.

Shake Shack may have a stronger brand than any of those chains, but its performance has at times disappointed. For instance, the company's comparable sales turned negative for several quarters, and even its 1.7% growth in its most recent quarter came thanks to a price increase, as traffic still fell. Shake Shack's average unit volumes are also declining as the company expands into new parts of the country. Management warned about this during the IPO, but nonetheless the falling average unit volumes could present a meaningful headwind against profitability growth in the coming years, especially if comparable sales remain flat.

And the company's high valuation also means that the stock could collapse if growth suddenly slows, as high expectations are baked in.

Is it a buy today? 

Analysts have consistently underestimated Shake Shack's profit growth throughout its publicly traded history. The company has beat earnings estimates in 11 of its 12 quarterly reports and matched it in the other, and five times it's beaten estimates by 50% or more, including in the last two quarters.

Considering that the company's financial performance should continue to benefit from increased prices, a lower tax rate, and aggressive expansion, it's puzzling that analysts actually expect the company's earnings per share to fall from $0.57 to $0.54 this year. In other words, the company continues to have a low bar to overcome to impress the market.

That may be the biggest argument for buying the stock today, along with its considerable growth opportunity. While its valuation presents a downside risk if Shake Shack's growth were to suddenly slow, I'd still call the stock a buy, as the company should easily be able to grow past the analyst yardstick over the coming quarters.

Jeremy Bowman owns shares of Chipotle Mexican Grill, Habit Restaurants, Shake Shack, and Starbucks. The Motley Fool owns shares of and recommends Chipotle Mexican Grill and Starbucks. The Motley Fool has a disclosure policy.