Stock market swoons occur, but predicting when they'll happen or how long share prices will remain depressed is extraordinarily difficult. However, when the overall market declines, a buying opportunity to purchase high-quality companies is created, providing you're patient and willing to make an investment during turbulent times.

For instance, there was a broad sell-off earlier this year as COVID-19 cases spread throughout the world. In March, the S&P 500 was down more than 30% for the year, which caused many good companies' stocks to experience a drop.

While the index is in positive territory for the year, there's a lot of uncertainty as COVID-19 cases surge. These are three stocks you should consider pouncing on should the broad market take them down.

A graph showing a big drop and quick recovery.

Image source: Getty Images.

1. Walmart

Walmart (NYSE:WMT) is the world's largest retailer. It opened its first discount retail store nearly six decades ago, and the company's success is derived from a simple, yet effective, formula. It squeezes costs to keep prices low for its customers on a range of goods.

Even better, this approach attracts shoppers, and the company posts solid results during difficult times. For instance, during the pandemic, people boosted their demand for certain items, and Walmart's fiscal second quarter (ended July 31) U.S. same-store sales rose by 9.3%.

Looking further back to the last decade's recession, comps at its U.S. Walmart stores rose by 1% and 3.2% in 2008 and 2009, respectively.

Walmart has reliably raised its dividends, too. In fact, it has done so annually since first paying one in 1974. So even if Walmart's stock remains down due to the overall market, you can count on receiving your dividends while waiting for the price to recover.

2. Johnson & Johnson

Johnson & Johnson (NYSE:JNJ) also performs well during recessions. Examining its businesses, it's easy to see why.

Its consumer segment sells beauty, over-the-counter medications, baby care, and oral-care products, to name a few. These are strong-selling, well-known brands like Band-Aid, Benadryl, Motrin, Nicorette, Listerine, and Stayfree. Then there's its pharmaceutical segment, which sells drugs to treat conditions like arthritis, mood disorders, various cancers, heart disease, and diabetes. Lastly, the medical-devices division sells products used in orthopedics and surgery, among other areas.

People aren't going to buy less of these items even if they lose their jobs during typical downturns. Even though the pandemic hurt its medical-devices division since fewer people went into the hospital for elective procedures, third-quarter adjusted revenue still rose by 2% year over year.

This is another company that you can rely upon for dividends. In April, while many others were suspending their payments, Johnson & Johnson raised its quarterly dividend by 6% to $1.01. This made it 58 straight years with an increase.

3. Amazon

Amazon (NASDAQ:AMZN) began in the mid-1990s as an online bookseller and has stayed relevant in people's lives by focusing on the consumer and constantly innovating. Now you can find just about anything you want to buy for a low price, and with the company's Prime subscription service, you get quick delivery and a streaming service, to boot. With these competitive advantages, it's hard for other companies to knock it off its perch.

Then, there is also its fast-growing Amazon Web Service, the company's cloud computing platform.

The pandemic has forced people to stay home, and many have turned to online shopping, which greatly benefited Amazon. In the third quarter, its sales rose by more than 37% versus a year ago to $96.1 billion, and its operating income nearly doubled to $6.2 billion.

But Amazon was doing exceptionally well before this year. Its sales went from $107 billion in 2015 to $280.5 billion last year. Over the same time, its operating income grew by 14-fold to $14.5 billion.

These are three proven winners, even in difficult times. Therefore, you should view any price dip caused by the overall market correction as an opportunity to pick up additional shares.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.