We've just turned the corner into 2009 and already the ephemeral hope that began to build up in December is eroding. The sheer fact that we have no indication of when this recession will end has left any number of nascent market rallies sputtering into nothingness.

Despite Wall Street's gloomy outlook, 2009 will not be a lost year for investment in the stock market. For patient long-term investors, snapping up great stocks -- businesses that will emerge from this recession with less flab and stronger competitive advantages -- will surely pay off handsomely in two or three years.

To identify such longer-term winners, start with the Motley Fool community's CAPS ratings. During the first 20 months for which we have data, CAPS' top-rated four- and five-star companies have outperformed the market, with average annualized gains of 7% and 12%, respectively. Once you've found a strong pool of candidates, look for undervalued stocks. Happily, this key criteria's much easier to find amid the market's current malaise.

To discover these stocks, you could try our CAPS screening tool, or simply consult CAPS' opinion on the businesses that interest you most. The latter method helped me assemble this list of promising companies:

Company

Market Cap (in billions)

Price-to-earnings (forward ‘09)

CAPS rating

Industry

Altria  (NYSE:MO)

$31.89

8.8

*****

Cigarettes

Philip Morris International (NYSE:PM)

$85.61

12.1

*****

Cigarettes

PepsiCo (NYSE:PEP)

$81.65

13.4

*****

Processed and packaged goods

Colgate-Palmolive

(NYSE:CL)

$32.76

15.3

*****

Personal products

Endo Pharmaceuticals (NASDAQ:ENDP)

$2.50

8.2

****

Drug manufacturers

Gilead Sciences (NASDAQ:GILD)

$43.50

19.9

****

Biotechnology

Freeport-McMoRan Copper & Gold (NYSE:FCX)

$11.04

38.3

*****

Copper

Source: Motley Fool CAPS and Yahoo! Finance.

Recession resisters
While snack and beverage mogul PepsiCo has seen soft-drink sales erode, I firmly believe that its strong management team will continue to guide the company to profitability. Both Pepsi and competitor Coca-Cola have moved heavily into the non-cola and non-carbonated drink world. But unlike Coke, Pepsi sells snacks, giving the company a wider product base from which to generate revenue.

Colgate-Palmolive, which makes Colgate toothpaste and many other personal care products, is a good defensive play to ride out the recession.

Endo Pharmaceuticals is a generic drug play, a sector that should succeed under an Obama administration, given the president-elect's support for generic drugs. Obama favors more funding for the Food and Drug Administration to accelerate approvals for generic drugs, new legislation for generic biologics, and increased use of generic drugs to minimize health-care costs.

Gilead Sciences is an example of a financially strong company with promising pipelines that target large markets. What's more, the recession should have little impact on its businesses. The company may have one of the best HIV drugs on the market in Viread, and those living with the disease will continue to require Gilead's treatments, recession or not.

Both Altria and Philip Morris sell cigarettes. Investors may have valid ethical concerns about owning these stocks, but a recession probably won't bar smokers from continuing to light up -- indeed, hard times could even prompt them to smoke more. And for all our state and federal governments' efforts to stamp out smoking, they also heavily rely on tax revenue from cigarettes. As a result, both Altria and Phillip Morris should reap profits in the lean times ahead. Altria is also positioning itself well for the long term, having recently acquired smokeless tobacco maker UST (NYSE:UST).

A great start to your search
While CAPS ratings are a great way to kick off your stock search, they should never be your only resource. Fools should read any prospective purchase's 10-K, and remain mindful of the stock's valuation, fundamentals, and growth prospects. In this environment, look for sustainable earnings and examine the company's debt position and cash flow.

Start your research at Motley Fool CAPS today! Let the collective wisdom of our 125,000 member-strong investment community help you make better investing decisions.

For related Foolishness:

Beginning Jan. 12, 2009, Fool co-founder David Gardner, Jeff Fischer, and their Motley Fool Pro team will accept new subscribers to their real-money portfolio service. Motley Fool Pro is investing $1 million of the Fool's own money in long and short positions in a range of securities, including common stocks, put and call options, and exchange-traded funds (ETFs). They also incorporate proprietary CAPS "community intelligence" data into their research. To learn more about Motley Fool Pro, and to receive a private invitation to join, simply enter your email address in the box below.

Fool contributor Jennifer Schonberger does not own shares of any of the companies mentioned in this article. PepsiCo is an Income Investor pick. Coca-Cola is an Inside Value recommendation. The Motley Fool has a disclosure policy.