With a growing number of states under lockdown and unemployment near record highs, it probably doesn't come as a surprise that the country is in a recession. And sadly, recovery may be slower than many are hoping, since coronavirus cases have begun spiking again and many of the jobs lost in recent months have now turned into permanent layoffs rather than temporary ones.

Recessions are a natural part of the economic cycle, although they can be unpleasant to live through. And the good news for investors is that they can actually present buying opportunities. However, it's important to be smart about what you do with your money during a recession, so you don't end up making investment choices that cost you rather than helping to maximize your returns over the long term.

To make sure the 2020 recession doesn't damage your finances, here are three key rules you need to follow. 

Broken piggy bank with coins spilling out.

Image source: Getty Images.

1. An emergency fund isn't optional

A rule about an emergency fund may not seem as though it belongs on a list related to investing. But the reality is, if you don't have liquid cash saved to cover surprise costs or drops in income during a recession, your investment account balance is at risk.

That's because you could find yourself forced to sell investments at a loss if something unexpected happens and you need the money.

If bad economic news causes your investment account balance to fall, your losses are only on paper unless you have to sell your assets before recovery happens. If you have an emergency fund that can cover living expenses for three to six months, you won't find yourself forced to make those paper losses into real ones. 

2. Don't pause your retirement savings unless you have no choice

Fear of a market downturn could prompt you to pull back on investing for your retirement. But the reality is, recessions can be a great time to invest for the future as long as you're disciplined enough not to sell assets based on emotion. 

Pausing retirement savings not only could lead to missing out on buying opportunities that often exist during a recession, it will also cause you to miss out on tax breaks -- and potentially on matching funds your employer provides.

Of course, there are other reasons besides fear of investing that may force you to pause your retirement savings -- such as the loss of a job. But even if you are out of work, if you have spare cash from unemployment benefits after covering the basics, you could still put a little into an IRA so you aren't set back as much in terms of hitting your retirement goals. 

So unless you have no money for retirement savings at all, you should keep saving for your later years. 

3. Invest for the long term

Trying to time the market is always a risky proposition, but it's especially so during a recession.

If you're waiting for stocks to hit rock bottom because you feel the country's economic condition could decline, you could end up missing out on market gains if you don't time things right.

And if you're hoping to make a quick buck on short-term investments, you could easily end up purchasing a company whose share price falls on bad economic news. You'd be left with a choice between losing your money or holding on in hopes the price recovers and getting stuck in an investment you don't really believe in. 

Instead of trying to get rich quick, follow time-tested investing principles: Buy companies you like with a strong competitive advantage and solid leadership team and hold those investments for the long term.

Or, if you don't know how to invest, just opt for index funds that charge low fees and track the market and leave them alone to grow. 

Follow these rules if you'll invest during the 2020 recession

Investing your money during the 2020 recession could help you ensure that today's economic chaos doesn't hurt your finances over the long term -- and perhaps even helps you end up in a better financial situation.

Just be smart about how you do it and follow these three rules, so you don't make a financial mistake that comes back to haunt you.