Investing for the long term requires taking an overarching thematic view of the development of businesses rather than getting caught up in how they are doing over a quarter or two. That's a consideration worth keeping in mind when looking at machine vision specialist Cognex (NASDAQ:CGNX), aviation services company AAR (NYSE:AIR), and industrial software company PTC (NASDAQ:PTC). All three have had issues in 2021, but those shouldn't detract too much from their long-term prospects.

The case for Cognex

The machine vision specialist's third-quarter results were a disappointment. Gross margin came in lower than anticipated as a combination of supply chain pressures and unfavorable margin mix impacted profitability. Moreover, its revenue guidance for the fourth quarter was lower than analysts were expecting, as management is concerned about supply constraints and ongoing weakness in its consumer electronics end market.

That said, there were a couple of pieces of good news from a long-term perspective. First, Cognex's automotive-based sales (the auto industry has long been an early adopter of automation technology) are growing strongly. The company is starting to demonstrate how it will benefit from the industry's shift toward producing far more hybrid and electric vehicles.

Robots at a logistics facility.

Image source: Getty Images.

Second, part of the Q3 margin shortfall was caused by Cognex dedicating extra resources to a new customer in the logistics market (Cognex's third most important) that management believes could place many orders in the future.

Moreover, Cognex's consumer electronics orders are highly volatile, not least because they correlate to the spending patterns of big clients like Apple. As such, they are dependent on the capital spending cycles in spaces like the smartphone industry.

All told, Cognex's long-term growth drivers -- the expansion of spending on machine vision and automation -- look assured, so don't be surprised if the company bounces back vigorously in 2022 and beyond.

The case for AAR

It's been a difficult couple of years for aviation services company AAR. If it wasn't the slump in flight departures caused by the COVID-19 pandemic, it was the U.S. exit from Afghanistan negatively impacting its government business. As such, the stock is down close to 20% since the start of 2020.

Still, the commercial aviation market is in a multiyear recovery mode, and AAR's long-term supply and services contracts with airlines ensure it will grow as the industry recovers. AAR offers parts supply, logistics solutions, and maintenance, repair, and operations services to many leading global airlines and numerous government customers.

Airplanes in the sky.

Image source: Getty Images.

It's an attractive business to be in because servicing is a critical part of an airline's operations, and AAR's expertise can help reduce airlines' operating costs. Moreover, airplane parts are highly regulated, so parts suppliers need to be close to their customers. As such, AAR's business has a fairly secure moat.

In addition, AAR carries very little debt: Its latest net-debt-to-EBITDA (earnings before interest, taxation, and depreciation) ratio came in at just 0.6. During the pandemic, management cut costs and sold an aerospace composite manufacturing business in line with its strategy of focusing on its core aviation services business.

It's all expected to lead to a pick-up in earnings and cash flow. Wall Street analysts forecast AAR will generate a cumulative $372 million in EBITDA and $181 million in free cash flow over the next two years. Those are big numbers for a company with a market cap of just $1.3 billion. If it hits them, investors who buy in at current levels can expect excellent returns.

The case for PTC

This industrial company has had a slightly disappointing 2021. While industrial activity has been more robust than most foresaw at the start of the year, PTC's underlying performance has only been in line with its original guidance. That's not so bad, but when you're investing in a growth company operating on the cutting edge of the Internet of Things (IoT) and augmented reality (AR) revolutions, it's reasonable to expect a bit more.

In addition, there's the possibility of more near-term disappointment as management is accelerating PTC's transition into a software-as-a-service (SaaS) solutions provider. That shift comes with execution risks and will negatively impact cash flow generation next year.

Worker with a tablet in a digital factory.

Image source: Getty Images.

That said, a long-term investor taking the glass-half-full view will look at this early SaaS transition as a positive because it means PTC is stealing a march on its rivals in a market that will eventually go to SaaS anyway. Meanwhile, PTC's core end markets (computer-aided design and product lifecycle management software) are growing nicely. Also, the trends for its growth end markets (IoT and AR) will improve in the coming years as manufacturers seek to digitize their operations.

All told, once you look past its near-term headline headwinds, PTC has an exciting future. 

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.