Source: Deere website

The agriculture business is a tough one. The steep decline in commodity prices over the past year has suppressed farm incomes, which in turn reduces demand for large farming equipment. This is hitting Deere & Co. (NYSE: DE) particularly hard. Not only is the macroeconomic environment difficult, but Deere is facing the added headwind of the strengthening U.S. dollar, which is cutting into sales in foreign markets.

Still, shares of Deere rose 4% and hit a 52-week high after the company reported better than expected quarterly earnings. Here's why investors are breathing a sigh of relief.

Admirable performance in a tough climate
Last quarter, Deere's revenue fell almost 18% year over year, to $8.17 billion. Earnings per share clocked in at $2.03, down nearly 30% from the same quarter of 2014. The key culprits were falling demand for the tractors and other large farm machinery that are Deere's bread and butter, along with foreign exchange fluctuations. These challenges are expected to persist for several months, as Deere forecast a 19% revenue decline for the full fiscal year. Sales of agricultural equipment in the United States and Canada are expected to fall by 25% this year.

In this context, it's hard to see how investors could view the quarter favorably. One reason, though, is that Deere's results last quarter handily beat expectations. For example, analysts expected just $1.55 per share in earnings on $7.53 billion in revenue, according to Thomson Reuters.

Moreover, the company raised its full-year profit guidance from $1.8 billion to $1.9 billion. One reason for the upgrade is that one of Deere's smaller segments, construction and forestry equipment, are performing better than the company anticipated earlier this year, thanks largely to the recovery in the housing market in North America. Sales in this business rose 2% last quarter, and should grow 2% for the full fiscal year.

Look long-term
More broadly, agriculture appears to have a bright future. This may be hard to imagine given the current declines. But consider that the world's population keep growing, and along with it, the number of consumers entering the middle class continues to rise. For example, Deere noted in its 2014 Annual Report that after recently eclipsing 7 billion, the global population is expected to reach 9 billion by 2050.

This population growth is accompanied by rising standards of living, particularly in the emerging markets, where under-developed nations are advancing. This will cause diets to become more grain-intensive, increasing demand for proteins such as meat. Deere's lineup of equipment and services is perfectly suited to meet this demand. Therefore, from a long-term perspective, Deere's recovery is in sight.

Why further gains might be in store
Deere is suffering through a number of challenges, but the stock could still be ripe for the picking. Investors have not given Deere much love over the past few years, which kept its valuation low. Even including Deere's post-earnings really, the stock is only up 8% in the past two years, while the S&P 500 Index rose 29% in the same period. Meanwhile, Deere has remained solidly profitable, even now.

This has created a Foolish opportunity: As you can see, the stock valuation is near a five-year low and the dividend yield is near a five-year high.

DE P/E Ratio (TTM) data by YCharts

Deere still trades for just 12 times earnings. That is a significant discount to the broader market, which trades closer to 18 times earnings. Deere is a strong dividend stock as well. Its current yield is 2.5%, which is significantly higher than the stock market average. The company has increased its dividend regularly, by 16% annually over the past five years, even while the company struggles to return to growth.

In addition, Deere management utilizes a significant amount of cash flow to buy back stock. The company bought back $2.8 billion of its own shares over the past four quarters, including $1.1 billion in the past two quarters. These buybacks help to support earnings per share when revenue is declining.

Even though Deere's forecast does not call for an immediate recovery in the agriculture industry, the company should still be able to increase its dividend. That's because Deere maintains a very low payout ratio. Deere's current dividend only comprises just 30% of its trailing 12 month earnings per share, so there's still plenty of room for future dividend growth.

The bottom line is that a cheap valuation and a high dividend yield make Deere an attractive pick for both value investors and income investors.