The stock market was generally up on Friday, but the Nasdaq Composite (^IXIC -2.05%) didn't get to join in the fun. As of just before 11 a.m. EDT, the Nasdaq was down more than half a percent, even though just about every other major market benchmark was up on the day.

Nevertheless, one segment of the market where you'll find a lot of Nasdaq stocks did quite well. Hydrogen fuel cell stocks got a lift on favorable earnings and other factors, and below, we'll look more closely at some of the most popular companies in the space.

Back of an automobile with a decal that says "hydrogen fuel cell."

Image source: Getty Images.

Plugging in

Shares of Plug Power (PLUG -5.17%) opened strongly, although they gave up some of their gains as the afternoon progressed. After opening higher by more than 9%, the hydrogen fuel cell company settled for a 2.5% gain in midmorning trading on Wall Street.

Plug Power's second-quarter results stoked excitement. Net revenue climbed 83% from the same period last year, with a 75% year-over-year rise in gross billings. The company shipped nearly a thousand more of its GenDrive units to customers during the quarter than in the second quarter of 2020, and Plug has made efforts to eliminate some supply chain disruptions and get costs back in line.

Plug is working on a lot of long-term initiatives. A project with Renault aims to target the light commercial vehicle market in Europe, with a goal of 30% market share by 2030. The buildout of its hydrogen supply infrastructure in the U.S. continues apace, and a partnership with BAE Systems on electric buses powered by hydrogen could open up a new market as well.

Plug Power has disappointed long-term shareholders for years, but its strength over the past year is noteworthy. Favorable conditions could reverse again and hurt investors, but this time, Plug seems to have a better chance to succeed.

Ballard powers up

Meanwhile, shares of Ballard Power Systems (BLDP -2.23%) moved higher by 5%. The fellow fuel-cell specialist also reported favorable results for the second quarter, and investors were similarly optimistic about what the future could bring.

Ballard's numbers didn't look all that strong on their face. Total revenue fell 3% year over year to $25 million. The company's technology solutions division saw an even steeper drop of 7%, and gross margin fell six percentage points to just 15%. Meanwhile, cash operating costs soared 80%, and that was a major contributor to net losses more than doubling from the second quarter of 2020.

However, the future still looks solid, with more than $113 million in backlogged orders at the end of the quarter. In particular, Ballard saw orders from Germany, India, and the U.S. for its bus lines, and the fuel cell provider is making progress in its talks with railroad and rail transportation stocks as well. By completing its advanced manufacturing investment, Ballard hopes to boost capacity sixfold, and that would leave the company ready if demand ramped up significantly.

There's a lot of debate about whether Ballard or Plug is the better stock. In the end, both need demand for hydrogen solutions to remain strong. Right now, though, that looks like a better bet than it has in a very long time.