There are many different ways to invest during a recession. So let's discuss three different ways and suggest three stocks, along with some alternatives for investors. The three stocks, Watsco (WSO -0.18%), Corteva (CTVA 0.40%), and Cognex (CGNX 2.06%), have nothing in common, but they all represent investing themes that might work in a downturn.

Three ways to invest in a recession

There isn't one sure-fire way to invest in a recession, but here are some solid options:

  • Stocks with solid balance sheets and the ability to improve long-term prospects during a recession, like Watsco and Honeywell International
  • Stocks whose end markets aren't necessarily affected by the direction of the economy. An example of this is the agriculture sector, with companies like Corteva, Deere, and FMC.
  • Long-term growth stocks that get beaten up during a recession, providing investors with an opportunistic entry point. There are many options here, including Cognex, PTC, and Fortive.

1. Watsco 

The heating, ventilation, air-conditioning, and refrigeration (HVACR) parts distributor's incredible success story over the last couple of decades comes down to its "buy and build" strategy. Its business is relatively simple but highly successful. Service contractors visit to repair/service HVACR equipment and order parts from a distributor like Watsco. 

The company has grown by consolidating a highly fragmented market characterized by companies operating in local markets. Via an ongoing series of acquisitions, Watsco has grown geographically and expanded its product range. Since the acquired companies are operating locally, there's little cannibalization. In addition, being part of the Watsco network helps them run more efficiently, with access to more parts and Watsco's digital platforms (e-commerce-enabled websites, etc.).

The key to its "buy in a recession" argument is that any economic weakness may encourage smaller distributors to sell up. Given Watsco's strong balance sheet and leading market position, the company is ideally placed to take advantage. 

WSO Net Total Long Term Debt (Annual) Chart

Data by YCharts

2. Corteva

The agriculture sector tends to march to the beat of its own drum. The earnings of stocks in the sector don't depend on the direction of the economy -- a good quality in a recession. As you can see below, the volatility in the price of key crops like wheat, soybeans, and corn over the years doesn't really reflect the volatility in the global economy.

US Wheat Farm Price Received Chart

Data by YCharts

In this line of thought, buying stock in seed and crop protection company Corteva makes sense. The company is interesting because management has a significant margin expansion opportunity through cutting costs and selling more products under its own technology rather than paying costly royalty payments to other companies for complimentary products (for example, another company's herbicide alongside Corteva's herbicide-resistant seeds). 

So far, it's going well on that front, with its own Enlist system (crop protection and seeds resistant to said crop protection) being planted on 45% of U.S. soybean acres in 2022. That gives Wall Street the confidence to forecast a big pick up in profit margin in the coming years, and Corteva has plenty of long-term earnings potential.

3. Cognex Corporation

Not much has gone right for machine vision company Cognex in 2022. However, faced with significant supply chain issues and component shortages going into the year, management made the conscious decision to invest (at the expense of profit margins) to deliver products to customers. That's a good thing to do for a company establishing its technology with major customers like Apple (and possibly Amazon). 

However, that's where the good news stops, because its three major end markets, logistics (e-commerce warehousing), consumer electronics, and automotive, have all suffered this year. Following a few years of torrid growth, e-commerce companies are scaling back investment, while consumer electronics and automotive production will be weaker than expected at the start of the year due to a slowdown in consumer spending and ongoing supply chain issues. Throw in a fire at its primary contractor (damaging Cognex inventory), and it's been a year to forget.

Unsurprisingly, Cognex stock is down 43% in 2022 and 50% over the last year, and if a recession comes, it could go down even more. However, nothing's really changed about its long-term growth prospects, so if you are willing to buy a stock and ride out some potential near-term volatility, then Cognex is attractive. In addition, the company is establishing strong relationships with leading companies, likely leading to greater adoption of machine vision technology.