Starbucks (SBUX -0.54%) shares have been on quite the run, rising 45% over the past 12 months (as of this writing). This compares very favorably to the S&P 500, which is up just 2% during the same time. Amidst the uncertain economic environment, Starbucks just posted solid financial results that shareholders can be happy about. But what's in store going forward? 

Let's look at what's happening with this leading coffeehouse chain to see what investors should do with this top restaurant stock. In other words, is Starbucks a buy, sell, or hold? 

Starbucks posted a solid quarter 

In the most recent fiscal quarter (Q2 2023 ended April 2), Starbucks generated revenue of $8.7 billion, up 14% year over year. Diluted earnings per share (EPS) increased 36% compared to the year-ago period. Both of these figures beat Wall Street expectations. What's more impressive is that Starbucks' quarterly sales and diluted EPS were 38% and 49% higher, respectively, than the same period in 2019. This business struggled throughout the pandemic's height, but it appears to be on strong footing now. 

The headline numbers can certainly get shareholders excited, but what really stood out were comparable sales. Otherwise known as same-store sales, which measure revenue from stores open at least 13 months, "comps" jumped 11% globally, boosted by a 6% rise in transaction counts. That's encouraging to see, as it indicates that traffic to stores is up. In the U.S., comps were up 12%. 

Because Starbucks is a business that has worldwide reach, the pandemic's uneven recovery hurt operations. The U.S. recovered faster than other countries, particularly China, which has been dealing with strict lockdown measures that have affected consumer mobility. But in the last quarter, same-store sales in China increased 3%. 

"Moving on to China. Q2 marked a significant turning point when we finally began to emerge from three years of unprecedented COVID disruptions, embarking on the recovery journey that we have envisioned," CEO Laxman Narasimhan highlighted on the Q2 2023 earnings call. 

Despite all the positive news, investors sent shares lower following this announcement. This likely had to do with the management team leaving guidance unchanged. Starbucks expects revenue to be up 10% to 12% this fiscal year, with EPS up 15% to 20%. This would no doubt represent healthy growth, but shareholders probably wanted to see an upgraded financial outlook. 

Hold Starbucks shares for now 

In addition to what I thought were strong fiscal Q2 2023 financial results, there are other more important reasons that investors might like Starbucks stock. The most valuable attribute that Starbucks has is its quality brand that's recognized around the world. This premium brand results in people willing to pay a high price for what is a commoditized product. 

Bolstering the brand is Starbucks' top-notch rewards program. This provides a valuable channel for the company to drive engagement and promote repeat purchase behavior with its best customers. There are now 30.8 million active U.S. loyalty members, a 15% year-over-year increase. 

Starbucks' ability to continue staying relevant over multiple decades points to its durability and resilience. This is something shareholders should prioritize when looking for companies to own over the long term. This has to do with the nature of the restaurant industry. Coffee is so integral to society that it's hard to imagine a scenario where Starbucks ever goes away. 

While many investors might already believe that Starbucks' ubiquity limits its growth potential, it's best to rethink this assessment. Yes, the company has nearly 37,000 stores today. But by 2030, the goal is to have 55,000 locations running globally. Unsurprisingly, China will be a major growth market.  

Despite these attractive characteristics, there's one reason investors should hesitate before rushing to buy shares. With the stock up so much in the past year, it now trades at a price-to-earnings ratio of 35, nearly double the valuation from about 12 months ago. Therefore, I think it's best for shareholders to hold on to the stock right now.