The stock market's plunge has derailed many investors' plans for retirement. Although it's too late to save ourselves from the losses we suffered in 2008, we can make sure we won't repeat our mistakes in the future.

In my mind, a big part of the problem came from assumptions that amazing stock market returns would continue indefinitely. Check out, for example, how the following well-known stocks did from the end of 2002 to the end of 2007:

Company

Average Annual Gain, Dec. 31, 2002 - Dec. 31, 2007

Research In Motion (NASDAQ:RIMM)

120%

Nordstrom (NYSE:JWN)

33%

Best Buy (NYSE:BBY)

28%

Nike (NYSE:NKE)

25%

Boeing (NYSE:BA)

24%

Schwab (NASDAQ:SCHW)

21%

Data: Yahoo! Finance.

Of course, not every company skyrocketed during this period -- Dell (NASDAQ:DELL) actually fell in value, for example. But many of us saw most stocks soaring, and it was easy to assume that would continue.

My view
But while I realize they made a mistake, I'm not too hard on those misguided optimists. Sure, they should have known better. But let's face it -- few of us have learned much about the stock market and investing, and few of us have healthy perspectives about it.

While the market's average long-term annual gain is around 10%, it's not reasonable to expect 20%-30% annual returns to continue indefinitely. What is reasonable is to expect that a bunch of years with above-average gains will be followed by either a slowdown or a retreat, and possibly a big one.

Remember that the stock market has usually outperformed other alternatives over long periods -- despite occasional plunges. Also, market meltdowns bring rare investing opportunities, even once-in-a-lifetime ones. So we shouldn't take away from 2008 that stock market investing is reckless, but simply that it's volatile and needs to be managed.

What to do
Managing that risk requires that you know what your needs are. If you plan to cash out any part of your growing nest egg in the next five years, don't have that part in the stock market -- because years like 2008 can happen, turning a $100,000 account into a $60,000 one.

Instead, park that moola in safer investments like CDs or money market funds. You can be more conservative and keep money you'll need in six or seven years in such places -- or take on more risk and only safeguard funds you'll need in the next two or three years. Doing so will cushion your portfolio in the face of a big market drop.

And as an aside, if you're kicking yourself for having invested in stocks, imagine having invested in real estate instead. According to the Case-Shiller index, real estate prices in 20 cities have dropped by 32% in less than three years. Meanwhile, bank accounts in recent years have been paying interest rates that often didn't even keep up with inflation, and now many savings accounts pay almost no interest.

So consider keeping much of your long-term money in stocks, but do so sensibly, not putting your short-term money at risk. And if the market crashes, look at the bright side of that -- while your portfolio recovers, you can be buying more stock, at fire-sale prices.

Learn how to plan effectively for a comfy retirement in our Rule Your Retirement newsletter, which you can try for free, and here: