ESG investment funds with longer track records are outperforming their newer rivals in the most tumultuous markets since the 2008 global financial crisis.

Of the more than 2,800 ESG-themed funds tracked globally by Bloomberg, about 400 were in positive territory for the year before Friday’s stock market rebound. There were 45 funds that have managed to hold onto gains of more than 10% year-to-date and more than 70% of those funds opened before 2015. This year’s top performers, as of Thursday, were the 12-year-old Martin Investments Eco Investing and 10-year-old Ari Global Opportunities — both separately managed accounts that are up almost 40% so far this year, buoyed by big positions in health-care, pharmaceuticals and technology stocks, according to data compiled by Bloomberg.

“Potential for outperformance may be related to the longer-term nature of good ESG integration,” said Erika Karp, founder and chief executive officer of Cornerstone Capital Group, which oversees more than $1 billion for clients.

The market for funds that focus on environmental, social and governance investment principles has ballooned in recent years with more than 1,000 opening since 2015. The increase means most ESG funds now find themselves in uncharted territory as markets crater. The funds fell by an average 12.2% this year as of Thursday, compared with the 23.2% slump of the Standard & Poor’s 500 Index, according to Bloomberg data. Parnassus Core Equity, the largest ESG-focused fund in the U.S. with about $17 billion of assets, has declined 21.2%.

Managers of sustainable funds have long said they can use ESG factors to limit risks in their portfolios. They are often heavily invested in technology and health-care stocks and they typically have little or no holdings in fossil-fuel companies, which have plunged in value as oil prices fell the most since the Gulf War of the early 1990s. At the same time, they tend to be underexposed to heavy-polluting companies such as cruise-line operators and airlines.

Carnival Corp., Royal Caribbean Cruises Ltd. and Norwegian Cruise Line Holdings Ltd. have seen their market values crushed this year because of the coronavirus, while airlines from Qantas Airways Ltd. to American Airlines Group Inc. have suffered from record declines in customer demand.

“Every time we go through a significant change in oil prices, be it up or down, it increases the case for developing non fossil-fuel methods of generating energy,” said Cheryl Smith, a money manager at Trillium Asset Management in Boston.

Trillium managed $3.2 billion at the end of last year. The Trillium Large Cap Core strategy, which is a separately managed account, has lost 9% this year.

About a third of the 303 U.S. sustainable funds tracked by Morningstar Inc., managing a combined $140 billion, are less than 10 years old and, so far, the funds are weathering the stock market slump better than traditional equity funds. For the year through March 10, about 41% of ESG funds are ranked in their category’s top quartile, while only 11% are in their category’s bottom quartile, according to Chicago-based Morningstar.

“ESG funds, as they mature, are becoming pretty good all-weather funds,” said Jon Hale, head of sustainability research at Morningstar.