Many investors, after seeing their portfolio values shrink 40% or more in market turmoil during the Great Recession, opted for the safety of cash or bonds and missed out on the bull market that began in March 2009.

With their savings depleted, some older workers have postponed retirement.

It all raises the question: What's the point of investing if a lifetime's worth of doing the right thing with your retirement savings can be undone by a few months' worth of economic turmoil? Isn't the mattress the safest place for money these days?

Quite to the contrary, says John Bogle, the legendary investor who founded Vanguard Group. "The biggest risk is not investing," he says.

This philosophy can be explained through a few basic concepts:

  • Inflation is a saver's worst enemy.
  • Over the long haul, stocks are the safest, easiest way to build wealth.
  • The lousier the market, the better time to buy.

A race against inflation

The absolute worst thing that anyone can do is keep their money in a no-interest account or in cash. (There are many Depression-era family accounts of currency stashed in the oven for safekeeping, only to be accidentally broiled down to ash.) If money is not at least earning interest from a savings account or certificate of deposit -- which typically is very low when compared with historical stock market gains -- you are actually losing money.

This is because while the face value of those dollars stays constant, the cost of everything else increases -- a simple definition of inflation. Inflation explains why a Hershey bar that cost 2 cents in 1908 will now set you back 95 cents. It's also why over time our salaries increase, as do rent, gasoline and the cost of most everything else. Generally, the U.S. inflation rate fluctuates between 1% and 4%, though it did jump to the low double-digits in the 1970s and 1980s.

Mickey Cargile, the managing partner of WNB Private Client Services in Midland, Texas, says the safest way to train for the race against inflation is to jump into the market.

"The primary thing you have to do is get started," he says. "It doesn't matter what the market is doing or what (you) think it will do in the future."

Staying ahead with stocks

One way many people try to stay ahead of inflation is through no-risk certificates of deposit or money market or savings accounts. Though the term "no-risk" might be tempting, these low-interest products do actually put you at risk -- of not keeping up as the cost of living rises.

In 2008, for example, inflation reached 3.8% while the typical money market account had an annual percentage yield of around 1.5%. Anyone investing $10,000 at 1.5% would see the value of their nest egg grow to $16,839 within 35 years. But if inflation held steady over that period, the $10,000 investment would be worth just $4,429, in 2008 dollars.

So sticking to these so-called no-risk investments actually slashes your buying power over time.

On the other hand, a $10,000 investment in the stock market that returned 8% -- slightly less than the historical return for stocks -- would be worth $147,853 in 35 years, equivalent to $42,206 if you assume a 3.8% inflation rate.

Cargile says certificates of deposit and bank accounts are fine for emergency funds but advises building wealth with equities. "Risk-free investments are fine for your rainy-day fund, but the only investment that has kept up with inflation is stock market products," he says.

Opportunities in a down market

That sounds good, but what about the folks who lost a big chunk of their savings when the market cratered in the recent economic downturn?

These are actually great times to get into the market, experts say. Let's take a look at one of the biggest crashes of all time: If you'd jumped into the market on Oct. 9, 2002, the market low after the dot-com bust two years earlier, you would have been up 33% in one year, 44% in two years and 92% after five years. That's right: In just five years you could have almost doubled your money by investing in stocks when the market really stunk.

Clearly, the best time to jump into the market is when the crowd has headed for the exits. But buying low and selling high isn't as easy as it sounds. It was more than a little scary in the depths of the latest recession when the Dow Jones Industrial Average ($INDU) was falling as much as 700-plus points a day and the very foundations of the economy seemed to be crumbling.

That's why most experts advise putting small amounts of money in the market over time to build up a larger nest egg and leaving it alone as much as possible. Sure

And if you don't need the money for 20 years or more -- as is the case for many investors saving for retirement -- you can ride out the turmoil and even buy more stock at the reduced prices.

Here's a rule to help you stay focused on the long-term goal: the rule of 72. Simply divide 72 by the annual rate of return to determine how long it will take your money to double. Put the money in a savings account with a 2% return, and dividing 72 by 2 means you're looking at a 36-year wait. Grow your money at 8% a year, and your wait is cut to 9 years.

Investing isn't risk-free, of course. Markets crash, and individual companies run into trouble. That's why soon-to-be retirees are smart to cut back on the percentage of their portfolios dedicated to stocks. And it's why all investors are smart to diversify broadly, owning large numbers of stocks and putting money in international stocks and areas such as real estate and commodities. But ultimately, the biggest risk is to stay out of the market.