What happened

Caterpillar Inc. (NYSE:CAT) shares crushed it yet again in December, climbing 11.6% and ending the year with -- hold your breath -- gains of 70%. Yet Caterpillar's December rally was backed by valid reasons, one of which should make investors hopeful about the company's prospects for 2018.

So what

Caterpillar's last major announcement was its third-quarter earnings release in October. The company trampled earnings estimates and upgraded its full-year outlook for the third time in the year, fueling its share prices to rise even higher. The following months were relatively quiet from Caterpillar's end, but its retail sales statistics announced in December had a hidden message: Caterpillar's machinery sales are growing at their fastest pace in about six years.

Dump trucks at a mining site

Image source: Getty Images.

Every month, Caterpillar releases retail machinery sales for the previous three-month rolling period. In mid-December, Caterpillar reported a 26% jump in its total retail sales for the three months ended November compared with the year-ago period. That marked the ninth straight period of sales growth. The pace of growth has been incredible too: Caterpillar first reported a turnaround during the quarter ended in March, when its sales improved 1%. The percentage had gone up to 19% for the three months ended October, and 26% for the three months ended November.

As if those numbers weren't encouraging enough, Citigroup gave wings to investors' hopes when it upped its price target for the stock to $160 later in December, backed by expectations of 30% growth in the company's earnings per share in 2018.

Needless to say, the market turned increasingly bullish about the heavy-equipment manufacturer, bidding its shares even higher in December.

Now what

Caterpillar stock may have run ahead of itself, but it's hard to ignore the upward trend in its sales. What's noteworthy is that demand for equipment from some of the company's key end markets, especially mining and energy, has just started gathering steam.

If commodity prices continue to hold steady, Caterpillar's global sales could grow even faster. Meanwhile, Caterpillar will undoubtedly be one of the biggest beneficiaries if President Trump rolls out his infrastructure plans to rebuild America. Combined, these factors should support the stock price.

Neha Chamaria has no position in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.