After missing earnings forecasts and cutting its full-year view, analysts say Caterpillar's disappointing quarter may offer a buying opportunity.
"This was an ugly quarter, no matter what you do," Eli Lustgarten of Longbow Research told CNBC.
But instead of losing money, he said, Caterpillar is managing the downturn and controlling inventories.
"We are approaching the bottom for the stock particularly as mining heads to stabilization," Lustgarten added. "And if mining is headed toward stabilization, then 2014 is going to be an up year for earnings and for the stock. And with nearly a 3 percent yield, you have to be careful shorting it."
But Jim Chanos, founder and managing partner of Kynikos Associates, warned at CNBC's Delivering Alpha conference earlier this month that a slowdown in mining is going to be more severe than analysts are expecting.
"The bulls expect a capex decline in mining. But here's the problem: They expect it to decline slowly," Chanos, who is short Caterpillar stock.
(Read more: Jim Chanos slams Caterpillar)
While declines in the mining business and reduced dealer inventories bit into earnings in the second quarter, JPMorgan analyst Ann Duignan also sees an opportunity to buy the shares as the global economy stabilizes.
Another thing investors should start considering "is that the fundamentals in Europe are starting to look at bit better," she told CNBC. "So we think that we have seen a bottom in the global macro data, and going forward we think that as this gets better, sentiment on Caterpillar's stock is better, and so we are a buyer today."
Lustgarten isn't predicting a rebound in mining anytime soon, he said that "the power systems and the construction side are where the leverages is, and the key is that earnings don't continue to go down next year."
A leveling off of dealer inventory adjustments should also help.
"While the sales headwinds from these dealer inventory adjustments look to continue at a similar magnitude over the remainder of the year, CAT's production (and resulting profitability) should improve sequentially as the firm aims to maintain the current level of its own inventory rather than further reduce this line item," Morningstar analyst Adam Fleck wrote in a note.
Longbow has a $104 price target on the stock and estimates earnings per share of $7.50, which Lustgarten said "is not a big multiple." That price target implies about 24 percent upside from current levels.
"If they can deliver, the stock has some upside," he added.
Caterpillar is an investment banking client of JPMorgan and JPMorgan provided non-investment banking services to the company within the past 12 months.