Cognex (NASDAQ:CGNX) has been among the many technology companies hurt by the ongoing trade war. Over the past several quarters, management has blamed trade tensions and weak demand in China for tepid revenue growth and plummeting profits.

When things weren't as bad as many feared last quarter, Cognex stock rallied, and those gains have continued in recent weeks as the Trump administration touted a pending trade deal with China. That optimism has been a catalyst, driving the stock up nearly 38% so far this year, following a 37% decline last year.

Cognex is scheduled to report the results of its third quarter after the market close on Monday, Oct. 28. Let's recap the second-quarter results, dig into a recent development, and see what to expect.

Robotic arms assembling cars in a factory.

Image source: Getty Images.

A sigh of relief

Expectations going into Cognex's second-quarter earnings report were low, a result of management comments about the challenges ahead for the remainder of 2019. When things weren't as bad as many feared, investors drove the stock up 8% on the day following the report.

Revenue of $199 million declined by 6% year over year, but came in at the high end of management's forecast range, which topped out at $200 million. It also exceeded analysts' consensus estimates of $195 million. Profits were also lower, with diluted earnings per share of $0.28, down 13% compared with the prior-year quarter, and missing expectations of $0.30. 

On the conference call, CFO John Curran said: "In greater China, more so than anywhere else, we see customers deferring their capital spending plans. Continued weakness across the region resulted in lower revenue year-on-year."

A meaningful acquisition?

Just last week, Cognex announced it had acquired SUALAB, a developer of computer-vision software that uses artificial intelligence in industrial applications. While details of the purchase weren't disclosed, South Korean business publication Pulse put the value of the deal at 200 billion won (about $168.6 million). 

In a press release announcing the deal, CEO Robert J. Willett laid out the reasoning behind the acquisition. "Deep learning enables Cognex to solve many challenging inspection applications in factories, which, until now, could only be done by large teams of human visual inspectors," he said. "SUALAB's considerable [intellectual property], engineering expertise, and extensive market coverage will help us to serve a fast-growing market, primarily in Asia."

The announcement also noted that additional information regarding the deal would be provided during the third-quarter conference call.

What to expect

For the upcoming third quarter, Cognex management is guiding for revenue in a range of $175 million to $185 million, which would represent a decline of between 20% and 25% year over year. The company said this is almost entirely due to lower revenue in the consumer electronics segment. It is also anticipating gross margins in the mid-70% range and operating expenses similar to the second quarter, which came in at $96.3 million. 

To put this into the context of Wall Street sentiment, analysts' consensus estimates are squarely within management's guidance, calling for revenue of $177.39 million and earnings per share of $0.21. 

As a Cognex investor, I'm concerned that the stock may have gotten ahead of itself. It currently sports a trailing-12-month P/E of 51 -- more than twice the valuation of 22 for the S&P 500 (SNPINDEX:^GSPC). For a company that is anticipating a year-over-year revenue decline of at least 20%, this is something of a frothy valuation. Cognex has gained nearly 38% so far this year, and if the results don't come in ahead of investor expectations, the stock may be headed for a fall.