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 so.)

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 REITs such as Vornado (NYSE:VNO) or Boston Properties (NYSE:BXP). Or, if you're looking at a business whose value is primarily a function of its future earnings, like Apple Computer (NASDAQ:AAPL) or Starbucks (NASDAQ:SBUX), 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, Yahoo! (NASDAQ:YHOO) proved that its growth projections were overly optimistic. Its revenue and earnings both fell, 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 company like Yahoo!, purchasing shares when they are truly dirt cheap. Since the end of 2001, for example, Yahoo! has returned more than 250%!

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 Microsoft (NASDAQ:MSFT) 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, Novell (NASDAQ:NOVL) is an intriguing software company transitioning its business to focus on open source. It isn't particularly cheap on a price-to-earnings basis, but has a lot of cash that gives it flexibility. If its transition is successful, it has some potential.

Now look at Microsoft. It's a completely dominant software company that grown relentlessly while fending off nearly all competitors. It, too, has piles of cash, but it has better growth estimates and less risk than Novell. Yet it's trading at a significantly cheaper multiple, for less than its intrinsic value. All things considered, despite Novell's potential, now seems a great time to upgrade from Novell to Microsoft.

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. You can get a free one-month pass here.

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