Shares in positioning and workflow technology company Trimble (TRMB 1.59%) and machine vision company Cognex (CGNX 2.06%) currently trade down 47% and 62%, respectively, from their all-time highs and both stocks declined over the last year. That created a potential good news-bad news scenario.

Those price drops make both of these solid stocks highly attractive for long-term investors (the good news). But no one with a low tolerance level for near-term risk should consider buying them right now (the bad). Let me explain.

Trimble's near-term issues and long-term opportunity

In the case of Trimble, CEO Rob Painter disappointed the market with Trimble's third-quarter earnings presentation in early November by lowering the company's full-year revenue outlook and the midpoint of its earnings range. He told investors of "increasing signs of weakness and stress across many end markets and geographies, exacerbated by interest rates, war and geopolitical tensions."

Digging into the specific end markets, Painter called out "the downturn in residential construction impacting our hardware businesses in both buildings and infrastructure and geospatial [segments of the business]." Meanwhile, "In agriculture, within resources and utilities, we see emerging signs of weakness also notably in Europe." While talking about its fourth end market, transportation, Painter said, "We are in a down freight market, and we've seen some trucking and technology companies either go out of business or cut back their ambitions significantly."

The commentary on transportation is significant because Trimble paid full price for a European-focused cloud-based transportation management software platform, Transporeon, in 2023, only to then lower expectations for the business through the year. This news likely contributed to activist investors in December calling for Trimble to focus on organic growth rather than acquisitions.

Given that there's scant evidence of any near-term improvement in any of these end markets (for example, FedEx warned of ongoing weakness in transportation in late December, and Deere told investors to expect a decline in agricultural equipment sales in 2024), it's difficult to expect a lot of positive commentary from Trimble when it reports its fourth-quarter earnings.

A person in a coffee shop looks into the distance.

Image source: Getty Images.

Notwithstanding some potential negative near-term news, Trimble stock now looks to be a great value. The company is on track to improve its annualized recurring revenue (ARR) by 13% to about $2 billion by the end of 2023. Trimble's ARR is the key to generating free cash flow (FCF), and its development is a crucial marker of the company's transition to becoming an integrated part of its customer's workflow. It will do this by using software and analytics rather than purely offering positioning solutions via its hardware. This transition is working even if there's near-term weakness in hardware sales caused by slow end markets.

Wall Street expects Trimble to generate almost $600 million in FCF in 2023, putting the stock price at 21 times its FCF. That ratio is too cheap for a company generating mid-teens growth in ARR and, ultimately, FCF.

As such, Trimble is a stock long-term investors should be looking to pick up on any post-earnings weakness.

Cognex: Don't expect too much news on recovery until the spring, at least

Machine vision company Cognex's sales are projected to decline by a whopping 17.5% in 2023. Then again, what can you expect when its primary end markets are consumer electronics, automotive, and logistics (primarily e-commerce warehousing)?

The first two end markets are interest rate sensitive, and smartphone makers and automakers scaled back production plans in 2023 on the back of persistently (relatively) high interest rates. In addition, slowing consumer spending on products and a natural retraction from torrid growth in previous years in e-commerce warehouse spending caused a significant decline in its logistics end market.

Moreover, investors shouldn't expect too much too soon regarding recovery for Cognex. The company tends to book orders in its second and third quarters as its customers prepare for a fourth-quarter ramp-up in production. That's why CEO Rob Willett told investors on the last earnings call in late October, "We normally don't have a really good sense of how next year is going to shape out until we get into the spring of next year, and that's normally when we give you an overall look." As such, it's hard to see anything overly optimistic when it reports its fourth-quarter earnings.

There's nothing wrong with Cognex's end markets that lower interest rates won't help out, and the trend toward automation and machine vision in manufacturing and logistics isn't going away anytime soon. As you can see below, Cognex's revenue has always been volatile, and all it will take is a few large, high-profile orders from consumer electronics companies developing new products or automotive or electric vehicle battery manufacturers to see analysts scrambling to raise growth forecasts.

CGNX Revenue (TTM) Chart

CGNX Revenue (TTM) data by YCharts

Near-term headwinds, long-term tailwinds for both stocks

Both stocks face similar dynamics this year. In other words, there's more chance of negative newsflow than positive newsflow over the near term. That's an opinion formed by looking at the trading momentum of both companies and how their end markets are entering in 2024. Still, they both have excellent long-term growth prospects, and investors should look to buy both if there is any significant dip from here.