Do you know the famous Warren Buffett adage: "Be fearful when others are greedy, and greedy when others are fearful"?

Well, consider these quotes from some of the most respected names on Wall Street, and tell me which emotion you think is most prevalent in the market today:

  • "I think we are going to have a doozy of a recession."
    -- Julian Robertson
  • "I don't think there is much upside over the next few months ... the mess just keeps spreading."
    -- Edward Yardeni
  • "The situation is much more serious than any other financial crisis since the end of World War II."
    -- George Soros

The stock market has spooked even the most experienced of investors, but Buffett's words still ring true: It's time to get greedy.

Yes, I read the newspaper
The housing bubble has burst, the credit crisis continues, the Federal Reserve may have lost its ability to stimulate the economy, and the United States appears to be mired in a recession. Each one of these headlines is frightening by itself; together, they're terrifying.

But as my Foolish colleague Bill Mann likes to say, "If it's in the headlines, it's in the stock price." Think about it -- do you know a single investor who's unaware of these horrifying headlines? Of course not. These fears have already been factored into stock prices -- and then some.

There's no metric to measure investor fear, but here's a revealing stat: In a May poll of 191 fund managers, Merrill Lynch found that 31% of respondents were overweighted in cash, compared to 20% in November. In other words, fund managers are so reluctant to get burned again that they're pulling their chips off the table -- even though the stocks they liked a few months ago are, in many cases, now 15% to 20% cheaper!

Great long-term focus, people
It's easy to see why the fund managers are fleeing to cash. In a world that revolves around quarterly performance, mediocrity is celebrated, while the punishment is severe for those who swing and miss.

Individual investors who pull out of the market now, on the other hand, are making a big mistake.

I got my first real six-string
The current market environment reminds me of summer 1998, when Russia defaulted on its debt, the Long Term Capital Management hedge fund blew up in a spectacular fashion, and the U.S. stock market got its first taste of a global meltdown.

That was certainly a frightening time to own stocks -- the S&P 500 dropped about 20% in less than three months, and many solid companies fell even farther. But although investors who gave in to their fear and sold shares may have avoided a little short-term pain, they also missed out on a decade's worth of market-beating returns:

Company

Market Cap (millions)*

Stock Performance, July 17, 1998,
to Oct. 8, 1998

Stock Performance, Oct. 8, 1998,
to June 4, 2008

JPMorgan Chase (NYSE:JPM)

$63,955

(46%)

54.2%

McDonald's (NYSE:MCD)

$50,354

(15.3%)

86.9%

Northrop Grumman (NYSE:NOC)

$6,235

(20%)

102.7%

Walgreen (NYSE:WAG)

$23,567

(12.5%)

75.4%

S&P 500 Index

N/A

(19.2%)

43.5%

Data from Capital IQ, a division of Standard & Poor's.
*As of July 17, 1998.

There are a few takeaways we can draw from this data. The most important of all: Selling out of fear would have been a big mistake. Each of these stocks has gone on to trounce the market since stumbling in the summer of 1998.

But there's another lesson here that could mean even greater profits for astute investors.

Notice that the market cap of the companies is inversely related to both the short-term pain (the bigger the company, the smaller the drop) as well as the long-term gain (the bigger the company, the smaller the return).

In other words, smaller companies were typically hit harder initially by market uncertainty, but in the subsequent decade, they outpaced their larger counterparts. This trend is exacerbated as one moves down the market-cap spectrum:

Company

Market Cap (millions)*

Stock Performance, July 17, 1998,
to Oct. 8, 1998

Stock Performance,
Oct. 8, 1998,
to June 4, 2008

Express Scripts (NASDAQ:ESRX)

$1,437

(13.5%)

1,473%

Helmerich & Payne

$1,217

(19.1%)

551%

Marvel Entertainment (NYSE:MVL)

$274

(54.4%)

1,085%

Shaw Group (NYSE:SGR)

$302

(65.3%)

1,374%

Russell 2000 Index

N/A

(32.9%)

139.7%

Data from Capital IQ, a division of Standard & Poor's.
*As of July 17, 1998.

These results shouldn't come as a surprise. Small caps are notoriously volatile, but over the long haul, they're your best bet for the best returns.

I like those odds
If you're capable of stomaching a little volatility, but you have the patience to be a long-term-minded investor, consider small caps. And if you're looking for a few great small-cap ideas, consider a free 30-day trial of our Motley Fool Hidden Gems service. The Hidden Gems scorecard is full of quality small companies, and thanks to recent market volatility, a number of these stocks are trading for cheap.

To review all our research and recommendations, including our best buys for new money now, click here for a free 30-day trial. As always, there is no obligation to subscribe.

This story originally appeared Feb. 12, 2008. It has been updated.

Rich Greifner really got his first six-string in the summer of '94. Rich does not own shares of any company mentioned in this article. Marvel is a Stock Advisor selection. JP Morgan Chase is an Income Investor recommendation. The Fool has a disclosure policy.