Every investor's dream is to buy shares of their favorite stock at the exact moment they hit bottom. Often, though, trying to time the purchase of a stock as it falls leaves you with sizable short-term damage to your portfolio. And if you don't have nerves of steel, you can end up with a big permanent loss on your investment.

Catching falling knives
You've seen it plenty lately: A news item hits a favorite stock, causing its shares to drop. Suddenly, what was already an intriguing investment becomes a potential bargain, and you start looking for the right entry point. The decision becomes a tug of war between fear and greed: You don't want to miss out on the chance for a big profit, but at the same time, you also don't want to buy shares, only to see them keep dropping in the near future.

As they're trying to figure out when to buy, though, most investors fail to fully grasp that markets have a huge capacity for what may seem like completely irrational behavior to you. Moreover, even if one bad news item pushes the stock down, another piece of bad news might be just around the corner. Once you know that new bit of info, you might not be so excited about picking up the shares, even at a reduced price.

Stuck in an oil slick
The oil patch provides one excellent example of this phenomenon. BP (NYSE: BP), Transocean (NYSE: RIG), and Halliburton (NYSE: HAL) have been at ground zero for investors since the Deepwater Horizon explosion in April, and for those who find the energy industry generally attractive, the resulting oil spill may have seemed like the sort of short-term blip that presents a smart buying opportunity.

In particular, on April 29, guesses about the spill's magnitude were raised to five times previous estimates. By the end of the month, shares of those three companies were 10% to 20% off their highs, and bargain hunters started looking to buy.

Fast-forward a month, however, and you can see that those early buyers have been disappointed. The stocks have lost another third of their value, as it has become clear that predictions of a quick resolution won't come to fruition. Although some still see the shares as an opportunity, it's a lot harder to quantify the potential liability than it seemed just a few weeks ago. With the possibility of gross negligence among the parties nullifying the $75 million cap on liability, investors can't be sure exactly what their potential downside is. And the entire industry is reeling from the government moratorium on deepwater permits and the impact it will have.

Wait until it's over
That's one reason why some people stay on the sidelines until they see signs of recovery. You'll definitely miss out on some gains by waiting, but you'll also avoid the worst of a prolonged downdraft.

For instance, in late 2008, shares of PotashCorp (NYSE: POT) and Mosaic (NYSE: MOS) both fell sharply, as what some now see as a bubble in commodities finally burst. Even as prices fell, the fundamental story behind the fertilizer companies hadn't changed much, so the opportunity to buy shares at a 25% or even 50% discount sounded like free money. The stocks eventually bottomed out around 80% below their highs.

After the shares had fallen so much, even if you waited for a 50% bounce from those lows -- which ended up taking just a few months as the 2009 rally kicked into high gear -- you still avoided most of the losses, while reaping a reasonable profit. More importantly, you never found yourself in a situation in which you'd seen half or two-thirds of your money disappear, tempting you to react emotionally and question the rationale behind your position.

Not a perfect answer
Of course, you won't always time the recovery well, either. A bounce in December 2008 lured in many investors who believed that the worst was over. Yet even though buyers had to suffer through March's lower lows, they still got better prices than those who were early to the buying in August and September 2008.

When you're tempted by falling knives in the market, take a step back and consider how important it is to preserve your capital. Waiting for a stock to stabilize and recover may not maximize your gains when you're right, but it can protect you from some big losses when you're wrong.

Matt Koppenheffer has the answer to the question on everyone's mind: How much longer can you ride the rally?

Fool contributor Dan Caplinger is about as patient as Luke Skywalker with Yoda, but he keeps working on it. He doesn't own shares of the companies mentioned in this article. Try any of our Foolish newsletters today, free for 30 days. The Fool's disclosure policy is always in the right place at the right time.