Shares in machine vision company Cognex Corporation (CGNX 0.84%) declined 15.2% in October, according to data provided by S&P Global Market Intelligence. The move comes as the company's end markets continued to weaken. This was confirmed by the disappointing third-quarter earnings report released at the end of the month. Revenue declined 6% year over year in the quarter, and CEO Robert Willett spoke of a "challenging operating environment" on the earnings call.

Cognex's end markets in 2023

Cognex's main end markets are consumer electronics, logistics, and automotives. Customers typically pick up orders from Cognex when they are expanding production or, in the case of logistics, their deliveries. By way of example, Apple is a relatively significant customer, and Amazon.com is also believed to be a customer.

Unfortunately, the slowdown in consumer spending is causing consumer electronics companies to hold back investment in new models. Meanwhile, e-commerce warehouse spending is on pause this year due to the consumer spending slowdown and a natural correction from a few years of torrid growth driven by e-commerce-related expenditure caused by the lockdowns.

Finally, automotive spending overall has also weakened as automakers aren't being as aggressive as previously, given the high interest rate environment.

Where next for Cognex?

It's essential to put the current trading conditions and Cognex's sales growth into context. The company is going through cyclical weakness in its key end markets, but it won't last forever. Moreover, the company has plenty of underlying growth prospects that will blend into sales growth in the future.

For example, in logistics, its solutions help shippers reduce misloads and improve efficiency. The automotive industry has always been an early adopter of automation and machine vision, and Cognex has a major growth opportunity coming from electric vehicle (EV)-related spending, notably batteries.

Willett noted that he'd met the senior management of the leading EV battery manufacturers and "heard numbers of five to seven times increase in production capacity that they're looking to add," with Cognex's solutions being "a very important part of their roadmap for improving quality and throughput.

Packages on a conveyor belt.

Image source: Getty Images.

Finally, the benefit of increasing precision in manufacturing, monitoring, and guiding production will only increase as manufacturers adopt robotics and digital technology. That's likely to be even more the case when consumer electronics start ramping up spending again, notably on developing new products.

Cognex's best days are ahead of it, and its growth has always been lumpy. So, the stock looks attractive for investors looking to take a contrarian view.