What happened

Rumors are swirling that trucking company Yellow (YELL 2.68%) could end up in bankruptcy, and investors are already trying to pick winners assuming it does. Shares of XPO (XPO -6.22%) gained 25.7% in June, according to data provided by S&P Global Market Intelligence, with most of that move occurring in the final days of the month as the Yellow talk gained steam.

So what

Trucking and transportation company Yellow is in the middle of a multiyear restructuring, and things have not been going well of late. In recent weeks the company sued the International Brotherhood of Teamsters, claiming the union is violating contract terms in such a way that is holding the company back.

The Teamsters deny the allegations, but Wall Street was more focused on the back-and-forth between the two sides. Teamsters union president Sean O'Brien was quoted in the media saying he was told Yellow had only six weeks of liquidity left, meaning the company could end up in bankruptcy.

That's bad news for Yellow, but potentially good news for its competitors. Late in the month, Bank of America analyst Ken Hoexter upgraded XPO shares to buy from neutral and raised his price target to $65 from $57. In a note, Hoexter said that the uncertainty at Yellow will lead to a market share redistribution among truckers, and that largely non-union shops like XPO are likely to lead the way.

It is dangerous to trade on rumors, but it is worth noting that these sorts of reports could have an impact on share even if Yellow is at no risk of a filing. Large customers tend to move business away from shippers who are viewed as higher risk, meaning XPO and others could gain even without a filing.

Now what

Even without the Yellow drama, there is a lot to like about XPO right now. The one-time transportation and logistics conglomerate used a pair of spinoffs to simplify its operations and focus on trucking. Earlier this year the company hired a longtime exec from industry leader Old Dominion Freight Line as chief operating officer with a mandate to wring out costs and improve efficiency.

Trucking has long been a cyclical business, but when done right it can generate substantial returns for investors. XPO appears to have the wind at its back and could soon have the opportunity to benefit from one of its competitors' woes, and investors are rallying to the shares as a result.