What happened

In April, United Parcel Service (UPS 0.09%) reported quarterly results that came in much better than what analysts had expected. But that was not enough to get investors on board. Shares of UPS lost 16.1% during the month, according to data from S&P Global Market Intelligence, on fears that a slowing macro environment would eat into shipping demand in the second half of the year.

So what

Long before UPS's April 26 earnings report, Wall Street was getting nervous about the shares. Transportation stocks tend to be cyclical, doing best when the economy is strong. A combination of higher energy costs, which mean higher expenses at UPS and could lead to a slowdown in economic activity, coupled with concerns the Federal Reserve would try to muzzle the economy to keep inflation tame, had investors on the defensive when it comes to UPS.

A UPS driver poses in front of his truck.

Image source: United Parcel Service.

UPS was the target of downgrades from Wolfe Research and Banc of America Securities early in the month, with Wolfe analyst Scott Group warning that after nearly two years as one of the best-performing stocks in the transportation sector UPS, momentum appears to be slowing. J.P. Morgan followed with a price target cut on what analyst Brian Ossenbeck described as a trucking market that "rapidly deteriorated" in late March.

The company's earnings showed little sign of operational stress. UPS earned $3.05 per share in the first quarter on revenue of $24.4 billion, surpassing analyst expectations for $2.88 per share in earnings on sales of $23.79 billion. UPS also backed its full-year estimate for $102 billion in revenue, slightly below the consensus estimate.

After the results were released, at least a half dozen Wall Street banks lowered their price targets for UPS shares, with analysts warning of increasing macro risks in the quarters ahead because of inflation fears and high energy prices.

Now what

There's nothing wrong with UPS, but there is also only so much the company can do in the face of macroeconomic headwinds. If soaring commodity prices and the Fed's inflation battle does slow the economy in the quarters to come, that is likely to translate into weaker demand for transportation and shipping regardless of what UPS is able to do from an operations standpoint.

UPS is a longtime winner and appears well positioned to continue to benefit from the shift toward e-commerce and other business trends that should support shipping demand. The next few quarters might be murky, but for investors able to focus on the coming years and not just the next quarter, any weakness from here could be an attractive buying opportunity.