This story was updated on Dec. 26, 2018.

This has not been a happy holiday season on Wall Street. After multiple days of sharp losses, stocks are on route to their worst December since 1931, capping off their worst year since the financial crisis, and are within a whisper of kicking off the first bear market—defined as a drop of 20% or more in prices—in nearly a decade.

Blame the government shutdown, a series of recent increases in interest rates, or growing worries that the U.S. economy could sink into recession next year. Then couple that with simple fatigue among investors after years of stock prices going up, up, and up.

Just a few months ago, after all, the stock market was celebrating a big milestone, as the climb in share prices that began in 2009 after the financial crisis officially became the longest bull market in U.S. history. That marked nearly 10 straight years of gains without a 20% drop along the way—more than twice as long as the typical advance.

Just how good had the market been for retirement savers during that long climb? Well, if you socked away $100,000 in U.S. stock funds in your 401(k) when prices started rising in 2009, you’d have amassed around $500,000 before the recent rout began—yep, a cool half-million.

Still, that was then and this is now. The big question now for retirement savers is, where do stock prices go from here?  While no one knows for sure—don’t trust any expert or pundit who tries to tell you otherwise—the near-term outlook is especially worrisome if you’re an older saver who is close to retirement or who has recently left the workforce.

That’s because, unlike younger savers, you don’t have many years left to bounce back from losses before you start taking money out of your account to live on. When you tap your account during a downturn in the market, each withdrawal locks in a loss and leaves fewer dollars in your account to grow when stock prices eventually recover. As a result, your nest egg could end up being depleted far earlier than you planned or hoped. 

“If you get bad returns in the first five years of your retirement when you are withdrawing money,  that can really cut down on the longevity of your savings,” says Jamie Hopkins, who teaches retirement income planning at the American College of Financial Services and is the author of Rewirement: Rewiring the Way You Think About Retirement.

That’s not the way this has to play out, though. With a few smart, precautionary moves now, you can limit the sting from the next big stock slide—and keep your savings growing for the long run.

Here’s what you need to do.

Fix your mix

“People getting ready to retire today may have a false sense of security given how long it has been” since the market got really ugly, says Chip Hymiller, a certified financial planner at Beacon Financial Services in Raleigh, N.C. 

That complacency might mean you haven’t made any changes in your retirement account in a long time because you haven’t felt a need to. But that doesn’t mean changes haven’t happened.

“People may have a false sense of security given how long it has been” since the market got ugly.
Chip Hymiller, CFP
Beacon Financial Services

Rising stock prices alter the mix of investments you own by default. For instance, if at the beginning of this bull market you had 60% of the money in your 401(k) or IRA in stock funds and 40% in bond funds, you now have closer to 80% in stocks and only 20% in bonds, just because stocks have gone up a lot more in price than bonds.  

That’s exactly the opposite of what financial advisors usually urge people do with their savings as they move closer to retirement: Get more conservative. While historically stocks have delivered the biggest gains over periods of 10 years or more, they’re riskier than bonds in the short run—and that’s especially true now, following a long period of up, up, and up.

Vanguard reports that nearly one-third of retirement savers who are 55 or older have 80% or more of their accounts invested in stocks. While there’s no one level that is right for everyone, 60% to 70% is probably more appropriate if you’re within five to 10 years of retirement, or less if you closer to making your exit, already retired, or will lose sleep over losses.

Nearly one-third of retirement savers age 55 or older have 80% of their money in stocks.
Vanguard

If you’ve been treating your retirement accounts with benign neglect, whittle down the amount you keep in stocks to a less risky level while the market is still strong. Most retirement plans have online tools that make it easy to see the overall percentage you have in different kinds of investments and to shift money between funds.

Cover your basics

One way to lower your financial stress and help make your retirement dollars last is to have enough money in bank accounts, bonds, and other low-risk holdings to generate the income you’ll need to cover your regular bills in retirement.

The money you’ll need for housing, food, healthcare and the like are dollars “you don’t want exposed to the whims of the market,” says Hymiller.

If you can rely on holdings other than stocks to pay those bills, you can hopefully avoid being forced to sell stocks during a steep decline. And you can more comfortably invest the remaining dollars in a portfolio that includes stocks for their long-term growth potential.

How much will you need in safer investments? If you don’t already have a spreadsheet for tracking your expenses, use an online tool like this Vanguard worksheet to get a clear-eyed estimate of your likely retirement costs. Focus on your fixed costs and subtract your Social Security benefit and pensions (if you’re lucky enough to have any).

 Bank accounts and bonds aren’t the only options to produce that income. You might also take some dollars out of your investment accounts to buy a fixed immediate annuity. When you buy an annuity, you hand an insurance company a lump sum, often without any chance to get it back, in exchange for a promise of steady monthly income for life. 

Many people dislike the idea of giving up control of a pile of dollars, but an annuity purchase can be well worth it if it brings you confidence and peace of mind. “You are taking some risk off the table and buying guaranteed income,” says Hopkins.

Fill your buckets

Alternatively, you might divide your retirement savings into three distinct buckets, investing each one in line with how soon you will use the money. 

You keep enough cash in the first bucket to cover your spending needs for two to three years beyond what you will get from Social Security, pensions, and maybe an annuity. You keep bonds in Bucket No. 2 to cover spending needs for the middle of retirement—say, a period of 10 to 15 years. Your final bucket is dedicated to stocks to provide some growth for a later-life you.

“Bad returns in the first five years of retirement can cut down the longevity of your savings.”
Jamie Hopkins
American College of Financial Services

Then, as you run through the money in the cash bucket for your living expenses, you periodically replenish it by selling a few investments from the other two buckets. 

The three-bucket approach helps ensure you’ll never be forced to sell stocks to live on during a period when they’re losing money. And you’ll sleep easier knowing you have more than a decade of spending needs tucked away in cash and bonds.

The details, though, can get complicated. Here’s one guide to making a bucket strategy work, from Christine Benz, director of personal finance for investment research firm Morningstar.

Be flexible

Some yoga-like flexibility can help you avoid sizable withdrawals from your stock investments if the market turns ugly shortly before or after you leave the workforce.

If not yet retired when a bear strikes, think about working a bit longer.  That will give you breathing room before you have to dip into your retirement savings, and you may be able to add more dollars from your pay to bolster a sagging retirement-account balance.

Or if you’ve already retired, try to reduce your spending for a while—that might mean foregoing a big vacation or new car this year—so you can withdraw less from a bruised nest egg. 

Keep borrowing in reserve

In a pinch, if you need additional money to cover your living expenses in retirement, tapping a small portion of your home equity can be smarter than withdrawing from your stock portfolio. 

A home equity line of credit (HELOC) is not ideal; as you may have experienced during the financial crisis, banks froze HELOCs. If that happens in the next bear market, you’re out of luck.

A reverse mortgage line of credit may be just the ticket. 

Yes, reverse mortgages have long had a deservedly sketchy reputation, being marketed to homeowners who would have been far better off downsizing. But when used as a bear market “standby” source of income, the strategy gets high marks from retirement planning  experts.

Open the line of credit once you are at least 62 and you can make withdrawals when your stock portfolio is hit by a bear. You don’t have to repay the money while you remain in the house. 

But to be conservative, plan to pay back the loan once the next bull market plumps up your stock investments.