It's been a difficult year for United Parcel Service (NYSE:UPS) investors, as the stock has notably underperformed the S&P 500 and its main rival, FedEx (NYSE:FDX). After a winter beset with difficulties for the logistics companies because of a combination of poor weather, unexpectedly strong e-commerce delivery demand, and a Christmas shopping season with fewer than average days, many investors thought UPS might be over the worst by now. Unfortunately, that wasn't the case, and the second-quarter results proved to be a disappointment. Here's what management wants you to know about its performance.

United Parcel Service delivers.

Investing in long-term growth

After the winter debacle, during which many customers saw delayed delivery and UPS suffered a ramp-up in costs associated with unexpectedly high peak demand, UPS management committed itself to investing in ways to deal with any future problems. Unfortunately, the costs associated with these investments, in areas such as technological and operational expansion, are going to be more than initially expected. According to CFO Kurt Kuehn:

During the ramp-up and implementation, these projects are expected to increase 2014 operating expense by a total of $175 million. This represents another $75 million on top of our original estimates.

As a consequence, full-year EPS guidance was reduced to a range of $4.90-$5, from a range of $5.05-$5.30. While this is obviously disappointing from a short-term perspective, Kuehn said the investments will generate financial benefits for "years to come." There are also some structural changes occurring in end demand -- more on that later -- that the investments will also address. In other words, investors shouldn't be too negative on the additional investment.

Global trade set to pick up?

Before the 2008 financial crisis, FedEx and UPS were known as businesses whose end demand correlated very strongly with global growth. However, since then, a significant shift has occurred. In actuality, the key driver of their end-market demand is global trade growth. While this has traditionally moved in step with global growth, the past few years have seen a notable decoupling, whereby global trade has grown at a much slower pace. Fools already know about the reasons for this and, more important, why conditions look set to improve in 2014.

Moreover, CEO Scott Davis discussed the development of the next phase in the National Export Initiative, which "will develop opportunities for U.S. small and medium-sized customers to reach new markets." He continued: "This platform includes sections on trade facilitation, border clearance reform, free trade agreements, and infrastructure investment." If initiatives likes this are replicated around the globe, then end demand could pick up in excess of global growth.

Source: IATA.

Structural changes in end demand

Third, management outlined that there are some structural changes occurring in its end demand, which is creating issues that UPS needs to deal with. Essentially, volume growth was stronger than expected, but the larger part of the increase is coming from lower-yield deliveries such as business-to-consumer deliveries, or B2C -- not good for its overall yield.

A good example of these trends is evident in its international performance, as Kuehn outlined:

Strong non-premium growth of 13% continued to outpace premium products, although they were also up by 4%. Yield was also lowered by shorter trade lanes as our intra-Europe volume was one of the fastest growing lanes. Operating profit improved by 4.4% to $471 million. However, operating margin did contract 20 basis points to 14.5%.

Clearly, the structural shift in its business toward B2C (e-commerce-driven) and slower, cheaper delivery (versus faster, more expensive) is putting pressure on margins.

Strong demand growth pressures costs

The fourth takeaway is that when UPS is subject to unusual demand trends (as it was in the winter, and to a lesser extent the second quarter), it will need to incur additional costs to ensure that it meets customer expectations. This is inevitably going to come at the expense of earnings. For example, in the U.S., UPS suffered from poor rail performance, and according to Kuehn: "In order to maintain service commitments, alternative operating plans were put into place. This drove higher purchase transportation expense as well as excess UPS network costs."

Moreover, in Europe: "These trends pushed network capacity above ideal levels in a few areas, and as a result, we were forced to pay a premium for short-term capacity. This contributed to higher delivery and network expenses, ultimately driving in-country costs up by 8.9%."

Yet cash flow remains good

The final takeaway is rather more positive; Underlying free cash flow continues to improve at UPS. Kuehn said FCF was around $1 billion in the first six months, but "excluding non-recurring items, cash flow improved by over $400 million over last year." Last year's free cash flow figure for the first half was around $2.5 billion, so $400 million on top of that equates to around $2.9 billion. With two highly cash-generative quarters set to come (including the holiday season), UPS is set for a good year of cash generation. Indeed, the company has already paid $1.2 billion in dividends, with share buybacks resulting in $1.4 billion.

The bottom line

Putting these points together, UPS has clearly had cost pressures from ongoing structural shifts in end demand. The investments it has had to make, partly to deal with these issues, is larger than it previously expected. However, the good news is that cash generation remains strong and there are signs from global trade trends that end-market conditions are improving. UPS faces challenges, but its management is meeting them, within a strengthening economic environment.