Caterpillar (CAT 1.59%) delivered another strong quarter and raised its margin and free-cash-flow targets for the new year. Investors were happy to see Cat purring along during what has been a shaky environment for some industrial companies, and sent the company's shares up by about 5% at the open on Monday.

Profits soar as Cat holds steady in a tough environment

Caterpillar makes giant machines used in construction and mining. It is a well-run business, but it is reliant on end markets that tend to be cyclical. With Wall Street mulling the impact of inflation and higher interest rates, and some manufacturers reporting tepid demand this earnings season, investors were nervous ahead of Cat's quarterly report.

The report gave no reason for alarm. Caterpillar earned $5.23 per share in the fourth quarter, easily topping the $4.75 per share analyst consensus, though revenue, at $17.07 billion, was slightly below expectations. Revenue was up 3% for the quarter and 13% for the year, thanks to higher sales volume and strong pricing power.

Operating margin came in at 18.4% in the fourth quarter, up from 10.1% in the year-ago period.

Caterpillar reported operating cash flow of $12.9 billion for the year, and returned about $7.5 billion to shareholders during 2023 via share repurchases and dividend payouts.

Is Caterpillar a buy after strong fourth-quarter results?

Caterpillar ended the year with a backlog of $27.5 billion, and said it continues to see healthy demand across most end markets. That's good news for those worried about the health of the economy, and what impact it might have on the company's business.

Management forecast little revenue growth in 2024, but did raise its guidance for profitability by 100 basis points and boosted its free-cash-flow target range. Caterpillar now expects to generate between $5 billion and $10 billion from its machinery, energy, and transportation unit, up from its previous guidance range of $4 billion to $8 billion.

At some point, the cycle will turn against Caterpillar, but the company is well positioned to deal with it when that happens. Investors buying in now are getting a stock that has risen by 30% over the past year, but for those focused on the long-term Caterpillar is a good buy-and-hold option that offers exposure to megatrends like infrastructure spending and demand for rare earth elements.