A sculpture of a bull outside the Shenzhen Stock Exchange in China © BOBBY YIP, Newscom, RTR

For some milestones, you want to break out the champagne. But the end of the great bear market, which finally occurred five years ago in March, may be one you'd rather forget.

By the time the market hit bottom on March 9, 2009, the Standard & Poor's 500 Index ($INX) had fallen 57 percent from its 2007 peak, the biggest drop since the Great Depression. And there was no telling when the free fall would end. "Dow 5,000? There's a case for it," said a headline in The Wall Street Journal on March 9. "Investors throw in the towel," online magazine Slate proclaimed less than a week before.

Despite the pessimism, though, stocks did turn around -- and they have gone on to stage one of the most powerful rallies in recent history. From the bottom through the end of 2013, the S&P 500 returned 203 percent. Looking back, you could glean many lessons from the stock market's plunge and subsequent recovery.

"It's the painful experiences that are the most valuable," says Jim Stack, who publishes the InvesTech Research newsletter. We've identified five takeaways from the bear market and the years that followed.

Lesson 1: They don't fire a starting gun to mark the arrival of a new bull market

Early in 2009, with the S&P 500 down 25 percent in the year's first ten weeks, few investors would have guessed that the index would finish '09 with a 27 percent gain.

Overall, the news was grim. The unemployment rate was on its way to hitting 10 percent. Two of the country's three major automakers, Chrysler and General Motors (GM), filed for bankruptcy reorganization that spring. Congress passed a $789 billion stimulus package to try to revive the economy. Based on the headlines, it didn't look as though things would get better anytime soon.

"There was a belief that the good things that happened in the past would never happen again," says John Rekenthaler, vice-president of research at Morningstar.

Stocks, however, did make a comeback, and the mood-defying reversal was a reminder that trying to call a market's bottom is something few investors can do.

Lesson 2: Rebalancing is essential

Big market moves can wreak havoc on the balance of stocks and bonds in your portfolio. Let's say you had 60 percent in U.S. stocks (as measured by the S&P 500) and 40 percent in bonds (as measured by Barclay's U.S. Aggregate Bond index) before the bear market started in October 2007. By the end of the bear market, the ratio would have flipped to 38 percent stocks and 62 percent bonds, just because of changes in market values. The timing could hardly have been worse because your portfolio would have been light on stocks just as they were poised to take off.

Rebalancing -- a system of selling and buying investments to maintain your portfolio's asset allocation -- helps you avoid such unintentional shifts. And it forces you to buy assets that have grown cheaper and sell ones that are expensive -- in other words, to buy low and sell high, one of the cardinal rules of investing.

On paper, rebalancing looks simple enough. But from an emotional standpoint, it can be tough to execute. Few people wanted to buy stocks in March 2009. "Rebalancing goes against our strongest investing behavior," says Fran Kinniry, a principal at the Vanguard funds. "We don't want to buy assets that have had negative returns."

Worried you won't have the discipline to rebalance? One solution is to set a fixed schedule -- say, at the start of every year or after your portfolio mix has shifted by five to ten percentage points. Another option: Consider a balanced mutual fund, which will maintain a steady ratio of stocks and bonds for you. Dodge & Cox Balanced (DODBX) is a solid choice. Over the past five years, the Balanced fund returned an annualized 17 percent, nearly as much as the S&P 500's annualized return of 18 percent but with less risk.

More from Kiplinger

Lesson 3: Diversification works

By March 2009, few investments had come through the bear market unscathed. The crisis that began in the financial sector spread far and wide, taking nearly everything down with it.

Still, the fall was not uniform. In 2008, the S&P 500 lost 37 percent, but financial stocks sank 55 percent. Meanwhile, shares of companies that make essential consumer goods, such as toilet paper and cereal, dropped a more tolerable 15 percent. Merger Fund (MERFX), a member of the Kiplinger 25, lost just 2 percent by investing in stocks of already announced takeover targets. And some investments actually made money: Vanguard Total Bond Market (VBMFX) returned 5 percent, and SPDR Gold Shares (GLD), an exchange-traded fund that tracks the price of bullion, earned 5 percent.

Diversification can't prevent losses, but it can help slow the bleeding. And over longer periods, it has added to returns. Fund sponsor T. Rowe Price found that a simple mix of 60 percent large-company U.S. stocks and 40 percent high-grade U.S. bonds gained an annualized 4.6 percent from April 2000 through November 2013. But a portfolio with a broader mix of investments, including emerging-markets stocks and high-yield bonds, earned 5.5 percent annualized.

Lesson 4: Stocks are a portfolio's engine, but not the place for short-term financial needs

Although stocks have reached new highs recently, that's cold comfort if you had to pull money out of the market during the crash to pay the mortgage or send a child to college. In those cases, the bear market was a painful reminder of the potential downside of stocks. It also showed that as you think about your portfolio, your investment timeline has to be front and center.

Mark Luschini, chief investment strategist at brokerage Janney Montgomery Scott, suggests putting assets you'll need within five years in low-risk fare, such as money-market funds and short-term bonds. That way, if stocks tumble, you won't have to sell at the worst possible time.

But if you have a long-term horizon, stocks are the place to be. An investor who had $100,000 in an S&P 500 index fund at the market peak in 2007 would have lost more than half of his portfolio by March 2009. If he panicked, moved the portfolio to cash and stayed there for the next five years, the balance would still have been $50,100 as of the end of November 2013. But if he stayed with stocks, the portfolio would have not only recouped its losses but grown to $136,000 by the end of 2013.

To be sure, a 50 percent loss in 17 months was reason to panic. "But what helped was having the proper perspective of time," says Erik Davidson, deputy chief investment officer of Wells Fargo Private Bank. "In most cases, an investor's timeline is measured in years or decades, not months."

Lesson 5: Calling a top is just as hard as identifying a bottom

Investors have had plenty of reasons to doubt the current bull market's staying power. In 2011, a debt-ceiling crisis and S&P's downgrade of the U.S.'s credit rating helped trigger a 19 percent drop in the S&P 500. Still, the index eked out a 2 percent gain that year. In 2013, the budget standoff in Washington and the government shutdown looked ominous. But stocks registered a stunning 32 percent return.

You are no doubt wondering what will happen next. Kiplinger's predicts another winning year for stocks. But there are no guarantees. For most of you, the best course is to build a diversified portfolio geared to your time horizon and tolerance for risk and to stop worrying about when the bull will head out to pasture.

Click here to become a fan of MSN Money on Facebook

More from Kiplinger