What happened

Shares of freight and logistics giant XPO Logistics (NYSE:XPO) were performing well for the better part of 2017, but December was a stunner, with the stock jumping 15.9% to extend its full-year returns to a staggering 112%. Comparatively, FedEx (NYSE:FDX) gained 7.8%, while United Parcel Service (NYSE:UPS) saw its stock lose 1.9% during the month.

December was, indeed, an eventful month for XPO. While stellar holiday-season demand fueled investor optimism, there was also the rumor of a potential takeover, followed by a huge rating upgrade by Citigroup later in the month, which sent the stock soaring.

So what

On Dec. 21, XPO announced that its e-commerce volumes jumped 24% during the Black Friday to Cyber Monday sales season. The company had even hired 6,000 temporary workers to meet the rush. The news bolstered investor hopes that XPO is on its way to another strong quarter, having recently delivered a solid third-quarter report that was better than those of peers FedEx and UPS.

Freight trailers on a highway.

Image source: Getty Images.

Coincidentally, the very next day, Recode published an article reporting that Home Depot was interested in acquiring XPO Logistics, apparently to strengthen its e-commerce operations and ward off Amazon.com from eyeing XPO. Not surprisingly, XPO shares shot through the roof.

Adding fuel to the fire, Citigroup bumped up its price target for XPO stock on Dec. 26 by a whopping 50% to $110 in anticipation of a takeover.

Now what

XPO's sale is nothing but a rumor for now, and prudent investors know better than to bet on speculations. The good news is that whether XPO is acquired or not, it remains one of my top freight and logistics stocks for the long haul, thanks to its lead over FedEx and UPS in the high-potential last-mile delivery space. XPO shares should, of course, cool down if the takeover rumors turn out to be false, but smart investors should consider any drop in the stock an opportunity.

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. Neha Chamaria has no position in any of the stocks mentioned. The Motley Fool owns shares of and recommends Amazon. The Motley Fool has the following options: short May 2018 $175 calls on Home Depot and long January 2020 $110 calls on Home Depot. The Motley Fool recommends FedEx, Home Depot, and XPO Logistics. The Motley Fool has a disclosure policy.