Big changes are afoot in the transportation sector.

Autonomous-vehicle technologies and the growth of ridesharing threaten to upend General Motors' (NYSE:GM) traditional leadership in automobiles. Meanwhile, similar forces are impacting the logistics industry, testing XPO Logistics' (NYSE:XPO) strengths, as and Uber see big opportunity in freight and logistics.

As a result, both GM and XPO are trading at a discount. XPO stock has fallen by more than 50% from its 52-week high on concerns about slowing growth, the loss of business from its biggest customer (widely believed to be Amazon), and even an attack from a short-seller.

GM, on the other hand, trades at a P/E ratio of just 5.9 as investors seem skeptical about the future of conventional automobiles as ride-hailing and self-driving cars emerge. In addition, concerns about trade tensions with China and Mexico have pressured the stock.

Given those developments, value investors may be interested in both GM and XPO. Let's take a closer look at each stock to see which one is the better buy today.

A time-lapse image of traffic moving through an highway interchange at night

Image source: Getty Images.

A carmaker in transition

Of all the legacy carmakers, GM may be the best prepared for the coming shifts to electric vehicles (EVs) and autonomous vehicles (AVs) as CEO Mary Barra has outlined a company goal of zero crashes, zero emissions, and zero congestion.

To achieve that, GM is investing in a number of initiatives in EVs and AVs. Led by the Bolt EV, GM claimed nearly a quarter of electric and plug-in hybrid sales in the U.S. last year, and the company has a strong position in China, a fast-growing EV market and the world's biggest auto market, where it sold 3.6 million vehicles last year. 

In autonomous vehicles, the company's prospects look even brighter. Its Cruise AV division is now valued at $19 billion, or more than a third of GM's total market cap, and the company is planning to launch an AV ridesharing service in San Francisco later this year, an event that could lead to a surge in the stock.

Despite those initiatives, a highly profitable North American business, and a dividend yielding about 4%, investors have largely snubbed the stock in favor of more disruptive challengers like Tesla and Uber. With GM shares trading at just 6 times earnings, the stock could easily rise if GM shows progress in its key initiatives.

A reset for an aggressive logistics company

For years, XPO expanded into disparate corners of the logistics industry through acquisitions, including its $3.5 billion deal to take an 86.25% stake in Norbert Dentressangle, a French third-party logistics provider, in 2015, and its $3 billion acqusition of Con-way, a North American freight and logistics company, that same year.

Wall Street therefore anticipated another big acquisition in the future. Yet after the stock tumbled following a series of disappointing earnings reports, an attack from a short-seller, and news that Amazon was pulling much of its business with XPO, CEO Brad Jacobs decided to pivot on its capital strategy. The company is now focused on spending cash that would have gone to acquisitions on share buybacks, and even dismissed its acquisitions-focused COO.

Between Dec. 14, 2018, and April 30, 2019, the company bought back $1.9 billion worth of stock, amounting to more than a third of its market cap, a move that could significantly pump its earnings per share if the company's financial performance bounces back.

The company's guidance calls for full-year revenue growth of 3% to 5%. Organic revenue growth, though, which excludes the impact of the loss of Amazon's business, is expected to be higher -- 5.5% to 7.5%. XPO also projects a 6%-to-10% increase in adjusted earnings before interest, taxes, depreciation, and amortization to between $1.65 billion and $1.725 billion.

Meanwhile, XPO is making investments in growth initiatives like XPO Connect, an app-based freight marketplace that connects customers with shippers, and customized warehouse automation technologies for customers across a range of industries.

The combination of those initiatives and its share buybacks could pay off handsomely in a year or two if XPO can overcome its recent challenges.

Which is the better buy?

GM and XPO both offer investors upside potential, but on a valuation basis, General Motors is significantly cheaper, with a P/E of 6 compared to XPO's at 18.5. GM is also the only dividend payer of the two.

While I own both of these stocks and like both of them, GM seems like the more reliable choice because of its low valuation and dividend, and its initiatives in EVs and AVs could give it a growth potential similar to XPO's.

XPO still looks like a promising bet on e-commerce and logistics, but after its recent setbacks, the company has more to prove than GM does.

Editor's note: This article has been corrected to say that XPO Logistics owns 86.25% of Norbert Dentressangle.