There really was no place for 401(k) investors to hide in the first half of this year. Even though their portfolios took a hit, they didn’t run for the hills.

The Nasdaq was down 30%, while the S&P 500 and Russell 2000 indices were down more than 20% apiece.

The bond market, typically considered a safe haven during volatile times, did better but that’s not saying much. For example, the S&P US Aggregate Bond Index – a proxy for investment-grade debt – was down roughly 9%.

Despite these widespread losses, 401(k) investors held steady, according to preliminary data from two major 401(k) providers.

At Vanguard, trading among participants in defined-contribution plans was muted, with just 4.3% making any changes to how their money was allocated. And the majority who did chose to move money into stocks as prices declined.

At T. Rowe Price, most 401(k) plan participants made no change to their investments or salary deferral rates.

But if markets don’t improve in the second half of the year – and many analysts think stocks have further to fall before calling a bottom – even some steely retirement investors may start to get cold feet.

If that happens to you, here’s how to calm your nerves:

Forget timing the market

Bearish markets can be a bear on your psyche. There may be times when you are tempted to sell your equity investments and move the proceeds into cash or a money market fund.

If you’re a long-term investor – which includes those in their 60s and early 70s who may be in retirement for 20 or more years – don’t expect to outwit the current downward trends.

When it comes to success in investing, “It’s not about timing the market. It’s about time in the market,” said Taylor Wilson, a certified financial planner and president of Greenstone Wealth Management in Forest City, Iowa.

Say you’d invested $10,000 at the start of 1981 in the S&P 500. That money would have grown to nearly $1.1 million by March 31, 2021, according to Fidelity Management & Research. Had you missed just the five best trading days during those 40 years, it would only have grown to roughly $676,000. And if you’d sat out the best 30 days, your $10,000 would only have grown to $177,000.

Rethink your contributions

If you can convince yourself not to sell at a loss, you still may be tempted to stop making your regular contributions to your retirement savings plan for awhile, thinking you’re just throwing good money after bad.

“This is a hard one for many people, because the knee-jerk reaction is to stop contributing until the market recovers,” said CFP Sefa Mawuli of Pavlov Financial Planning in Arlington, Virginia.

“But the key to 401(k) success is consistent and ongoing contributions. Continuing to contribute during down markets allows investors to buy assets at cheaper prices, which may help your account recover faster after a market downturn.”

If you can swing it financially, Wilson even recommends boosting your contributions if you haven’t already maxed out. Besides the value of buying more at a discount, he said, taking a positive action step can offset the anxiety that can come from watching your nest egg (temporarily) shrink.

Reassess your allocation against your current plans

Life happens. Plans change. And so may your time horizon to retirement. So check to see that your current allocation to stocks and bonds matches your risk tolerance and your ideal retirement date.

Do this even if you’re in a target date fund, Wilson said. Target date funds are geared toward people retiring around a given year – e.g., 2035 or 2040. The fund’s allocation will grow more conservative as that target date nears. But if you’re someone who started saving late and who may need to take on more risk to meet your retirement goals, he noted, your current target date fund may not be offering you that.

If you really can’t stand it, boost your ‘comfort cash’

Mark Struthers, a CFP at Sona Wealth Advisors in Minneapolis, works with 401(k) participants at organizations that hire his firm to provide financial wellness advice.

So he’s heard from people across the spectrum who express concerns that they “can’t afford to lose” what they have. Even many educated investors wanted out during the downturn early in the pandemic, he said.

While Struthers will counsel them not to panic and explain that downturns are the price investors pay for the big returns they get during bull markets, he knows fear can get the better of people. “You can’t just say ‘don’t sell’ because you’ll lose some people and they’ll be worse off.”

So instead he will try to get them to do those things that can assuage their short-term concerns, but do the least long-term damage to their nest egg.

For instance, someone may be afraid to take enough risk in their 401(k) investments, especially in a falling market, because they’re afraid of losing more and having less of a financial resource if they ever get laid off.

So he reminds them of their existing rainy-day assets, like their emergency fund and disability insurance. He then may suggest they continue to take enough risk to generate the growth they need in their 401(k) for retirement but redirect a portion of their new contributions into a cash-equivalent or low-risk investment. Or he may suggest they redirect the money to a Roth IRA, since those contributions can be accessed without tax or penalty if need be. But it’s also keeping the money in a retirement account in the event the person doesn’t need it for emergencies.

“Just knowing they have that comfort cash there helps them from panicking,” Struthers said.