Bear markets are pivotal times that can completely change long-term investing performance. Obviously a market crash can erase years of diligent savings and shrewd investing in the course of a few months. On the other hand, pulling out of the stock market now can prevent you from getting big returns when it recovers. There are a few factors to consider before you can determine which route is safer.

The state of the stock market

By most people's definitions, we're in a bear market. The S&P 500 is down 20% year to date while the NASDAQ has fallen 30%. These sorts of declines are typically associated with stocks that have become very cheap, but that's not exactly the case right now.

Worried investor analyzing a troubling stock chart on a computer screen.

Image source: Getty Images.

Stock valuations were near all-time highs in 2021, so the recent downturn has simply dropped those valuations in line with historically normal levels. The average dividend yield for the S&P 500 still hasn't recovered to pre-pandemic levels.

SPY Dividend Yield Chart

SPY Dividend Yield data by YCharts.

Meanwhile, the forward PE ratio for the S&P 500 recently fell below 18. That's slightly below the pre-pandemic level -- which itself came at the end of one of the best decades in stock market history.

The rise of high-growth, low-dividend tech stocks within major stock indexes certainly plays a role in those metrics, but that doesn't explain everything going on. We can still conclude that stocks aren't particularly cheap across the board. They just aren't prohibitively expensive anymore.

Personal circumstances

That context is important. We can't make blanket statements about the market being cheap or expensive today. We can make educated guesses about the future of the market, but that's even more difficult to forecast when valuations aren't abnormally high or low.

This means that the safety of stock investing depends heavily on your own personal circumstances. Risk tolerance, investment time horizon, and financial goals all play important roles in determining the best course of action. Investors with short time horizons and low risk tolerance need to be much more careful about short-term risks. Investors with high risk tolerance and long-time horizons need to think very carefully about long-term opportunity costs if they refrain from investing.

It's probably a bad time for you to sell stocks

That said, it's a horrible time to sell for the vast majority of investors. It's easy to feel the sting from the most recent market crash, but pulling money out of the market at this time is just a reaction that's coming too late.

Humans are prone to a common mistake that can really complicate investment analysis. We tend to look at recent trends and assume that they'll continue. In reality, circumstances have changed drastically in capital markets. Some of the forces that were present at the start of the 2022 market crash are far less potent today.

The prospect of interest rate hikes by the Fed rippled through the market. Investors recognized opportunities for higher yields and grew fearful of an economic slowdown. After the Fed's aggressive hike in June, the market actually rose, indicating that these fairly extreme monetary policy changes were fully reflected by Wall Street. Expectations have come more in line with reality. Falling stock valuations also removed fuel for the sell-off. Huge quantities of growth investors who piled into tech stocks over the past two years have since closed those positions as the party ended. There's just not as much room to the downside.

That's a long way of saying that the market isn't bound to keep falling just because it's had a rough six months. If you pull money out of the market right now, you're simply locking in those losses. This isn't to say that the market won't fall further -- it definitely could. A recession looks imminent, consumers are still feeling the sting from high inflation, and global supply chains are still recovering from the COVID-19 disruption. It's hard to see a catalyst today that is going to drive valuations higher, and corporate earnings might be weak for the next few quarters.

When you should consider pulling money out of the market

The only people who should seriously consider selling are those who are too exposed to equities. People who are approaching retirement should have a balanced portfolio with both stocks and bonds. That's similarly true for investors who have relatively short-term cash needs or a personal aversion to risk. If your investment allocation is misaligned with your personal circumstances, then it might be wise to limit your volatility -- even if it means locking in some of your recent losses.

It's still not wise to completely abandon stocks in this extreme case. Stocks have a role in most portfolios well into retirement; they just need to be properly balanced.