When the market is selling off, it’s easy to panic as big losses rack up in your account.

Here’s the thing, though: Going to cash, and fully exposing yourself to inflation, is a guaranteed way to lose. It’s doubly sad to see first-level investors doing this when there’s a time-tested way to survive meltdowns, keep your income stream intact and cut your portfolio’s volatility.

It doesn’t involve panic selling. Instead, it revolves around three simple rules: diversify, be patient and keep a big income stream. Let’s walk through each of these.

Diversify

The first key to surviving a meltdown is to be in several markets at once. That way, if one crashes, you’ve still got the others to balance things out.

This is the most simple and powerful trick in finance, yet it’s commonly overlooked. Take the last week of February. If you were 100% invested in the S&P 500 through an index fund like the SPDR S&P 500 ETF (SPY) or Vanguard 500 Index Fund (VOO), you’d be facing an 11% loss in just a week.

To be sure, a loss like that, taken when you’re close to retirement, could be a threat to your golden years.

This is where diversification comes in: Someone who also bought municipal bonds — issued by state and local governments to fund infrastructure projects — through the iShares National Muni Bond ETF (MUBor the iShares 20+ Year Treasury Bond ETF (TLThad a far better week.

Now That’s Better!

Granted, this investor is still facing losses, but an equally allocated portfolio of these three ETFs results in a loss of 2%, a far cry from 11%.

So if diversifying into a variety of funds in different asset classes works, why are personal-finance gurus touting low-cost index funds as the secret to wealth? Because they’re riding a 10-year bull market, that’s why. But the prudent investor knows that all good things come to an end, even decade-long stock run-ups. And that end came this week with the Dow entering bear market territory Wednesday. The S&P 500 and Nasdaq joined it a day later.

Be Patient

One of the worst things about bear markets is they happen so fast. But that’s also one of the best things about them. Remember the end of 2018? Fears around trade, the Federal Reserve and global growth hit stocks all at once — and this happened.

A Big Loss …

Late 2018 saw a technical bear market take hold by the end of the year, with the S&P 500 falling about 20% in three months. And it took about three months for stocks to recover.

… Thrown in Reverse

The best thing about bear markets is that they don’t last forever, and if you’re patient, your portfolio will recover. The best thing you can do when stocks fall 11% in a week? Don’t sell and lock in that loss. Just wait — stocks will bounce back.

Keep a Big Income Stream

What if you can’t wait? Some people hold stocks not because they’re waiting for their nest egg to grow, but because they need an income stream now.

This is where yield comes in.

Investors who hold an index fund like VOO and need cash now are being forced to sell shares at a discount to what they could’ve sold for a couple weeks ago. This is the case for many VOO shareholders, because that fund yields just over 2%. With such a low income stream, you need to sell shares periodically to maintain a 5% withdrawal rate, let alone a higher one.

High-yield equity funds, like many closed-end funds (CEFs), are an alternative. For instance, the Liberty All-Star Growth Fund (ASGholds mid-cap and large-cap stocks and pays a huge 8.4% dividend, so the odds are lower that you’d have to sell a single share during a crash.

ASG has been crushing the index for years, even after the recent bloodbath.

A Big Outperformer

ASG isn’t the only option. There are CEFs in many sectors — municipal bonds, corporate bonds, utilities — that get you diversification and high income. And since the average CEF’s discount is now 4.3%, with over 150 offering discounts of 10% or more, now is your chance to buy at fire-sale prices.

To learn more about generating monthly dividends as high as 8%, click here.