Caterpillar (CAT) - Get Reportbeat earnings expectations Thursday morning, reporting adjusted earnings per share of 74 cents, which was 5 cents better than the average estimate of 69 cents. The stock spiked higher Thursday and was up $2.11, or 3.6%, at $60.45 around midday. This could be the start of a longer rally for the stock. 

Image placeholder title

CAT data by YCharts

The stock's current 5.1% dividend yield is more than double its five-year average dividend yield of 2.4%, and the stock trades with a price-to-earnings ratio of 17.4, based on earnings estimates for the next year.

Investors' pessimism suggests that Caterpillar might not ever recover. Weak commodity prices and anemic economic growth have sharply reduced demand for Caterpillar's heavy machinery. Fourth-quarter sales fell by 23% compared to the fourth quarter of 2014, capping a full year that saw revenue drop by 15%. Its revenue is now close to 30% below its 2012 peak.

However, we are still talking about the world's largest construction and mining equipment manufacturer. This is a business that has generated enough cash and been strong enough through the years to raise its dividend for more than 20 straight years and has it approaching joining the list of dividend aristocrats

When these types of companies are beaten up, we make sure to take a hard look. In Caterpillar's case, we like it enough to own it in our Top 20 Dividend Stocks Portfolio. But why do we still have hope for the company when other investors are still so bearish?

As a cyclical business, Caterpillar's stock will swing up and down with macroeconomic trends, but that does not mean its long-term earnings power is impaired or its competitive advantages have eroded away. In fact, we believe just the opposite is true as Caterpillar noted in its press release that 2015 was the fifth year in a row that it has gained market share for machines.

Regardless of demand trends, Caterpillar still has the greatest breadth of products and maintains the largest dealer network in the world. Customers buy from Caterpillar because of its reputation for quality and its unique ability to service their machinery in a timely and cost-effective manner.

When making a multimillion-dollar investment in heavy machinery, customers need their equipment up and running at all times to maximize their return. Caterpillar's dealer network makes that possible. 

Caterpillar is also more diversified than many investors might realize. Many people associate Caterpillar with mining, but its Resource Industries segment accounted for less than 18% of its fourth-quarter sales and is no longer generating an operating profit. It's hard to imagine this part of the business becoming a bigger detractor than it already has been over the last five years.

From a financial perspective, Caterpillar is still generating free cash flow, holds $6.5 billion in cash on hand, and maintains a reasonable debt-to-capital ratio of 39%.

Additionally, the company's captive finance company, which serves thousands of customers around the world, continues reporting past dues and credit losses that are near historic averages despite the gloomy macroeconomic environment.

Looking ahead to 2016, Caterpillar doesn't anticipate improvement in global growth or commodity prices. Sales are expected to decline by about 10% compared to 2015, and adjusted EPS is expected to be $4.00. If 2016 marks the bottom for earnings, Caterpillar's stock trades for just 15 times trough earnings.

While struggling commodity markets and continued economic softness around the world could postpone a recovery in demand for the next year, investors with a long-term horizon should take a closer look at Caterpillar.

This article is commentary by an independent contributor. At the time of publication, the author held shares of CAT.