The S&P 500 was crushed back in March as the COVID-19 crisis, business closings, and layoffs rattled the market. However, the index subsequently rebounded from those lows, and is only slightly down for the year.

Unfortunately, many stocks didn't keep pace with that recovery. Many energy, travel, and retail stocks have yet to rebound, especially those that were already struggling when the crisis started.

Therefore, it's important for investors to buy "best in breed" stocks that not only stand above their peers, but run resilient businesses that can withstand nasty macro shocks like the U.S.-China trade war and COVID-19.

Here are three stocks that fit that description: Microsoft (NASDAQ:MSFT), Veeva Systems (NYSE:VEEV), and lululemon athletica (NASDAQ:LULU).

Gold bull and bear figures on a financial newspaper.

Image source: Getty Images.

1. Microsoft

Microsoft was once an aging tech giant that had grown complacent and overly dependent on its Windows and Office software cash cows.

But under CEO Satya Nadella, who took the helm in 2014, Microsoft evolved its core software products into cloud-based subscription services and became the world's second-largest cloud infrastructure platform provider after Amazon. That's why Microsoft's commercial cloud revenue rose 39% annually and accounted for 38% of its top line last quarter.

Microsoft also expanded its Surface and Xbox hardware businesses, while abandoning its dying smartphone business. Instead of producing more low-margin phones, Microsoft launched iOS and Android versions of its popular apps, which kept it relevant in the mobile market even without a leading mobile OS.

The COVID-19 crisis mainly affected Microsoft's "More Personal Computing" segment -- which sells Windows licenses, hardware devices, and online ads -- but the growth of its cloud-based services largely offset that weakness. Analysts expect Microsoft's revenue and earnings to rise 13% and 20%, respectively, in fiscal 2020, which ends in late June.

Microsoft's stock isn't cheap at 30 times forward earnings, but it will likely keep attracting new bulls even after surging more than 320% over the past five years. It also pays a decent forward dividend yield of 1.1%.

2. Veeva Systems

Veeva offers cloud-based services to life science companies. Its tools help pharmaceutical giants like GlaxoSmithKline and AstraZeneca track customer relationships, monitor clinical trials and regulations, and keep tabs on other data in real time.

Veeva enjoys a first-mover's advantage in this market, and demand for its services is surging as competition between drugmakers escalates. The company was co-founded by Salesforce's former senior VP of technology Peter Gassner, and its services are still tightly integrated into Salesforce's cloud services.

Veeva recently expanded its ecosystem by acquiring the events management platform Physicians World and the patient analytics platform Crossix. These newer businesses stalled out as COVID-19 halted in-person meetings, but the growth of its core services easily offset that slowdown.

Veeva's revenue rose 28% to  $1.1 billion in fiscal 2020, which ended on Jan. 31, as its adjusted EPS grew 36%. It expects its revenue to rise 25%-26% in 2021, and for its adjusted EPS to grow another 14%-16%. Veeva also reiterated its long-term goal of generating $3 billion in annual revenue by fiscal 2025.

Veeva's stock has rallied more than 740% over the past five years. It trades at over 100 times forward earnings, but its robust growth, insulation from macro headwinds, and ambitious long-term targets arguably justify that premium valuation.

3. Lululemon

Lululemon sells high-end yoga and athletic apparel, and it reinforces its brand with free yoga classes and other community events. It initially focused on female shoppers, but it's been aggressively courting male shoppers with new products.

A group of women attend yoga class.

Image source: Getty Images.

Lululemon faces competitors like Gap's Athleta, but it posted double-digit comparable store sales growth over the past nine quarters thanks to strong sales of its core products, the expansion of its menswear business, and the growth of its direct-to-consumer channels -- which generated 29% of its revenue last year.

Looking ahead, Lululemon believes it can double its men's revenue, double its digital revenue, and quadruple its international revenue by 2023 with its "Power of Three" growth plan. It reiterated its commitment to that goal during its first-quarter conference call on June 11.

Lululemon didn't provide any guidance for fiscal 2020 last quarter due to COVID-19. Analysts expect its revenue to rise 1% in fiscal 2019 (which ended in February) as its earnings to dip 11%, followed by strong double-digit top- and bottom-line growth next year.

Lululemon's stock has rallied more than 350% over the past five years, and it isn't cheap at over 70 times forward earnings. However, investors will likely keep paying a premium for Lululemon as long as it advances its "Power of Three" strategies.

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.