The stock market has experienced an incredible year, with the S&P 500 up more than 40% over the last 12 months. But sooner or later, the market is bound to take a tumble.

Market downturns are normal, but they can still be intimidating. Nobody knows exactly when the market will take a turn for the worse, but some experts predict a market crash is coming in the relatively near future.

While you may not be able to avoid a market crash, there are ways to protect your investments as much as possible. And there are a few things you should never, ever do during a market downturn.

Young person sitting at a desk looking at a laptop

Image source: Getty Images.

1. Panic-sell your investments

When stock prices start to fall, it can be tempting to sell your investments in an attempt to salvage as much money as you can before prices hit rock bottom. However, selling your investments can be far more dangerous than simply riding out the storm.

Timing the market is nearly impossible -- even for professional investors. The stock market is unpredictable, and just because stock prices drop slightly, it doesn't necessarily mean we're headed toward a full-blown crash.

If you sell your stocks at the first sign of trouble, there's a chance prices could rebound and you'll miss out on those gains. Even worse, if you then decide to buy back the stocks you just sold, you may end up paying more than you sold them for if prices have increased.

2. Stop investing altogether

Market crashes can be unnerving, and it's easy to press pause on investing until the market is less volatile. But the market will always be volatile to some degree, so if you stop investing every time stock prices dip, it will be harder to reach your investing goals.

Rather, it's best to keep investing consistently no matter what the market does. This is called dollar-cost averaging, and it's a strategy that can reduce the impact of volatility on your investments.

With dollar-cost averaging, you'll invest consistently throughout the year. When the market is thriving, stock prices will be higher and you'll pay more for your investments. And when the market is in a slump, prices are lower and you'll pay less for your stocks. Over time, those highs and lows should average out.

If you stop investing when stock prices fall, that can throw off your average. You'd only be buying stocks when prices are high but not when they're low, which means you're paying more than you should overall.

3. Buy bad stocks just because they're on sale

The bright spot when it comes to market downturns is that it's an opportunity to buy stocks at lower prices. If you've had your eye on a particular stock but its price is too high for you, a market downturn can make it more affordable.

However, this doesn't mean you should buy any stock simply because it's cheap. Before you invest in any company, do your research to make sure it's a solid long-term investment. A bad investment is a bad investment, no matter how affordable it may be.

Keeping your money safe

Market downturns are inevitable, so there's no way to avoid them entirely. What you can avoid, though, is making decisions that could hurt your long-term savings. By buying good stocks and holding them for the long term, you can give your investments the best shot at surviving market turbulence.