What happened

Shares of Deere & Co. (NYSE:DE) climbed 18.2% in June, according to data provided by S&P Global Market Intelligence. That reversed a dramatic decline in May, as Wall Street analysts came to the stock's defense, and fears about weakness in agriculture markets eased.

So what

Deere, as one of the largest manufacturers of agriculture equipment, reported disappointing results for the quarter ending April 28 due to a range of factors outside of its control.

In the U.S., bad weather -- notably flooding in the Midwest -- had farmers scrambling to avoid a liquidity crisis and deferring large-equipment purchases. Overseas, the trade war with China, coupled with issues including an outbreak of African swine fever, is leading to projections for reduced soybean demand. All these issues combined to send investors to the exits in May.

Farm equipment in the field.

Image source: Getty Images.

In June, a number of analysts declared that the sell-off was overdone. Baird analyst Mig Dobre upgraded Deere to outperform from neutral in the middle of June, raising his price target to $175 from $129, saying that favorable weather and the outlook for the growing season outweighed the threat of a trade war.

Later in the month, Jefferies analyst Stephen Volkmann upgraded Deere to buy from hold, believing that a tightening global crop supply following five years of depressed pricing should fuel large-equipment purchases in the quarters to come. Volkmann raised his price target on the shares to $190 from $150.

Now what

It's been a volatile two months for Deere, with the shares basically going nowhere from May 1 to June 30 after plunging and then rallying.

DE Chart

DE data by YCharts.

The early days of July have brought news of a potential truce in the trade war, which if it holds would be good news for Deere because China is a key source of demand for U.S. crops. But as investors discovered in May, macro headlines can turn against the company quickly, and there could be further volatility if the weather, or trade tensions, get dicey.

For long-term shareholders, there is a lot to like about Deere. The world needs to continue to invest in large-scale agriculture production to feed a hungry population, and its equipment is an important part of the answer to that challenge. But as the last two months have shown, the near term can be a bumpy ride.