Source:McDonald's.

McDonald's (MCD -0.42%) has recently announced disappointing sales data for the month of May, and this is becoming a persistent problem for the company. The fast-food industry is going through a difficult period, and McDonald's is also facing increased pressure from both traditional competitors such as Yum! Brands (YUM -0.18%) and fast-casual players like Chipotle Mexican Grill (CMG 6.33%). On the other hand, the stock looks attractively valued at current levels.

Is the recent weakness in McDonald's a buying opportunity for investors, or is it better to stay away from the company, assuming performance will continue deteriorating over the coming months?

Stagnant sales
Global comparable sales increased by an unimpressive 0.9% in May, and emerging markets were relatively strong, with a 2.5% increase in comparable sales in the Asia-Pacific, Middle East, and Africa region. However, comparable sales in Europe increased only 0.4% during the month, and comparable revenues in the U.S. declined by a worrisome 1% versus May in 2013.

Systemwide sales adjusted by exchange rate fluctuations grew 7.4% in the Asia-Pacific, Middle East, and Africa region and grew 3% in Europe, but they still declined 0.1% in the U.S. during the month.

Sales weakness, especially in the U.S., has been a recurring problem for McDonald's over the last several quarters. Menu innovations have not yielded the desired results so far, and management is now planning to go in the opposite direction by focusing on traditional menu items and improving customer service in order to reinvigorate the business.

Many companies in the consumer segment are being hurt by lackluster demand over the last several months, and the fast-food industry is being seriously affected by the long-term trend toward healthier eating habits. However, McDonald's cannot blame its problems entirely on industry conditions, as competitors such as Yum! Brands and Chipotle Mexican Grill seem to be inflicting some damage on the fast-food giant via increased competitive pressure.

McDonald's vs. Yum! Brands and Chipotle Mexican Grill
Yum! Brands is also generating uninspiring growth figures in the U.S., but the company is turning its business around in China by leaving behind the controversy over its KFC poultry suppliers in the country.

Yum! Brands reported a whopping increase of 17% in China sales during the first quarter of 2014, on the back of increases of 11% and 8% in comparable sales in its KFC and Pizza Hut divisions, respectively. 

In addition, Yum! Brands is actively going after McDonald's in the breakfast segment in the U.S., with a recently launched breakfast menu from Taco Bell backed by an aggressive marketing campaign. McDonald's has traditionally enjoyed a leadership position in breakfast, and growing pressure from Yum! Brands could affect the company in a very valuable and coveted niche.

While fast-food companies are facing stagnant demand in the U.S., the fast-casual category is a very different story, and Chipotle Mexican Grill is one of the main beneficiaries of strong sales in that segment. Customers can't get enough of Chipotle's organic burritos, and traditional fast-food players such as McDonald's are feeling the heat to a considerable degree, even if they compete on the lower end of the pricing spectrum.

Chipotle Mexican Grill delivered an explosive increase of 24.4% in sales during the first quarter of 2014 to $904.2 million. Comparable-store sales jumped 13.4% during the quarter, indicating that demand remains remarkably strong and that Chipotle has abundant room for growth in the years ahead.

Mouthwatering valuation
Not everything is bad news for investors in McDonald's, though. The company's problems are yesterday's news at this stage, and the stock is trading at a considerable discount to better-performing competitors such as Yum! Brands and Chipotle Mexican Grill.

McDonald's trades at a P/E ratio of 18 times earnings, versus a P/E ratio in the area of 32 for Yum! Brands and a much higher P/E ratio of 53 for the growth leader in the industry, Chipotle Mexican Grill.

The stock pays a dividend yield of 3.2%, which is quite an attractive return for a financially solid company such as McDonald's. The House of Ronald McDonald has consistently raised its dividends in each and every year since making its first dividend payment in 1976, so the company has proven its strength to sustain growing capital distributions through good and bad times.

MCD Dividend Chart

MCD Dividend data by YCharts.

Foolish takeaway
McDonald's valuation provides a convenient entry point for investors who are willing to wait for the company to accelerate revenue growth, and the dividend yield should limit downside risk at current levels. Until -- or unless -- the company manages to generate higher growth rates, though, returns will most likely remain subdued, because the company's current performance does not merit a much higher valuation.