A soon-to-be retiree's guide to a crazy market

protect retirement
If you're not retired yet, there is a way to weatherproof your nest egg from a future market downturn.

Nearing retirement? When the stock market tanks ... Do. Not. Panic.

You've heard that before. But it's hard to sit tight during a market freakout if you're closing in on retirement. Losing a big chunk of your savings now could be devastating.

Retirees should avoid drawing from investments (in other words, selling stocks) when the market is down. It's the same golden rule you've followed all along, but it gets trickier once you need to use the money in your nest egg -- and have fewer years for your investments to bounce back.

If you're not retired yet, there is a way to weatherproof your nest egg from a future market downturn: Make sure you have a steady flow of money coming in each month to cover your essentials -- that doesn't come from your investments.

"Your anxiety level will go way down if you know you can pay for the groceries whether stocks go up or down," said Dan Keady, director of financial planning at TIAA-CREF.

Where will your steady income come from?

First, use up your Social Security check. This should be easy since it comes to you automatically each month.

If you're lucky enough to get a pension benefit, use that next.

Now, for the remainder of your essential costs, Keady suggests buying an annuity. This is like an insurance policy that will send you a monthly check for the rest of your life. More on annuities in a second.

Other advisers, like certified financial planner Mark Beaver, say the rest could come from cash you set aside.

How much will you need?

This isn't for vacations or a new car. It's for essentials like your mortgage or rent, insurance, utilities, groceries, transportation and any required debt payments.

A good way to figure out exactly what you'll need is to make a retirement budget, using your best guesses of where you intend to live in retirement and what type of lifestyle you want to lead. Will you downsize your home? Move to a lower-cost area? Have debts paid off?

Calculator: Will you have enough to retire?

When an annuity works for you:

There are two main benefits. An annuity is helpful if you're worried about running out of money in retirement. This way, you'll get a guaranteed payout each month for the rest of your life. It also takes some of your money out of stocks, so those funds will be immune to market downturns.

How annuities work

If you're in poor health, an annuity might not be a good option for you. And it's not a great idea if you need to use a huge chunk of your nest egg to buy the annuity. Remember, you'll still need investment gains to cover a comfortable lifestyle through your older years and if you buy an annuity, you're giving up access to that money.

A 65-year-old woman who invests $50,000 in an annuity can expect a monthly check of about $265 for the rest of her life, according to this calculator.

What about cash?

If you're not going to buy an annuity, set aside some cash to cover the rest of your basic costs and start doing it about three years before retirement.

Beaver tells clients to have enough cash on hand to cover your bills for 18 to 24 months. That way, you can replenish it from investment gains when the market is up, rather than being forced to pull money out when the market is down.

Even if you do get an annuity, you should always have enough cash to cover an emergency. TIAA-CREF recommends that retirees have enough money to pay for expenses for at least six months.

What else can you do?

Remember the basics. If the market does tank, check in on your investments to make sure you still have the right allocations. If you're 70, you probably want to have 50% or less of your portfolio in stocks and the rest in less-risky investments. To find the right asset allocation for you, use our asset allocation calculator.

Beaver suggests re-balancing your portfolio once or twice a year. If domestic stocks did well over the past year, for example, move those gains out to your cash reserve.