The stock market may be experiencing remarkable growth at the moment, but the U.S. economy is officially in a recession, according to the National Bureau of Economic Research.

The economy and the stock market work independently and don't always align, but it's important to think about how the former could affect the latter. Although the market might be up at the moment, it's impossible to say how long this growth spurt will last. If the country is hit with a second wave of COVID-19 and more Americans lose their jobs, that could potentially trigger another stock market crash.

It can be tough to decide what to do with your investments when there's no telling what the stock market may do next. But no matter what happens, there are a few things you should not do right now.

Young man sitting on a couch writing.

Image source: Getty Images.

1. Pull all your money out of the stock market

Recessions can be intimidating if nearly all your money is tied up in the stock market. If the market crashes, your investments could plummet in value. However, one of the worst moves you can make is to withdraw all your money from the stock market.

Although market downturns are daunting, they can also be an investor's best friend. If the stock market takes a turn for the worse, stock prices could drop drastically. On the surface, that may seem like a bad thing. But it also means you can invest more at a fraction of the price. When the market is down, stocks are essentially on clearance, so you can get more for your money.

By loading up on stocks while they're on sale, you'll be setting your investments up to see massive gains once the market recovers and stock prices bounce back.

2. Try to time the market

Timing the market means trying to sell your investments when the market reaches its peak just before a downturn. In theory, this sounds like a smart move. But in practice, it's nearly impossible to achieve.

The stock market is unpredictable, and even the experts sometimes have trouble explaining why it does what it does. That makes it incredibly difficult to anticipate when the market will peak. If you sell your investments at the wrong time, it could cost you. If you were to pull all your money out of the market a month or two ago, you would have missed out on tremendous growth. But if you wait too long to sell and the market crashes, you've missed your opportunity.

Because accurately timing the market is nearly impossible, your best bet is to hold onto your investments for as long as you can. By investing for the long term, it won't matter what the market does right now.

3. Bet all your cash on a few individual stocks

Diversifying your investments is key to getting through any recession or stock market crash. Throwing all your money into just one or two individual stocks can pay off if you're lucky, but it could also cost you big time if your stocks don't pull through the recession. Investing solely in individual stocks can be a smart move if you do plenty of research to ensure you're investing in the right places, but it's still a good idea to invest in at least 10 to 15 different stocks to limit your risk if the market goes south.

To mitigate as much risk as possible, you can also invest in exchange-traded funds. ETFs are essentially large collections of securities. By investing in a single ETF, you're actually investing in dozens or even hundreds of stocks at once.

Many ETFs track particular indexes, such as the S&P 500 or the Dow Jones Industrial Average. These indexes are good representations of the stock market as a whole, so if the market in general is performing well, your index ETFs are likely performing well too. Historically, the stock market has always recovered from every downturn it's experienced. By investing in index ETFs, your investments are very likely to recover as well.

The future is uncertain. Nobody knows for sure how long this recession will last or if a stock market crash is on the horizon. But by being strategic with your investments and avoiding these risky moves, your finances can come out of this recession stronger than ever.