Since the market crash of March 2020, the S&P 500 has risen by an incredible 50%. To put into perspective just how big those gains are, consider that from 2017 through the end of 2019, the index didn't even rise by 45%. The gains amassed over the past 17 months have been extraordinary. You can blame that on retail investors, meme stocks, boredom, stimulus, or a combination of all of those and/or other factors. But there's no denying that many stocks are trading at obscene multiples right now.

However, the solution isn't to just dump all your holdings and hang on to cash while you wait for a correction in the markets. Doing that could result in missing out on profits along the way. Even the world's smartest investors don't try to predict market crashes, because it's impossible to do. Instead of worrying about what may seem like an inevitable plunge, you can still safely invest in the stock market by doing the following:

A person delivering a presentation.

Image source: Getty Images.

Focus on stocks that trade at low earnings multiples

An easy way to spot overvalued stocks is by looking at their price-to-earnings (P/E) multiples. If the company doesn't have any earnings, you may be better off steering clear altogether; growth stocks have come under pressure over the past six months, and even Cathie Wood's ARK Innovation ETF has fallen 18% during that time (while the S&P 500 has risen 14%). Companies with no earnings can be risky investments, and they're vulnerable to corrections in the markets.

As for what constitutes a good P/E multiple: The S&P 500 has historically averaged a multiple of about 15. Today it's at over 30, which is higher than it has been in recent yearsand a definite sign that investors are paying more of a premium for stocks today. While that doesn't mean that every stock that trades below a P/E of 15 is a good buy, it can be a good benchmark to compare against.

Another way to gauge relative value is by comparing stocks within the same industry. For example, while healthcare company Regeneron Pharmaceuticals (REGN -0.49%) is trading at a P/E of 17, slightly higher than the index average, it's cheap compared to some of the other big names in the sector:

JNJ PE Ratio Chart

JNJ PE Ratio data by YCharts

However, valuation is just one part of the consideration. You also want to look at what's ahead for the business and whether it's likely to produce strong results in the future.

Invest in businesses that are likely to grow over time

Companies that are trading at low valuations and struggling to execute on their business models are sometimes referred to as value traps, since they can lure investors in with their cheap-looking prices. But a low P/E isn't all that helpful if the earnings number will decline over time. CVS Health, for instance, trades at about 15 times its earnings, but investors may be worried about the future of retail pharmacies, especially with Amazon potentially setting up physical locations of its own.

Looking again at Regeneron, it is not only trading at a low earnings multiple, but the company is generating some strong growth numbers. In its second-quarter results for the period ending June 30, the company's revenue of $5.1 billion was up by 163% year-over-year. A big reason for the growth was COVID-19-related revenue from REGEN-COV, its antibody cocktail that treats patients with the illness. That added $2.6 billion to Regeneron's top line during the past quarter.

This is a good example of why it's important to look past the numbers. The company said in its earnings release that it had fulfilled its contract with the U.S. government, meaning it only anticipates another $34 million in the third quarter for REGEN-COV and possibly nothing afterward (unless there's a sudden need for it, perhaps because of a spike in COVID-19 cases). That said, while investors can discount that growth in future periods, they can still rely on sales from the company's eye-disease treatment, Eylea, which rose 28% year-over-year to $1.4 billion. Sales from the product were down a year ago due to lockdowns and fewer people visiting the doctor's office. Now, with demand stronger, Elyea's sales numbers should continue to rebound.

Regeneron also has other products in its pipeline that could help generate future growth, including several that are in phase 3 trials. In total, it's got 37 trials under way, each presenting opportunities for the company down the road. It's impossible to predict what will flop and what will be a star product, which is why having many options can be helpful to minimize an investor's overall risk.

Sticking to fundamentals can help keep your portfolio safe

If the markets were to crash tomorrow, a stock like Regeneron would likely not be immune to the sell-off. But with a modest valuation, it likely wouldn't incur as heavy a loss as some of the stocks shown earlier that are trading at much higher premiums. And with Regeneron still growing its sales of Eylea and many products that can help contribute to the top line in the future, it likely wouldn't stay down for too long. 

Regeneron is just one example of a good value stock with strong growth potential. The key for investors who are worried about a market crash is focusing on those types of investments rather than going all-in on expensive stocks that could be due for a sell-off in a correction.