What happened

Shares of United Parcel Service (UPS 0.02%) fell by 18.1% in 2018, according to data provided by S&P Global Market Intelligence. A combination of geopolitical concerns, new competition, and the company's ongoing capex spending upswing are outweighing excitement about the continued growth of e-commerce to keep the shares stuck in the doldrums.

Check out the latest United Parcel Service earnings call transcript.

UPS Chart

UPS data by YCharts.

So what

It was an uneven year for UPS, with shares up more than 10% early before crashing back down to earth after the company reported first-quarter earnings that showed pressure on margins. UPS is in the middle of a period of heavy spending as it tries to modernize its infrastructure to better compete for e-commerce business.

Long criticized for underspending on its network, UPS is spending $7 billion in 2018 on capex after laying out just $3 billion in 2016. That investment should pay off down the road but could eat into near-term results. The spending is necessary, but it comes at the same time Amazon.com is ramping up its internal logistics operations, which, over time, could sap billions in revenue from UPS and archrival FedEx.

A cargo jet with the UPS logo.

Shares of UPS were unable to get off the ground in 2018. Image source: United Parcel Service.

UPS is trying both to expand its e-commerce operation and to grow other businesses to make sure it is not overreliant on the consumer. In recent years, the company has invested in fast-growing niches including healthcare, life sciences, and business-to-business service that tend to value precision over cost and are therefore less price sensitive.

The final few months of the year were particularly harsh to UPS investors. Shares were down 15.4% in December alone due to growing worries about a U.S./China trade war and in reaction to FedEx cutting its 2019 guidance.

Now what

UPS's investments in its infrastructure are the right moves, but they may take a while to pay off. Similarly, it is possible that the trade war will simply reroute shipping patterns away from China and toward other emerging markets instead of deflating traffic, but again, it will take time for investors to know for sure. In the meantime, UPS is not cheap, trading at 15.7 times trailing earnings compared to FedEx's 9.2-times multiple.

UPS is a solid company, but for the time being, I see no reason to rush in and buy the stock.