Restaurants are classified as "consumer discretionary" because customers can easily discontinue their patronage during a recession. McDonald's ( MCD) hasn't been adhering to that model.

Instead, the fast-food behemoth has been acting more like a member of the "consumer staples" sector: companies, like supermarkets, that sell everyday needs whose sales remain relatively stable, even during recessions.

It seems that even when squeezed for cash by the current recession, parents are finding the financial wherewithal to keep their kids in Happy Meals. Possibly also helped by commuters who are passing up pricier eateries for "Mickie D" lunches, McDonald's worldwide "comparable location" sales at its restaurants increased 1.4% in February compared with a year earlier. Because last month contained one fewer day than February of 2008, a leap year, sales adjusted for the calendar difference were 5.4% above a year earlier. January's global comparable sales leaped 7.1%.

The consensus forecast among securities analysts who track McDonald's is that net earnings per share will advance 2.4% for the fiscal year ending in December and climb 9.7% next year.

Some investors have taken notice. With the Dow Jones Industrial Average grabbing headlines for its slide this year, McDonald's stock is the No. 1 performer on the benchmark index during the past 12 months, falling only 0.2%.

As can be seen in the accompanying table, TheStreet.com Ratings' quantitative-evaluation model assigns McDonald's a "reward" mark of "A" and a matching "overall" grade. Only two stocks currently have earned higher overall grades than MCD, with only 39 better in the "reward" category.

Of 5,400 stocks with "risk" grades from TheStreet.com Ratings, only 16 have better marks than the hamburger giant.

McDonald's price-to-earnings multiple of 13 and a fraction, based on this year's estimated results, is in line with firms that are expected to hold up during the economic downturn. The same is true of its current dividend yield of 3.76%, which is comparable to the S&P 500's yield of 3.57% and surpasses the return on 30-year Treasury bonds.

If you liked this article you might like

Crazy Weak U.S. Dollar Will Make These 10 Companies Huge Winners

How Lethal Is That Happy Meal? Inside the Kids' Menus at McDonald's and More

How to Travel in Style Exactly Like Billionaire Warren Buffett

Panera Bread Dares CEOs of McDonald's, Wendy's and Others to Eat Off Kids Menu

How Healthy Is That Happy Meal? Inside the Kids' Menus at McDonald's and More