I don't know what I hate more -- that the market goes down way faster than it goes up, wiping out five months of profit in only five weeks, or that the fall, with its constant down days, seems to be interminable. It's more fun than a boot to the head, but just barely.

Yet one day, the bottom will arrive, and there will be another huge rally. The key is to position your portfolio to maximize the upside when it arrives. To this end, I have three suggestions.

1. Don't panic
Emotions can prevent otherwise savvy investors from making money in the market. When things are going poorly, we tend to want to hide in a corner, crawl up in a little ball, and whimper. And while I've found that whimpering can be a very effective strategy during an apocalypse, it's a poor investing technique. Dumping your shares in a panic will often mean that you're selling precisely when you should be buying -- when prices are low.

The best way to keep your emotions in check is to have confidence in the value of the stocks that you own. After all, if you're certain that a stock you own is worth at least $40 per share, it won't matter so much if shares temporarily fall from $35 to $25. In fact, you may see it as a major buying opportunity.

How can you know the value of your stocks? One way is based on the company's net asset value -- the amount of money you'd have if you liquidated all the company's assets. This is an appropriate valuation technique for real estate investment trusts (REITs) such as Kimco Realty (NYSE:KIM) or Mack-Cali Realty (NYSE:CLI). Or, if you're looking at a business whose value is primarily a function of its future earnings, such as PepsiCo (NYSE:PEP), you can work out the stock's intrinsic value using a discounted cash flow calculation. (Our Inside Value newsletter has a DCF calculator -- available here for subscribers -- that can help you perform the math. If you're not a subscriber, a guest pass will get you access.)

As long as you're correct about the stock's value, you'll be fine over the long term. That's one reason why you should always try to buy stocks below their fair value.

2. Admit your mistakes
However, don't use "I'm not panicking" as an excuse to not acknowledge mistakes. If you bought a stock simply because it was going up -- generally a terrible investment strategy -- no intrinsic-value safety net will cushion its fall. Even if the stock was trading below your estimate of its fair value when you bought it, things may have changed. When the bubble popped, Adobe Systems (NASDAQ:ADBE) proved that its growth projections were overly optimistic. Its revenue growth rate fell dramatically, and investors abandoned the stock.

If you can avoid optimistic mistakes, you'll conserve cash. And in the best-case scenario, you can swoop in when other investors have abandoned a decent company like Adobe and purchase shares when they are dirt cheap. Since 2002, for example, Adobe has tripled.

3. Upgrade your portfolio
The great thing about bear markets -- and yes, there is at least one great thing -- is that investors tend to sell indiscriminately. Companies with solid competitive positions such as Dell (NASDAQ:DELL) will sell off like they're speculative equities. And when these superior companies get undervalued, it may make sense to add them to your portfolio and reduce your exposure to more speculative ideas.

For instance, Gateway (NYSE:GTW) has been a major player in the PC industry for years but has recently fallen on hard times. It's not making much money these days, but it does have quite a lot of cash on its balance sheet, a solid brand, and established distribution channels. So it could be an interesting turnaround play.

Now look at Dell. It started in a dorm room and grew relentlessly from there, fending off all competitors, including IBM (NYSE:IBM), the inventor of the PC, to become the most powerful company in the industry. Dell has a stronger brand than Gateway and better logistics systems, which provide it with superior margins. Like Gateway, it has a big pile of cash on its balance sheet. But not only is it profitable, it also has better growth estimates and less risk than Gateway. Yet Dell's trading at a cheaper forward multiple. All things considered, though Gateway could be an intriguing speculation, now seems like a great time to upgrade from Gateway to Dell.

Remember, bears can smell fear
Of course, you should be trying to buy superior stocks at cheap prices even when the market isn't falling. However, a bear market tends to cloud the issues, so it's particularly important to stick to the strategy during bad times. If you're looking for great companies trading below their fair value -- the ones most likely to outperform during a bear market -- you should check out our Inside Value newsletter. We're even offering a free one-month pass.

This article was originally published on July 6, 2006. It has been updated.

Fool contributor Richard Gibbons was thinking of recommending "when in panic, fear, or doubt, run in circles, scream, and shout," but he didn't think it would get by his editor. Richard does not have a position in any security discussed in this article. Dell is an Inside Value and Stock Advisor recommendation. The Fool has adisclosure policy.