Down 34% in 2022, the Nasdaq Composite is firmly in bear market territory this year. Interest rates that are rising quickly to curb still-soaring inflation have pressured asset prices. And some experts are calling for a recession in the near future. 

Top consumer brands like Starbucks (SBUX 0.53%) have not been spared in the downdraft. Its shares are down 22%. But investors shouldn't run for the exits and wait for stock prices to start rising again before buying. Now could be an opportune time to get in on this top restaurant stock. 

Starbucks is resilient 

Starbucks, with its global footprint of 35,711 total stores, sells a premium product. There are numerous different, cheaper options that customers can choose from in order to get their caffeine fix, but Starbucks reigns supreme. The company has become ubiquitous, and has generated a record $32.3 billion in revenue in fiscal 2022 (ended Oct. 2). 

Offering customers high-priced coffee works wonderfully well in a strong economy as people have more discretionary income to spend on nice-to-have things. But in a recession, Starbucks could be negatively impacted as consumers tighten their budgets and cut back on non-essential spending. Additionally, in a worsening economic scenario, like what many think we're in right now, people tend to drive and travel less, which decreases the number of times one could stop by a Starbucks location, lowering purchasing occasions. 

However, Starbucks' powerful brand can't be understated as it has been able to create consumer habits around its products that are extremely difficult to break. In its most recent fiscal quarter (Q4 2022), Starbucks saw revenue and same-store sales jump 3% and 7%, respectively, on top of remarkable growth registered in Q4 2021.

And the company opened 763 net new stores in the latest quarter. That's a strong overall showing in what many consider to be a weakening global economy. 

What's encouraging to see is that in the U.S., customer traffic was up 1%, with the average ticket size up 10% thanks to higher sales of cold beverages. In fact, traffic at U.S. company-owned stores is now at 95% of what it was pre-pandemic. Same-store sales in Starbucks' home market grew 11% year over year. And the company now counts 28.7 million active Rewards members in the U.S.

Unfortunately, it's a different story in China, which has usually been Starbucks' fastest-growing market. Pandemic-related lockdowns have crushed the business in the world's most populated country -- same-store sales fell 16% year over year in the latest quarter. 

But the leadership team is still very bullish on this giant market. "In China, we will continue to rapidly expand our store footprint, with approximately 13% growth expected in fiscal year 2023," CFO Rachel Ruggeri said on the Q4 2022 earnings call.  

Nonetheless, Starbucks was still able to post a solid quarter despite uneven results in its two most important markets. Looking ahead, management remains optimistic, expecting fiscal 2023 revenue to rise 11% (at the midpoint), with earnings per share forecast to increase 15% to 20%.  

Looking at valuation 

As of this writing, Starbucks shares are trading at a price-to-earnings (P/E) ratio of 26, which is slightly more than half the average valuation over the past five years. What's more, the coffeehouse chain is cheaper than other top restaurant stocks like Domino's Pizza and Chipotle Mexican Grill. 

If investors are looking for a way to strengthen their portfolios by adding a foundational stock to the mix, I think Starbucks is a good bet to buy and hold for the next five years. The business has ingrained itself in the daily lives of its customer base, and it possesses a premium brand that should do well no matter what the macroeconomic picture looks like.