"Buy your straw hats in the winter." This adage is a terrific way to illustrate that buying quality stocks when demand is low will pay off when demand is up. As Warren Buffet once said, "Whether we're talking about socks or stocks, I like buying quality merchandise when it is marked down."

Weaker demand for stocks usually means that investors are fearful and will sell high-quality, high-conviction shares at a discount. Maybe you've seen those "Chicken Little" headlines in the news sometimes, warning of trouble to come? That's a clear sign there is fear in the market. But that fear could spell opportunity for the long-term investor if you know where to look.

"Best-in-breed" companies that have massive moats and pay impressive yields are a great place to start, and Amazon (AMZN 0.31%), Intuitive Surgical (ISRG 0.32%), and AbbVie (ABBV -0.30%) are three fantastic examples. Let's take a closer look.

Amazon -- best-in-breed

Amazon is the undeniable leader in the cloud market. Amazon Web Services (AWS) holds 34% market share, well ahead of Microsoft Azure (NASDAQ: MSFT), and leaving Google Cloud (NASDAQ: GOOG)(NASDAQ: GOOGL) in the dust as shown below. 

Amazon share of cloud infrastructure market

Source: Statista.

Inflation and expenses related to labor and logistics have seriously crimped retail margins, but AWS has saved the day. This illustrates the strength of Amazon's ecosystem. 

AWS posted $38 billion in sales during the first half of 2022 and an impressive 32% operating margin. The rest of the company hasn't been profitable this year, but the headwinds won't last forever. The stock could take off when they subside, and Amazon can fire on all cylinders again.

Don't overlook Intuitive Surgical

Intuitive Surgical's robot-assisted system makes surgery less invasive, promotes faster recovery, and reduces complications. You may have already experienced or seen it in action since the technology is widely adopted. There are more than 7,000 of Intuitive's da Vinci Surgical Systems installed. 

Aside from being the market leader, Intuitive makes a fantastic investment. More than 70% of its revenue is recurring, which means it comes from instruments, accessories, and services. As the machines become widely adopted, the company will make more money. Recurring revenue is vital as there are only so many hospitals in which to place these systems.

The company has a massive moat. Getting competing systems approved and in the field takes years and hefty investments. This moat allows Intuitive to make tremendous profits. The company boasts an operating margin near 30%, far outpacing other medical device companies as shown below.

ISRG Operating Margin (TTM) Chart

ISRG Operating Margin (TTM) data by YCharts.

Intuitive has built an impressive war chest of cash because of these high margins to the tune of $8.18 billion, or 11% of the market cap, as of the last quarter. These traits should allow Intuitive to rebound sharply when the market turns.

Grab AbbVie's enticing yield

Solid dividend stocks can be like a feathery pillow helping you to sleep well every night. And if the stock is in the pharmaceutical industry, that's a bonus as this area is also resistant to recessions since the products are typically necessities. Consider the case of AbbVie; its shares have outpaced the S&P 500 by almost 20 points this year.

AbbVie makes arthritis drug Humira, one of the top-selling medications in the world. That's helped the company pay a tidy dividend, currently yielding more than 4% -- and AbbVie has raised that payout each year since the company's inception in 2013. During this fantastic run, the annual dividend per share has grown from $1.60 to $5.64. 

AbbVie has a higher yield than many stocks because biosimilars for Humira will soon be available in the U.S. This will reduce AbbVie's revenue for its most popular drug. However, the company has reiterated its forecast for $15 billion in sales from two other drugs, Rinvoq and Skyrizi, by 2025 to fill the gap. The company has done a fantastic job building a drug portfolio that is much less reliant on Humira through organic growth, new products, and its acquisition of Allergen. These moves should keep the dividends flowing. 

Bottom line

We are likely to see a number of headlines talking about short-term market movements and whether we have or haven't hit bottom. Remember, timing an exact market bottom isn't possible. Luckily, we don't have to do so. The most successful stockholders invest in fantastic companies consistently over time. These three may make excellent portfolio additions.