There's no denying that familiar stocks like Facebook and Apple have helped set the bullish tone on Wall Street for the past year. However, the technology sector wasn't actually the market's best performer over that time frame. Neither was healthcare, despite the players in that sector that benefited from their contributions to the fight against COVID-19. Nor was it the consumer staples space, though names like Kroger or Clorox saw their stocks soar in the midst of the pandemic.

Rather, it's the transportation sector that has booked the biggest overall gains since the market hit its low point in mid-March 2020. The Dow Jones Transportation Average is up 133% from that point.

With a great deal of commerce that was previously conducted in stores is now taking place online, Shippers like UPS (NYSE:UPS) and FedEx (NYSE:FDX) have about all the business they can handle.

Man's hand drawing a rising red arrow above two blue arrows.

Image source: Getty Images.

Except direct-delivery names have not been the only big winners among transportation stocks. Railroads and trucking outfits have done well too.

Better still, while gains of that magnitude may not be repeatable in the next 12 months, the entire transportation sector's future still looks bright.

Driving gains

The graph below speaks for itself: Transportation stocks have been outclimbing the Dow Jones Industrial Average since last March's bottom, led by trucking and railroad companies. UPS and FedEx are generally classified as logistics and air freight names, although their fates are closely tethered to the overall sector's. The only laggards within this area are airline and maritime shipping stocks (not shown), which have been crimped by a steep slump in travel and weak oil prices.

^DJT Chart

^DJT data by YCharts

These aren't errant gains either. While U.S. rail traffic plunged for a short time in February as a result of the massive winter storm that struck the South and Midwest, traffic is back to above 2019's levels, and well above 2020's suppressed levels on the heels of a rebound that materialized in the latter half of last year. The Association of American Railroads reports that as of the week ending May 1, year-to-date rail traffic is up 10.5%.

Similarly, transportation market data provider DAT Freight & Analytics reports April's rates for conventional trucking services are nearly 60% higher than where they were a year earlier, and are nearing record highs. Despite these lucrative rates, demand for trucking services (and truck drivers themselves) still remains tight relative to supply.

Where to from here?

The $64,000 question is: Will this demand last?

Answer: Probably. At least, several industry insiders think so.

C.H. Robinson (NASDAQ:CHRW) CEO Bob Biesterfeld is one of these bullish insiders. During his company's Q1 earnings call last week, he said, "It's our belief that -- given the current structural constraints around expansion of truckload supply, coupled with additional government stimulus, a back-half reopening of the economy and potential infrastructure spending -- the market conditions that were existing today have the potential to remain out of balance for the next several quarters."

Union Pacific (NYSE:UNP) CFO Jennifer Hamann is just as optimistic that her company's rail lines will be similarly busy. "Since early March, we have seen an improving demand trajectory, with March averaging roughly 157,000 7-day carloadings, and we crossed the 160,000-plus threshold in April," she said during April's quarterly earnings call. "So with the strength we're seeing in our volumes, we now expect full-year carload growth to be around 6%."

That's huge considering carloads (as opposed to intermodal containers) include commodities like coal and other minerals, which are facing demand headwinds of their own.

The industry's longer-term outlook is just as compelling. Market research outfit Technavio predicts the United States' domestic freight market's growth rate will accelerate to an average of nearly 5% through 2025, putting another $170 billion per year up for grabs at the end of that period.

Ways to play

UPS and FedEx are go-to names for investors looking to plug into a strong logistics market, and understandably so. Their trucks are seemingly everywhere. This is a case, however, where investors would be wise to spend time looking beyond the obvious names for a hidden gem or two.

One such gem is the aforementioned Union Pacific. While it hauls goods all over the western half of the United States, it's especially well-exposed to the Pacific maritime ports in Oakland, San Francisco, and Los Angeles, where shipping traffic congestion is at record levels. Union Pacific will open another terminal in the region before the end of the current quarter, which should bleed off some of this congestion. Logistics market information provider Freightwaves  believes demand for West Coast maritime portage will remain robust through July, however, right when seasonal demand for shipping picks up. Indeed, Union Pacific's West Coast freight rates could remain robust for several more quarters.

If trucking is more your style, consider Knight-Swift Transportation (NYSE:KNX) over C.H. Robinson. While the latter is bigger, Knight-Swift's smaller size offers an advantage. Namely, it's more in tune with where it can cut costs -- which it has done -- and is making smart investments like last month's increase in driver pay rates. This year's expected 11% sales growth should be paired with even greater earnings growth, and while next year's revenue growth is projected to be subpar, that outlook may be overlooking some of the country's consumer-led economic rebound.

However investors choose to step into this leading sector, they should keep their expectations in check. The growth opportunity is real, but the next 12 months aren't likely to be as profitable for shareholders as the past 12 have been.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.