Recessions can be rough for tech companies, which depend on advertising, enterprise spending, and other macro-sensitive trends. Tech stocks that are trading at frothy valuations can also crash.

But that doesn't mean investors should avoid all tech stocks during an economic downturn. Instead, investors should select tech stocks that are pinned to secular growth trends rather than macro-economic ones. These three resilient stocks fit the bill: Palo Alto Networks (PANW 1.14%), Veeva Systems (VEEV 0.04%), and Adobe (ADBE -0.39%).

"Recession Ahead" written on a yellow warning sign.

Image source: Getty Images.

1. Palo Alto Networks

Cybersecurity companies are naturally resistant to recessions, since companies must maintain their digital defenses regardless of the macro headwinds. Some frothier cybersecurity stocks might stumble with the market during a recession, but those that offer a good balance of growth, profitability, and value -- like Palo Alto Networks -- will do fine.

Palo Alto's core security platform, Strata, runs its next-gen firewall and on-site appliances. But the company has also been expanding its NGS (next-gen security) platforms -- which include its cloud security suite Prisma and its AI-powered threat detection system Cortex -- to widen its moat against cloud-native challengers like CrowdStrike.

That expansion is paying off. Last quarter, 70% of Palo Alto's Global 2000 customers had bought products from more than one of its three core platforms (Strata, Prisma, and Cortex), up from just 25% two years ago. Forty-one percent of those customers now use all three platforms.

Palo Alto's revenue rose 18% to $3.4 billion in fiscal 2020, which ended last July, and it anticipates 20%-21% growth this year. Its non-GAAP earnings dipped 10% last year as it acquired smaller companies to strengthen its NGS business, but it still expects 22%-23% earnings growth this year.

That stable outlook, along with a reasonable forward P/E ratio of 55, make Palo Alto a recession-resistant investment and a great all-around cybersecurity stock. 

2. Veeva Systems

Cloud-based enterprise software companies can struggle during economic downturns, but niche players that serve recession-resistant industries usually fare much better. One such company is Veeva Systems, which provides cloud-based CRM (customer relationship management), storage, and analytics services to over 1,000 life science companies.

Health professionals check a tablet.

Image source: Getty Images.

Veeva's customers includes pharmaceutical giants like Pfizer, AstraZeneca, Moderna, and Merck. Its cloud services help these companies manage their sales teams, connect with customers, analyze data, and track the latest clinical trials and regulations.

Escalating competition between these drugmakers fuels constant demand for Veeva's services. That's why its revenue rose 33% to $1.47 billion in fiscal 2021, which ended this January, and it expects another 24% growth this year.

It's also repeatedly reiterated its long-term goal of generating about $3 billion in annual revenue by calendar 2025.

Veeva's non-GAAP earnings grew 34% last year, and it expects 19% growth this year. Unlike many other high-growth cloud companies, it also remains firmly profitable on a GAAP basis.

Veeva's stock isn't cheap at nearly 80 times forward earnings, but its wide moat, confident growth targets, and recession-resistant business model all support that premium valuation.

3. Adobe

Lastly, software companies that provide industry-standard digital tools, lock subscribers into annual contracts, and charge high fees for premature cancellations can easily withstand recessions. One company which checks all three boxes is Adobe, which provides its flagship Creative software, document creation tools, and other enterprise software as cloud services.

Adobe has transformed its core desktop programs into cloud services over the past eight years. That evolution initially squeezed its margins, but it eventually locked in its customers, eliminated its dependence on software upgrades, and generated predictable recurring revenue. It also enabled Adobe to expand its cloud ecosystem with new sales, marketing, and e-commerce services.

Adobe's revenue rose 15% to $12.9 billion in 2020 as demand for its services remained broadly stable throughout the pandemic. Its adjusted gross margin expanded, it confidently bought back $3 billion in shares throughout the year, and its non-GAAP earnings increased 28%.

Adobe expects its revenue and non-GAAP earnings to grow at least 20% and 17%, respectively, this year. Wall Street expects its revenue and non-GAAP earnings to grow 22% and 21%, respectively.

Adobe's stock isn't cheap at 43 times forward earnings. But its reputation as an evergreen tech stock justifies that slight premium, and it should remain a great defensive stock during the next recession.