The recent rise in FedEx's (FDX -0.68%) stock price has caught the eye of investors, and at the time of writing, the stock is up 6% on the year. Meanwhile, it's key rival, UPS (UPS -0.32%), is pretty much unchanged in 2020. FedEx's stock has produced a commendable performance given the significant impact of the COVID-19 pandemic on the economy. That said, is FedEx stock a buy right now?

Two questions for FedEx investors

Two key questions surround the investment case for transportation stocks right now. The first is whether burgeoning e-commerce growth, and in particular business-to-consumer (B2C) transactions, will lead to ongoing margin pressure in both companies' key segments.

Tiny e-commerce packages on a keyboard.

FedEx and UPS are seeing strong growth in e-commerce deliveries. Image source: Getty Images.

The second is whether both companies will start to generate significant free cash flow (FCF) again, or are they stuck in a never-ending cycle of capital investment in order to support e-commerce growth?

Why it matters

The importance of these questions can be illustrated by the charts below. FedEx's ground segment is where its e-commerce revenue tends to lie, and it's been responsible for roughly half of the company's segment profit in the last five years. It's a similar situation with UPS's U.S. domestic package segment, which tends to produce slightly more than half of its segment profit.

As you can see below, both segments have felt margin pressure in recent years. In a nutshell, B2C deliveries tend to be relatively lower margin, as they can be inefficiently packaged and involve costly deliveries to numerous residential addresses. In addition, as both companies expand their networks, they are likely to see some cost pressures from the expanded capacity.

The market got excited by FedEx's recent results, which showed a sequential improvement in ground margin. UPS may well report the same when it gives its results, so there is some positive news on the issue, but it's far too early to claim the tide has been turned on margin.

Operating Margin at FedEx ground and UPS U.S. domestic package segments

Data source: FedEx and UPS presentations. *UPS figures have been adjusted to fit FedEx's fiscal year and are actually for 2015 to 2019.

Free cash flow

The problem of declining operating margin is that it pressures operating income generation and, in turn, free cash flow (FCF). This problem is exacerbated by the elevated levels of capital spending necessary to support e-commerce growth. These dynamics can be seen in the charts below.

Rising capital expenditure requirements have eaten into FCF generation at both companies in recent years.

UPS Free Cash Flow Chart

Data by YCharts.

The bullish case for both FedEx and UPS relies on the argument that operating income margin will stabilize so that the revenue increases from e-commerce growth will drop into operating income and then into operating cash flow. Meanwhile, the current levels of capital spending as a share of revenue will plateau or even fall (see chart below), leading to substantive FCF in the future.

UPS CAPEX To Revenue (TTM) Chart

Data by YCharts.

Three reasons for caution

The case for buying FedEx is interesting, but investors should approach the decision with caution for three key reasons.

First, it's true that the company appears to be making progress on margin, and there's nothing wrong with doing some capital spending in order to support growth. But there's a long way to go yet, and it's possible that both FedEx and UPS will see more pressure on margin as continues to expand its own delivery services.

Second, as the last chart shows, FedEx has traditionally spent a high-single-digit percentage of its revenue on capital spending, and it might be optimistic to assume that that ratio is going to fall in the future.

Third, on a historical basis, UPS has tended to have higher operating margin, generate more FCF, and maintain lower capital spending as a share of revenue. Indeed, before the COVID-19 pandemic hit the economy, UPS was forecasting $4.3 billion to $4.7 billion in FCF for 2020. Analysts now have around $2.8 billion penciled in for 2020. Nevertheless, it looks likely that UPS's FCF will recover before FedEx's does.

Is FedEx a buy?

All told, FedEx is probably a stock for the watch list right now. Alongside UPS, FedEx stock has risen strongly in recent months, and both stocks look close to fair value right now. For example, FedEx is now trading at 45 times expected FCF for its fiscal 2021, and UPS is trading at 35 times estimated FCF. In other words, they appear to be priced with some positive assumptions in mind.

Of course, that outlook could change if there's more evidence of a turnaround in underlying B2C e-commerce delivery margin and/or a pickup in business deliveries. Until then, the current stock price looks like a fair value on a risk/reward basis.