What happened

Shares in machine-vision company Cognex (NASDAQ:CGNX) soared 18.2% in June, according to data provided by S&P Global Market Intelligence. By coincidence, the stock is also up around 18% year to date, in line with the S&P 500 index. But it would be a mistake to think Cognex has quietly tracked the index this year. It's done anything but. 

In fact, it's been an extremely volatile ride, with a 20% fall in May followed by the 18.2% rise in June. What's going on?

In a nutshell, Cognex has a very attractive long-term growth story thanks to its exposure to the increasing use of machine vision and automation in manufacturing and in e-fulfillment facilities. Indeed, management believes it can grow its factory automation revenue at an annual rate of 20% over the long term and logistics sales (currently around 12% of revenue) by 50% annually.


Slowing smartphone sales have hurt the spending plans of Cognex's consumer electronics customers. Image source: Getty Images.

Impressive figures, but growth rarely occurs in a straight line. And the problem is that sales are actually expected to decline slightly this year thanks to a combination of weakness in automotive spending and a continued slowdown in spending by its consumer electronics customers. Cognex's machine-vision solutions are used by smartphone manufacturers, and Apple is its biggest single client.

The move in June probably is a result of investors taking advantage of some share price weakness to buy into a long-term growth story and/or a more positive view by the market on the global growth outlook.

So what

Given that the jump is likely driven by sentiment, it's hard to draw any hard conclusions from it except this: If you believe Cognex's long-term growth prospects are still intact, then the dip was a good chance to buy into the stock. After all, history suggests that the automotive market is cyclical, and the emergence of electric vehicle models will surely spur investment in the coming years.

However, capital spending in smartphone manufacturing is likely to be contingent on sales. And with shipments continuing to decline, a recovery looks far less certain.

Now what

Cognex needs to get back to growth and demonstrate it can do so even without a strong contribution from smartphone customers. This looks like a given over the long term, as the secular growth drivers of machine vision -- across a range of industries -- look positive.

But the growth hiccup looks like it will extend through 2019. If the company doesn't report some positive news on orders in the next quarter, then investors are probably going to have to wait until next spring (the company typically takes large orders in its second and third quarters) before finding out if Cognex is back on its long-term track.

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.