Amidst the ongoing stock market rally, not all businesses are benefiting from bullish sentiment. McDonald's (MCD 0.17%) is an example.

Its shares are down 5% this year (as of March 27). And they currently sit almost 7% below their peak price. Investors looking to add a blue chip to their portfolios might be eyeing this opportunity.

Should you buy this top restaurant stock hand over fist and hold through 2024 and beyond? To help us answer that question, let's dive into some valid reasons on both sides of the argument with McDonald's.

McDonald's is a high-quality enterprise

As a leader in the restaurant industry for several decades, McDonald's has established itself as a dominant force in the fast-food space. And because of this standing, it has developed a wide economic moat that helps it fend off competition.

For starters, McDonald's possesses a globally iconic brand. This recognition has allowed the business to occasionally raise menu prices. And that has led to impressive same-store sales gains over the years.

The company's focus in recent years to invest heavily in its digital capabilities, in an effort to drive efficiencies and better serve its hungry customers, also helps bolster the brand's presence.

With $25.5 billion in 2023 sales and more than 40,000 locations, McDonald's is one of the largest restaurant chains in the world. Consequently, there are very few companies in the industry that have the scale advantages that this business does.

Because it can leverage its huge buying power with suppliers, McDonald's can get favorable pricing on food products and other inputs. A chain with far fewer locations doesn't have the ability to do this.

Additionally, when McDonald's invests in things like the previously mentioned technological foundation, or in marketing efforts, those dollars have a much higher return given the company's massive store footprint and customer base.

This leads to another incredible fact about McDonald's: It's extremely profitable. With only about 5% of stores company-owned, the business operates an asset-light franchise model that rakes in lucrative royalty fees. In the last decade, McDonald's operating margin averaged a stellar 38%.

Management uses the copious amounts of free cash flow the business generates to return lots of capital to shareholders. In the last 12 months, $3.1 billion was spent on stock buybacks and $4.5 billion on dividends, both of which boost investor returns.

Paying up for low growth

The factors that I just discussed undoubtedly make McDonald's one of the best companies out there. However, that doesn't mean it makes for a smart portfolio addition.

My philosophy is that if a stock doesn't have the potential to outperform the S&P 500 index over the next five years, then why take on the risk of owning it? In this case, I believe McDonald's will lag the broader index.

One key reason I feel this way is due to the company's muted growth prospects. To be fair, the executive team said that it plans to have 50,000 restaurants open globally by 2027. However, one has to agree that at this point, McDonald's is such a mature and ubiquitous enterprise that revenue growth won't be anything to write home about.

We've seen weaker demand trends more recently, during a time of economic uncertainty when McDonald's should be thriving. Same-store sales were up 4.3% in the U.S. in the fourth quarter, down substantially from a 10.3% bump in Q3. Management pointed to softness with low-income consumers, not an encouraging sign. The aforementioned price increases are a factor in this reduced demand.

According to consensus analyst estimates, McDonald's earnings per share are projected to rise at a compound annual rate of 7.4% over the next three years. It's usually a good idea to take these forecasts with a grain of salt, but that doesn't give investors a reason to be excited.

For that single-digit income growth expectation, investors are being asked to accept a price-to-earnings (P/E) ratio of 24.2. That valuation is slightly below McDonald's trailing five- and 10-year averages, but it's more expensive than the S&P 500.

Shares have also lagged the popular index since March 2019. The stock's poor track record is another reason that I believe McDonald's should be avoided, particularly for investors who seek to beat the market over the long term.