You’ve heard that companies with women executives at the helm tend to perform better than those led by men— and a new study furthers that claim, finding that women CEOs in the Fortune 1000 drive three times the returns as S&P 500 enterprises run predominantly by men.

Quantopian, a Boston-based trading platform based on crowdsourced algorithms, pitted the performance of Fortune 1000 companies that had women CEOs between 2002 and 2014 against the S&P 500’s performance during that same period. The comparison showed that the 80 women CEOs during those 12 years produced equity returns 226% better than the S&P 500. (Global nonprofit women’s issues researcher Catalyst compiled the list of women CEOs used in the simulation.)

“It’s based on a buy-and-hold strategy aimed at looking at how well women CEOs have performed cumulatively,” says Karen Rubin, Quantopian’s product manager. She says she is now working with Morningstar to create an algorithm for a fund built on the same premise using real-time data for live trading.

Here’s how the simulation works: Rubin invests a hypothetical $100,000 in the companies that had women CEOs between Jan. 1, 2002 and Dec. 31, 2014 and another $100,000 in the S&P 500. Rubin buys a company’s stock when the woman becomes CEO, and holds it through the CEO’s tenure.

According to the algorithm, the women CEO fund would end up being worth $448,158, or a return of 348%, while the S&P 500 investment would have risen to $222,306, or a return of 122 %. The results are even on the conservative side for the performance of the women CEOs, since dividends weren’t reinvested automatically as they were with the S&P 500.

Of the women CEOs tracked over those years, the two best performers were Mindy Grossman at HSNi, parent of the Home Shopping Network, and Debra Cafaro at Ventas, a healthcare and senior living real estate investment trust. Both women, still CEOs of their respective companies, increased the initial investment by more than 500%. Cafaro has been chief through the entire 12 years, while Grossman became the head of HSN in 2006 when it was still part of Barry Diller’s IAC. HSN was spun off in August 2008 at the height of the recession and just in time for the stock market meltdown. The simulation calculated Grossman’s performance from the IPO date.

Other top performers within the make-believe fund include Carol Meyrowitz at TJX, Linda Lang at Jack in the Box, Denise Ramos at ITT and Gracia Martore at Gannett—all of whom increased Rubin’s initial investment by more than 200%, and 300% in Meyrowitz’s case.

Women CEO Screen Shot 2015-02-28

“There’s a lot of the theorizing around why the results are dramatically higher for the women, but most think it has to do with how hard women have to work to become CEO at such big companies in the first place,” Rubin says. The ones who do “really represent the cream of the crop,” she adds.

Of course, not every woman CEO had a stellar performance. The biggest loser on the list was Janet Robinson at The New York Times, where an investor would have lost more than 80% of his or her investment during her tenure from Dec. 27, 2004 to Jan. 3, 2012. Others in the negative were Mary Sammons at Rite Aid, Kerrii Anderson at Wendy’s International, and Patricia Russo at Lucent.

There are six companies on the list in which two female CEOs led during the 12 years, including Yahoo, where both Carol Bartz and Marissa Mayer held the top spot, Xerox with Anne Mulcahy and Ursula Burns, HP with Carly Fiorina and Meg Whitman, and Avon Products with Andrea Jung and Sheri McCoy. Best performing of these was Yahoo!, where the investment increased in value 20% under Bartz and an impressive 224% under Mayer, who was a beneficiary of the increasing value of the interest in Alibaba purchased by Yahoo! founder Jerry Yang.

Rubin decided to embark on this experiment after seeing the results of the Credit Suisse Gender 3000, which showed the return on equity for companies with women in more than 10% of key positions was 27% better than for those with less than 5 percent and the dividend payouts had a 42% higher ratio. The study by the Credit Suisse Research Institute tracked some 28,000 executives at 3,000 companies in 40 countries.

Watch more business news from Fortune: