It's not difficult to figure out why supermarkets and fast-food restaurants do well in a recession. Instead of going out to high-end restaurants, people stay home and buy more groceries instead. Granted, many supermarket stocks were down in late 2008, as investors yanked tremendous amounts of money from the stock market. But now that the selling pressure has clearly decreased, I believe defensive stocks like supermarkets and low-end restaurants will start to outperform.

Going to Mickey D's and Taco Bell
Even though many defensive stocks had a tough time in 2008, McDonald's (NYSE:MCD) was actually up about 10% last year, while the S&P 500 was down close to 40%. With a market capitalization of $65 billion, McDonald's is a mega-cap, making last year's outperformance even more incredible. Something must be going right with Mickey D's.

The company has long been considered one of the classic U.S. multinationals -- along with Coca-Cola (NYSE:KO), which also derives a big portion of its earnings from aboard. But Coke was down more than 20% in 2008, so clearly there's more going on under the Golden Arches than mere multinational reach.

McDonald's is growing at a healthy rate, while most other large corporations are struggling. Global comparable sales increased overall by 6.9 % (the U.S. by 4%, Europe by 8.5%, and the combined regions of Asia/Pacific, Middle East, and Africa by 9%). The fastest growth is concentrated in emerging markets; despite the global economic slowdown, those markets are unlikely to hurt McDonald's much, since its food is an "affordable luxury" in those places. Yes, I said luxury: In Eastern Europe, where I live, McDonald's has a much different cachet than it has in the United States.

Add to that performance a noticeable increase in operating margins, from 24.2% to 27.4%, along with a 16% earnings growth, and a recent 33% hike in the quarterly dividend, and you'll see why McDonald's is up while the market is down. If Mickey D's managed to rise in such a difficult environment, it should do a lot better as the market improves.

The other interesting fast-food giant is Yum! Brands (NYSE:YUM), the holding company for KFC, Long John Silver's, Pizza Hut, A&W, and Taco Bell. Yum! has a strong China expansion strategy, and in December announced its eighth straight year of double-digit EPS growth (10%). Sales from China rose 19% (including new restaurant openings); on a same-store basis, Chinese sales rose 4%. That compares with 3% same-store-sales growth in the United States. Yum! is not growing as strongly as McDonald's, but it is well-diversified and has a realistic emerging-market expansion strategy.

Grocery shopping
Supermarkets as a group have been reporting better numbers. There are three grocery or grocery-related stocks worth watching: Safeway (NYSE:SWY), Costco (NASDAQ:COST), and SYSCO (NYSE:SYY), a food distributor.

Safeway has an urban strategy, keeping it out of the path of Wal-Mart (NYSE:WMT), which has aggressively expanded in groceries via its supercenters, pushing rurally focused supermarkets like Winn-Dixie to file for bankruptcy. While Winn-Dixie is now out of bankruptcy, Wal-Mart's rural strategy still remains, which may continue to be a problem for the smaller chains.

Safeway has been expanding in health and organic foods -- which have earned the chain high rankings -- and it plans to keep moving in that direction. The company has operations in the U.S., Canada and Mexico (under several different brands), and plenty of avenues for expansion in all three markets.

In its latest quarterly filing, the company's management expressed concern about the U.S. economy, citing food inflation and reduced consumer spending as potential threats to profit margins. But it also expressed hope that customers may trade down from dining in restaurants, and shop more at Safeway, using more store brands. Management expressed its belief that that rising fuel prices will also spur consumers to shop more at neighborhood stores, rather than the big-box discounters.

While we might not have rising fuel prices right now, anyone who's been to Costco knows that you end up spending a lot more money than you planned to when you walk into the store. The company's stock currently trades at 11 times earnings and yields 1.4%, which is attractive given that its earnings are not cyclical.

The purest food distributor, SYSCO, has long benefited from the trend of families going out to eat. The company generally services low-end restaurants, which are typically recession-resilient. Since going public in 1970, SYSCO's sales have grown from $115 million to a whopping $37 billion in 2008. The company provides nearly everything a restaurant needs: foodstuffs, equipment, silverware, and even uniforms. This one-stop shop strategy has worked well over the years. As the industry itself has grown from $35 billion to more than $200 billion, Sysco has maintained the No. 1 spot. The stock trades at about 12 times earnings and yields 4%, with plenty of defensive qualities for the current environment.

More on food stocks:

Fool contributor Ivan Martchev does not own shares in any of the companies in this story. Sysco is a Motley Fool Income Investor recommendation. Wal-Mart Stores, Coca-Cola, and Costco Wholesale are Motley Fool Inside Value recommendations. Costco Wholesale is a Motley Fool Stock Advisor selection. Try any of our Foolish newsletters today, free for 30 days. The Fool has a disclosure policy.