A good way to insulate your portfolio as much as possible in the event of a market crash is by investing in stable companies that sell products and services that are used on a daily basis. If the businesses provide essential goods or services in both good times and in bad, it's a sign the stocks will be able to make it through a market crash.

The broader market has taken investors on a wild ride with the S&P 500 reaching bear market territory as a result of the coronavirus pandemic. The outcome of this volatility is temporarily low-priced stocks that should ultimately recover after the crisis has subsided. Here are three stocks that can help your portfolio ride out a crash in the markets, and provide growth for years after.

1. GlaxoSmithKline

GlaxoSmithKline (GSK 0.10%) manufactures drugs people need to take on a regular basis. The company spends approximately 80% of its research efforts on developing drugs for respiratory issues, HIV/infectious diseases, oncology, and immuno-inflammation. The drugs are crucial to the day-to-day well-being of many patients around the world. In February, the U.K.-based company announced it would split its businesses -- one focusing on pharmaceuticals and the other on consumer health.

The move helps the pharmaceutical business focus even more on the research and development of more drugs. Focusing on core competencies and strengths is an excellent way for a company to maximize its potential for success in the market, and that's why investors should be excited about this development. GlaxoSmithKline has proven its ability to grow while maintaining a strong bottom line. From 2015 to 2019, the company's sales rose by more than 40% and its operating margin increased as well.

Medical products in a pharmacy.

Image source: Getty Images.

For the most part, shares of GlaxoSmithKline have followed the S&P 500, as both are down around 12% over the past year. However, with an annual dividend yield of 7% compared to the 2% that investors can typically earn from an average S&P 500 stock, the healthcare stock has provided investors with a better return overall.

2. Walmart

Walmart (WMT 0.53%) is a one-stop-shop for many consumers, whether there's a coronavirus pandemic they're stocking up for or not. That's why the stock may be one of the more resilient ones for investors to hold in their portfolios. From groceries to other day-to-day essentials, its products are always in need. And being the low-cost retail giant that Walmart is, it can dominate the market through its attractive prices, especially during times when consumers may be cash-strapped.

The company's top line only grew a modest 1.9% in its most recent fiscal year. But with Walmart expanding into healthcare services, there's plenty of potential growth left for the big-box retailer. With the company consistently generating more than $14 billion in free cash flow in each of the past six years, Walmart can afford to take on growth initiatives and ventures that many of its peers cannot.

Currently, the stock trades at a reasonable 21 times earnings and pays investors a quarterly dividend of $0.54, which yields around the S&P 500 average of 2% annually. But it's also a Dividend Aristocrat, and in February it hiked its payouts for a 47th straight year.

It's a decent dividend to go along with the stock's returns over the past 12 months -- which are still up over 9%.

3. Apple

Apple (AAPL 0.20%) provides people with different types of necessities. While consumers can go without using a cellphone, it's not common to do so. And as an industry leader, Apple's iPhones are often the go-to device for people who need a mobile device. Consumers don't have to shell out over $1,000 for a device, either. The company is launching a lower-priced iPhone, the SE 2, which will cost a more modest $399.

Once users are in that Apple ecosystem, there's Apple Music, Apple TV+, and other services that the company can upsell them on. It's a simple approach, and that's why Apple is in a solid position even in a bear market. With low-priced phones and the company offering services, it isn't dependent on high-ticket items to generate revenue growth; they're still important, but the company's diversification helps take some of that load off. In fiscal 2019, services accounted for 18% of Apple's total revenue, up from 14% in fiscal 2017.

The stock has stumbled in March as a result of the coronavirus and concerns surrounding its operations in China, but it's still up 34% over the past year. In addition to strong returns, Apple investors pad their portfolios with the stock's dividend, which pays $0.77 every quarter and yields 1.2% annually. 

Why all three are good additions

One of the best ways to prepare for a market crash is by having a diverse portfolio. And with tech, retail, and healthcare sectors covered, the three stocks listed here can provide investors with dividend income, stability, and diversification as well. Together, they can help strengthen your portfolio and make it more resilient over the long term.