This story was updated on Oct. 11, 2018.

The stock market just dropped a stunning 832 points in a single day, the third-worst point decline in history for the bellwether Dow Jones Industrial Average. Blame the Federal Reserve, trade tensions with China, Hurricane Michael, or simple fatigue among investors after years of stock prices going up, up, and up.

The steep drop was all the more jarring given that just a couple of months ago, the stock market celebrated a big milestone, as the climb in share prices that began after the financial crisis officially became the longest bull market in U.S. history. That’s nine straight years of gains without a 20% drop along the way—more than twice as long as the typical bull run.

Just how good has this market been for retirement savers? 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 around $500,000 now—yep, a cool half-million.

Could the recent rout be the beginning of the end for this historic bull market? No one knows for sure—and you shouldn’t trust any expert or pundit who tries to tell you otherwise.

But at some point, the laws of gravity will kick in and inevitably, the news about stocks will turn gloomy for more than a few days in a row. That will be no fun for anyone but it’s particularly ominous 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 have to start taking money out of your account to live on. Each withdrawal locks in a loss and leaves fewer dollars in your account to grow when the market eventually recovers. 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.