Ethan Brown, founder and chief executive officer of Beyond Meat Inc., center, rings the opening bell during the company's initial public offering (IPO) at the Nasdaq MarketSite in New York, U.S., on Thursday, May 2, 2019. Beyond Meat's successful initial public offering at $25 a share, the top end of its increased range, shows appetite for innovation in the packaged-food industry. Photographer: Michael Nagle/Bloomberg via Getty Images

This year's IPOs crop wasn't as bad as it may have appeared.

Despite the high-profile struggles of Uber and Lyft shares, an index that tracks initial public offerings has outperformed the S&P 500 in what could be a historic year for stocks.

"The long-awaited debuts of mega unicorns Uber and Lyft were mega busts, capped off by WeWork's kamikaze IPO attempt in September," said Kathleen Smith, principal at Renaissance Capital. "But beyond these headline-grabbing disappointments, the IPO market had a mostly good year."

Renaissance Capital's IPO Index, a basket of newly public companies, is up 33% this year versus a 29% rise in S&P 500. More than half of newly listed companies were trading above their issue price at the end of the year, compared with about 40% last year, according to Renaissance Capital, which provides institutional research and IPO ETFs.

The S&P 500, meanwhile, is just shy of 2013′s pace, when the market gained 29.6%. If it exceeds that water mark, the S&P would notch its best year since 1997.

WeWork's failure to even make it to an IPO became the poster child for money-losing businesses and sky-high valuations not always translating to public markets. Uber and Lyft — among the biggest three listings this year — have been criticized for lack of a clear path to profitability. Companies such as Airbnb and DoorDash are looking to tap public markets in 2020 and will likely be held to higher standards when it comes to profitability, according to Smith. But there's still opportunity for some new entrants.

"There's still appetite for companies that show a business model and that it can be profitable," she said.

Health-care and technology companies were the best performers for the fifth year in a row. Karuna Therapeutics took the top spot with a roughly 380% gain year to date. Smith pointed to the FDA approving new immunotherapy and cancer drugs "faster than investors thought." Medical device companies also performed well and were widely seen as M&A targets, according to Smith.

Beyond Meat was by far the best performing consumer name, with a 200% rally. Chewy, one of the top 10 IPOs this year, is up more than 26% since its debut.

Chinese IPOs were the worst performing new listings, according to Renaissance, thanks to trade war fears and an economic slowdown in China. Deal count slowed slightly, with IPO count falling to 159 and proceeds about flat. Average total returns for IPOs were 20% while the average first-day pop was roughly 18% — the highest in six years, according to Renaissance.

— CNBC's Gina Francolla contributed to this report.