Earlier this month, the S&P 500 Index (^GSPC -0.88%) doubled its March 2020 pandemic bottom. While the returns for investors over the last year and a half have been phenomenal, it's unlikely the next year and a half will see the market double again. In fact, some investors believe the stock market is overvalued right now, and a correction could be in store in the near future.

If you're in that camp, you may be wondering if you should just pull your money out of the stock market now. While doing so will protect you from market volatility, it creates a couple additional risks to be avoided.

An anxious woman looking at a laptop.

Image source: Getty Images.

Inflation risk

When you sell your stocks and move more of your assets to cash, inflation will slowly eat away at the value of your holdings. Your brokerage account probably doesn't pay any interest on your cash, and even the best savings accounts pay just a fraction of a percentage point.

Right now, we're experiencing significant inflation. The consumer price index jumped 5.4% higher in July versus a year ago. The Federal Reserve says the high inflation rate is merely transitory, and it expects to manage the money supply for a 2% inflation rate over the long term.

In the short run, however, the Fed is OK if inflation runs high. That means selling your stocks now and moving to cash carries additional risk of a high inflationary environment.

While stocks are also affected by inflation, it doesn't impact each stock the same. Value stocks typically perform better in high-inflation environments while growth stocks underperform. If you're concerned about the current market valuations and inflation, it may be more prudent to shift your allocation toward value stocks instead of to cash.

What will you do with the cash?

If you sell your stocks and hold cash, you're paying the opportunity cost of your foregone investments. If you have a plan for how to generate a positive return on that cash, such as a down payment on an investment property or switching to a different paper asset like bonds or cryptocurrency, then selling stocks might not be the worst thing.

But investing in a broad-based index fund has historically been one of the best risk-to-reward returns on investment you can make over long periods of time. While it has periods of ups and downs, the long-term trend is for the market to continually rise higher, producing positive returns for patient investors. And it's much simpler than investing in real estate, cryptocurrency, alternative assets, or even individual stocks.

If you plan to simply hold cash and wait for market valuations to decline, you may be holding for a while. The market could continue to climb higher, defying expectations, and you'd miss out on the potential gains. And even if the market goes down, you need to be confident you'll know when to move your cash back into stocks. 

Timing the market by moving between stocks and cash is impractical and often leads to missing out on investment returns. What's more, there are transaction costs to consider, including capital gains taxes.

Think about rebalancing

Instead of pulling money out of the stock market into cash, a better strategy is to rebalance your asset allocation. If your portfolio only holds stocks and you're feeling nervous about prices, it's potentially a sign that you should have more bonds and other less volatile assets. 

As you get older and closer to your planned retirement age, you should shift more of your assets toward asset classes with lower volatility in order to preserve capital. Balancing your stock holdings with assets with negative price correlation, such as treasury bonds, is far more effective at preserving capital than holding stocks and cash. That's because if stocks go down, the other assets will typically increase in value. Cash typically goes down in value over time due to inflation.

Make sure you have an appropriate asset allocation for your goals, and you won't be wondering whether it's safer to pull your money out of the stock market. It may just be time to rebalance after the massive run up in stocks.