Over and over, you've heard how panicking when markets fall is the worst thing you can do. Yet, if you're wondering why so many Fools have repeated this advice so many times, the answer is simple: Many investors still haven't gotten the message.

You can find one gauge of what ordinary investors think about the market in statistics on mutual fund flows. Every month, the Investment Company Institute releases figures about how fund investors are moving their money among different types of funds. As we've seen in the past, fund shareholders seem to consistently make the wrong moves, especially at market bottoms:

  • In February and March, as the market resumed its slide from 2008, investors pulled out substantial amounts of money from stock mutual funds. $27.5 billion came out of stock funds in March, after a $24.9 billion outflow the month before.
  • Meanwhile, bond funds saw big gains in assets, with $21 billion and $17 billion moving into bonds in March and February, respectively, as investors left the stock market.

As evidence of their bad timing, investors apparently did most of their March selling during the first two weeks of the month, while the stock market was setting new multiyear lows. Only after much of the rebound had already occurred did new buyers come back into stock funds -- but come they did, as April added about $13 billion to stock funds. May has also seen strong weekly inflows thus far -- with the market 30% higher than it was at its March lows, when so many were panic-selling.

Where the money's going
It's clear that there's a lot of interest in the stocks that have gotten beaten down the most during the bear market. Stocks like Nordstrom (NYSE:JWN) and Sprint Nextel (NYSE:S) have tripled or more since recent lows. That's great news for those who had the discipline not just to stay invested during March's declines but also to add to their stock positions.

But now, after the big run-up, it's not nearly as clear what the smart money is doing. It appears that some money is starting to flow out of some hot sectors as investors take profits. Take a look, for instance, at some of the stocks that investors appeared to target for profit-taking on Monday, the most recent strong "up" day in the rally:

Stock

% Change in Stock Price on Monday

Total Money Flow (Millions)

ExxonMobil (NYSE:XOM)

2.0%

(192.0)

Schlumberger (NYSE:SLB)

4.0%

(78.2)

Freeport-McMoRan Copper & Gold (NYSE:FCX)

7.8%

(20.6)

Capital One Financial (NYSE:COF)

6.2%

(20.4)

Halliburton (NYSE:HAL)

4.4%

(10.1)

Source: WSJ. Money flow defined as value of trades occurring after upticks minus value of trades occurring after downticks.

After a huge run in energy and natural resources stocks -- as well as formerly crushed financials like Capital One -- it appears that at least some traders started to take money off the table earlier this week.

The thing about stock money-flow figures, however, is that they don't reveal the time horizons that buyers and sellers have when they make their trades. As a long-term investor, you don't want to pay too much for a stock caught up in a trading frenzy -- which traders could abandon at any moment.

Keep your eyes on the prize
While short-term stock movements catch your eye, the long-term prospects of the businesses you invest in are far more important. Despite the big swings we've seen lately, you can count on company fundamentals to guide stock prices over the long haul. Just as you shouldn't dump shares when the herd is full of fear, you also shouldn't panic-buy during strong rallies like what we've seen in recent months.

The key to investing success is to stand ready to act when everyone else is afraid. Don't join the stampede toward the exits when people are panicking -- but save that skeptical eye for times when everyone seems to think there's nothing to fear at all. That contrarian philosophy should serve you well.

Read more about making the best investment moves right now:

Get the latest insight from Fool co-founders Tom and David Gardner with a subscription to their Motley Fool Stock Advisor newsletter. A free trial gives you full access to their list of recommended stocks, analysis, and much more -- just click here to get started today.

Fool contributor Dan Caplinger has made his share of mistakes, but he tries to learn from them. He owns shares of Freeport-McMoRan. Sprint Nextel is a Motley Fool Inside Value pick. Try any of our Foolish newsletters today, free for 30 days. The Fool's disclosure policy never makes mistakes.