By Gerrard Cowan

Transportation is a barometer of economic health, so stocks in the sector took a beating during the initial pandemic lockdowns. But as the economy begins to reopen, could investors grab opportunities in these stocks?

The transport sector mainly comprises companies in the railroad, trucking, airfreight, marine and logistics businesses. There are two major exchange-traded funds focused on the sector, both of which have suffered from the collapse in economic activity domestically and globally. The $667 million iShares Transportation Average ETF (IYT) is down 5.7% for the year to date, while the $208 million SPDR S&P Transportation ETF (XTN) is down 10%.

There have been some bright spots among transportation companies, says Neena Mishra, director of ETF research at Zacks Investment Research. For example, package-delivery companies such as FedEx and United Parcel Service have held up relatively well over the course of the year, benefiting from strong e-commerce demand. And the IYT and XTN ETFs have climbed along with the broader U.S. market since the beginning of May, rising 30% and 24%, respectively, beating the S&P 500's 17% return in that period. "The reopening of many parts of the economy helped" transportation companies, Ms. Mishra notes.

However, the overall picture for 2020 is gloomier, she says. Freight volumes are still down sharply in many sectors, and even before the pandemic, concerns about U.S.-China trade tensions were negative for IYT and XTN, Ms. Mishra says. In addition, both transportation ETFs have holdings in companies focused on passenger travel, and it isn't clear when travel will return to prepandemic levels, she says. Any recovery in the sector could be very slow, warns Ms. Mishra.

Jeff Spiegel, U.S. head of iShares Megatrend and International ETFs, says valuations of the companies in the iShares transportation ETF look attractive when compared with the broader market. E-commerce could be a particular driver of growth in the future, Mr. Spiegel says, pointing to a report from Adobe that found that online spending in the U.S. during the four months through June was $77 billion higher than Adobe had predicted. In addition, iShares thinks any flare-up of international trade disputes could be a boon to domestic transport in the long run, driving an increase in U.S.-produced goods, Mr. Spiegel says.

Mike Arone, chief investment strategist in the U.S. for the SPDR funds, says there could be an increase in mergers and acquisitions in the transportation industry over the next year, following the disruption caused by the coronavirus. Additionally, supply-chain migration from low-cost locations abroad to nearer where products are consumed in the U.S. could provide a boost for domestic transportation companies, he says. Mr. Arone advises investors to watch out for companies that apply technology and data to effectively manage their businesses, as these "will emerge as the winners in the industry over the next year."

Mr. Cowan is a writer in Northern Ireland. He can be reached at reports@wsj.com..