Last week, the government couldn't get anything right. When the House voted the original bailout bill down last Monday, the bear roared for a nearly 800-point loss on the Dow. But then, when the bill finally got passed, stocks turned a big gain early in the day into another new multiyear low.

In a rational market, this heads-I-win, tails-you-lose game wouldn't happen. But as shareholders of Research In Motion (NASDAQ:RIMM) and Mosaic (NYSE:MOS) found out last week, the market isn't always rational. Luckily for us, you can sometimes take advantage of other investors' irrational actions and add to your own profits.

A counterintuitive strategy
What happened Friday is just one example of a strange phenomenon that happens over and over again. When an important piece of news is widely anticipated -- whether it's a new piece of legislation, government data, or a hot stock's earnings release -- investors start responding well in advance to rumors and speculations about what the news will be. When things turn out differently, the market reacts violently, as we saw on Monday.

That's not particularly surprising. The shocking thing, though, is what happens when the rumor mill gets it right. Often, instead of following through and giving investors additional gains, the share price will actually move against you -- even when the news is good. Thus the market maxim, "Buy the rumor, sell the news."

You can't be No. 1 forever
As strange as it may seem for stocks to fall after good news, you'll find the key to why it happens in a stock's price. Often, stocks end up getting priced for perfection, where everyone expects huge growth for the foreseeable future. As long as such companies can deliver on amazing results quarter after quarter, investors get rewarded. But eventually, the hurdles get too high -- and when that happens, you see huge declines.

For instance, look at Research in Motion. On its face, the company's latest quarterly report had plenty of positive news. Net income rose 72%, with BlackBerry sales remaining strong even in the face of an overall slowdown in the economy. Yet the stock responded with a huge drop, focusing instead on some disappointing news about current and future quarters.

Similarly, fertilizer stocks were red-hot earlier this year. When Mosaic reported last Wednesday an amazing 284% increase in profits from the previous year, casual observers might have thought the company was right on target. Instead, shares dropped over 40%, and its rivals followed suit, with Potash Corp. (NYSE:POT) losing over a quarter of its value and Monsanto (NYSE:MON) falling 16%.

And if even good news can hit high-flying stocks hard, bad news can hurt even more. With Apple (NASDAQ:AAPL) shares trading near $190 as recently as June, the Mac-maker was valued at over 36 times expected 2008 earnings. Even with analysts expecting earnings gains of 22% in 2009, that was a pretty rich valuation. After suffering along with the rest of the market in September, the coup de grace came in a pair of simple downgrades, citing concerns about order volume.

Pay attention to valuation
The main takeaway from all this is that if you're investing in stocks, it's not enough to know the fundamentals of your company's business. You also need to stay in tune with the market's expectations for the company as well as its track record in meeting those expectations. The more successful a company has been, the greater the expectations will be. If there's no way to meet those expectations, then it's time to cut back on your holdings.

Particularly vulnerable are companies like Disney (NYSE:DIS) and Google (NASDAQ:GOOG), both of which have historically had strong success in beating analyst estimates. There's simply no way those streaks can last forever, and as Google found out in February, the results can be devastating for shareholders.

The only warning is that you'll rarely have perfect timing, so your stocks may continue going up for a while even after you pare your position. But over the long haul, the money you save by avoiding catastrophes should more than make up for the money you lose being early.

For more about making money in a bear market, read about:

Walt Disney and Apple are Motley Fool Stock Advisor recommendations. To learn more about what Fool co-founders Tom and David Gardner are advising their readers about the opportunities now coming in the stock market, sign up for a free, no-obligation 30-day trial.

Fool contributor Dan Caplinger has held onto some high-fliers too long, but he doesn't own shares of the companies mentioned in this article. Google is a Motley Fool Rule Breakers pick. Try any of our Foolish newsletters today, free for 30 days. The Fool's disclosure policy works for you.