Investors should be net accumulators of stocks, in good times and bad. When a recession hits, the stocks that investors pick up need great long-term potential, as well as a recession-proof business model. Just because the economy is in the tank doesn't mean an individual company can't succeed.

Two tech companies I'd buy during a recession are CrowdStrike Holdings (CRWD -0.18%) and Autodesk (ADSK 0.07%). Both provide vital software, something that cannot be cut regardless of how bad business gets. During the last recession -- caused by the pandemic -- each shrugged off the challenge and continued growing.

A person watching an arrow following a downward pattern along a dollar bill.

Image Source: Getty Images.

1. CrowdStrike

An area no company can cut back on is cybersecurity. A compromising attack when a business is already down on its luck during a recession could be the company's end. CrowdStrike's endpoint security software protects network access points, like a computer or phone. Its zero-trust approach can identify when users are not doing what they typically do. The response to prevent any damage or stolen information is instant, further advancing CrowdStrike's use case.

Unlike Autodesk, CrowdStrike is young enough to have never experienced a prolonged recession. Founded in 2011, the company has only known good times. However, its CEO, George Kurtz, has experienced two recessions during his career.

In 1999, he created Foundstone, a company that advised its clients on security and had an incident response team. Foundstone was bought out by McAfee, another software security company, in 2004, showcasing Kurtz's ability to navigate through the 2000s dot-com recession. During the 2008 financial crisis, he was McAfee's chief technology officer, giving him another front-row seat in managing a challenging environment.

Although the company is not yet profitable, with the increasing revenues coupled with how important the software is to customers, the company could reach profitability soon. Though profitability is great, leadership is key for any team during challenging periods, and Kurtz gives CrowdStrike an edge.

The stock is also a great investment right now; during its fiscal 2022 third quarter, annual recurring revenue (ARR) grew 67% to $1.5 billion and customer count increased 75% when compared to the year-ago quarter. Rapid adoption showcases how crucial CrowdStrike's products are, making it unlikely they'll be cut during a recession.

2. Autodesk

Construction and manufacturing slow down during recessions. With Autodesk's old business model, architecture and engineering firms could choose to not upgrade to the next software model and wait until business picked up.

Now, the subscription model generates revenue every single year, unless a customer drops the software completely. Autodesk's software lineup includes Revit, AutoCAD, and Inventor -- all must-haves for their users. These programs create, modify, and maintain designs and products and can never be dropped; they have to be replaced -- an expensive proposition unlikely to occur during a recession.

With how crucial the U.S. is to the worldwide economy when a recession strikes the country, it will likely affect the globe. However, each region will experience a different magnitude of recession. Autodesk's revenue stream is diversified across all corners of the world and is growing.

Autodesk Q3 2022 Revenue Makeup
Region Revenue Share Revenue Growth
Americas 41% 18%
Asia-Pacific  21% 18%
Europe, Middle East & Africa  38% 19%

Source: Autodesk

By being diversified, Autodesk can maintain growth through a domestic recession by leaning on other regions.

It likely will never grow as fast as CrowdStrike but is solidly profitable. It converted 23% of revenue into free cash flow during the third quarter and had a 13% profit. Recurring revenue made up 97% of the total, marking its transition away from annual software updates. Autodesk won't light the world on fire, but it will provide solid results.

Tech stocks to avoid

The COVID-19 recession didn't last long. Still, it gave investors insight into how certain companies would do during adverse conditions. A subset of tech companies that rely on advertising for income, like The Trade Desk (TTD 0.86%) and Pinterest (PINS 0.25%), saw revenue decline in the quarter after the recession (annotated by the gray area).

ADSK Revenue (Quarterly YoY Growth) Chart

ADSK revenue (quarterly YoY growth). Data by YCharts. YoY = year over year.

The dip in the chart of year-over-year quarterly revenue growth around July 2020 showed what happens when companies cut their advertising budgets to cope with pandemic difficulties. However, the subscription businesses shrugged it off as if nothing happened. During the prolonged 2008 financial-crisis recession, advertising spending dropped by 13% across all media. When a recession hits, advertising-based companies will struggle.

Essential software is a great place to look for recession-proof stocks. Often, the product is so ingrained within the general workflow that a company could not operate without it. Additionally, the software should be on a subscription schedule. Both Autodesk and CrowdStrike fit these descriptions, making them great investments now as well.

Even though these companies currently seem robust, when a recession hits, all bets are off. Still, these two are primed to succeed during good times and bad.