Nobody knows for sure when a recession is coming. To be fair, we can assume there will be one at one point, but exactly when is unknowable. While strong companies will generally make it through recessionary times in good shape, some investors like to have holdings in their portfolios that are particularly suited to succeed in tougher economic conditions.

I think these three companies, in different industries, are stocks to buy during a recession, or if there is concern that one is coming. Each of these companies is a leader in its space, and each has attributes well suited to weather any storm.

Person standing in frozen food aisle, holding basket.

Image source: Getty Images.

1. Target

While Target (TGT 0.18%) may not immediately come to mind when thinking about tech stocks, it's actually the company's investments in its online presence that I believe positions it so well in a recessionary environment. Target's digital comparable sales grew 3.2% in Q1, on top of a 50% increase in the year-ago quarter. Additionally, Target's same-day services -- including in-store order pickup and drive-up pickup -- grew 8%. In a world where consumers may tighten their purse strings, Target is making sure its customers have plenty of options to purchase goods.

In addition, sales growth in the last quarter was driven by items such as food and beverage, beauty, and household essentials. These are mostly items people need regardless of the economic environment, and Target is playing a vital role helping customers get them.

Target's stock took a big hit when it recently released its quarterly results. This was due in large part to news that the company had troubles relating to inventory, as well as higher freight and transportation costs. While Target did raise some prices to counteract these macro conditions, it only did so to a small degree so as not to turn away customers. This shows Target's management is aware of the value it provides to customers.

2. Adobe

For decades, Adobe (ADBE 0.87%) has been a leader in creative and business software. Offering such well-known consumer products as Photoshop and Illustrator, in addition to the ubiquitous PDF file format, Adobe has played an important role in our digital lives for 40 years. With such a long track record of success, Adobe has weathered past recessions and has the market leadership and financial profile to handle future recessions as well. 

In its recently reported Q1 of 2022, Adobe achieved record revenue of $4.3 billion, representing 9% year-over-year growth. More important for Adobe's strong financial positioning is its margins and profitability. Gross margin for Q1 was 88%, which is very high, and shows the power and efficiency of Adobe's software-as-a-service (SaaS) model. 

Adobe also reduced its operating expenses as a percentage of revenue in Q1, resulting in $1.6 billion of operating income and good for an operating margin of 37%. Net income was $1.3 billion, and the company produced $1.6 billion of free cash flow.

Put simply, Adobe is a cash-generating machine, providing a ton of optionality and protection against any adverse economic conditions. If times get tough, Adobe won't need to raise capital to keep the business running. It has also used this cash to reward shareholders. In Q1, the company repurchased approximately 3.8 million shares and has reduced its shares outstanding by 4% over the past five years. 

3. CrowdStrike

A leader in the cybersecurity space, CrowdStrike's (CRWD 2.03%) business is at least recession-resistant and may actually be recession-proof. With more of the world moving online, and with more companies accommodating remote work, cybersecurity is a top priority of most businesses. It's also likely to be one of the last things cut from the budget if a company needs to reduce costs. 

CrowdStrike has shown its ability to grow its users and encourage them to spend more money over time. When the fiscal year ended at the end of January, CrowdStrike had 16,325 subscribers, representing a 65% increase over the previous year. Additionally, the number of subscribers who adopted four or more of CrowdStrike's modules grew 69%. Customers with five or more and six or more modules increased 57% and 34%, respectively. 

The global cybersecurity market is predicted to reach $540 billion by 2030, leaving a lot of room for growth in front of CrowdStrike, considering its 2021 full-year revenue was $1.5 billion. If CrowdStrike can capture even a fraction of that expected market opportunity, the company should reward shareholders handsomely, regardless of larger economic conditions.