What happened

Shares in construction, mining, transportation, and energy equipment company Caterpillar (CAT 1.32%) soared 18.8% in March, according to data provided by S&P Global Market Intelligence. You don't have to look hard to see why the company had such a strong month. In a nutshell, the war in Ukraine has sent mining and energy prices soaring and given fresh support to the thesis that we are only in the early innings of a commodity super-cycle. If the hypothesis is correct, Caterpillar is set for long-term growth

Caterpillar is a classic example of a cyclical stock. Its revenue, profit margin, and profit follow the cyclical flow of its end markets. Therefore, investors need to understand where the company is in the cycle to understand how to value the company. For example, Caterpillar in the early innings of the cycle and trading with a current price-to-earnings ratio of, say, 20 times earnings is a lot more attractive than Caterpillar trading in the last legs of the cycle but trading on, say, 18 times current earnings.

In March, investors took a look at the soaring energy prices and the difficulties of Russia and Ukraine to export energy and mining commodities. They concluded that capital spending (by miners and energy companies) would increase as a consequence -- good news for Caterpillar.

So what

In a sense, it's a double-edged sword because Caterpillar also has to contend with soaring costs due to the war; for example, steel prices increased in response to the conflict.

Indeed, it's worth noting that Caterpillar's profit margin fell on a year-over-year basis in the fourth quarter due to the quarter's greater-than-expected raw material and supply chain costs. This is something to keep an eye out for when management updates with guidance in the future.

A mining truck.

Image source: Getty Images.

Now what

On balance, despite the margin pressure from rising costs, an increase in commodity prices and the need to ensure investment in energy and mining is likely to be a net positive for Caterpillar. Moreover, the company is an obvious beneficiary of increased infrastructure spending, so it's understandable if investors should be feeling more optimistic about the stock.

Unfortunately, there's no way of knowing when the war will end, and this is not the place to speculate on it. Also, it's hard to see when the pressure on commodity prices will abate, but there'll likely be upward pressure on capital spending, at least to ensure the security of supply. That's good news for Caterpillar.