When stock markets become volatile, investors can get nervous. In many cases, this prompts them to take money out of the market and keep it in cash. Cash money, after all, can be seen, physically held, and spent at will—and having money on hand makes many people feel more secure.

But how smart is it really to sell assets for cash when the market turns? Read on to find out whether your money is better off in the market or under your mattress.

Key Takeaways While holding or moving to cash might feel good mentally and help avoid short-term stock market volatility, it is unlikely to be wise over the long term.

Once you cash out a stock that's dropped in price, you move from a paper loss to an actual loss.

Cash doesn't grow in value; in fact, inflation erodes its purchasing power over time.

Cashing out after the market tanks means that you bought high and are selling low—the world's worst investment strategy.

Rather than cash out, consider rebalancing your holdings in downtimes.

Benefits of Holding Cash

There are definitely some benefits to holding cash. When the stock market is in free fall, holding cash helps you avoid further losses. Even if the stock market doesn't drop on a particular day, there is always the potential that it could have fallen—or will tomorrow. This possibility is known as systematic risk, and it can be completely avoided by holding cash.

Cash is also psychologically soothing. During troubled times, you can see and touch it. Unlike the rapidly dwindling balance in your brokerage account, cash will still be in your pocket or in your bank account in the morning.

However, while moving to cash might feel good mentally and help you avoid short-term stock market volatility, it is unlikely to be a wise move over the long term.

When a Loss Is Not Really a Loss

When your funds are invested in stocks and the stock market goes down, you may feel like you've lost money. But you really haven't. At this point, you've only incurred a paper loss.

However, if you sell your holdings and move to cash, you lock in your losses. They go from being paper to being real. While paper losses don't feel good, long-term investors accept that the stock market rises and falls. Maintaining your positions when the market is down is the only way that your portfolio will have a chance to benefit when the market rebounds.

A turnaround in the market can put you right back to break-even and maybe even put a profit in your pocket. In contrast, if you sell out, there's no hope of recovery.

Inflation Is a Cash Killer

While having cash in your hand (or your portfolio) seems like a great way to stem your losses, cash is no defense against inflation. Inflation is the rate at which the level of prices for goods and services rises. It's less dramatic than a crash, but eventually, the impact can be just as devastating.

You may think your money is safe when it's in cash, but over time, its value erodes as inflation nibbles away at its purchasing power. Of course, inflation can impact the returns on equities over the long term as well. But you can adjust your holdings and your portfolio's weightings towards growth-oriented stocks. In contrast, you can't do much with cash.

The Opportunity Cost of Holding Cash

Opportunity cost is the price you pay in order to pursue a certain action. Put another way, opportunity cost refers to the benefits an individual, investor or business misses out on when choosing one alternative over another.

In the case of cash, taking your money out of the stock market requires that you compare the growth of your cash portfolio, which will be negative over the long term as inflation erodes your purchasing power, against the potential gains in the stock market. Historically, the stock market has been the better bet.

Opportunity cost is the reason why financial advisors recommend against borrowing or withdrawing funds from a 401(k), IRA, or another retirement-savings vehicle. Even if you eventually replace the money, you've lost the chance for it to grow while invested, and for your earnings to compound.

Be Careful About Buying High and Selling Low

Common sense may be the best argument against moving to cash, and selling your stocks after the market tanks means that you bought high and are selling low. That would be the exact opposite of a good investing strategy. While your instincts may be telling you to save what you have left, your instincts are in direct opposition with the most basic tenet of investing. The time to sell was back when your investments were in the darkest black—not when they are deep in the red.

When you sell your stocks and put your money in cash, odds are that you will eventually reinvest in the stock market. The question then becomes, "when should you make this move?" Trying to choose the right time to get in or out of the stock market is referred to as market timing. If you were unable to successfully predict the market's peak and time to sell, it is highly unlikely that you'll be any better at predicting its bottom and buying in just before it rises.

The Bottom Line

You were happy to buy when the price was high because you expected it to keep ascending endlessly. Now that it is low, you expect it to fall forever. Both expectations represent erroneous thinking. The stock market rarely moves in a straight line—in either direction.﻿﻿

However, historically it has gone up. Yes, living through downturns and bear markets can be nerve-wracking. Instead of selling out, a better strategy would be to rebalance your portfolio to correspond with market conditions and outlook, making sure to maintain your overall desired mix of assets. Investing in equities should be a long-term endeavor, and the long-term favors those who stay invested.