Stock mutual funds soared an average 13.9% in the first half through Thursday, the best showing since the second half of 2010, according to Lipper.

Funds still trailed the Standard & Poor's 500-stock index, which jumped 14.1% with dividends reinvested.The past 12 months, the average fund has gained 24.6%. vs. 23.9% for the S&P 500.

The best fund this year: Direxion

Health and biotechnology funds were the leading sectors, jumping an average 21.8% as investors piled on to stocks of dividend-rich pharmaceutical companies and red-hot development-stage firms. Other top gainers:

• Consumer services funds, up 17.9%

• Financial services funds, up 17.2%

• Midcap value funds, up 16.3%

Despite a sputtering market in the second quarter, the average fund still eked out a 2.8% gain, vs. 3.4% for the S&P 500.

Among the 10 largest funds, which are most likely to be corporate 401(k) savings plans, the top performer was the Vanguard Total Stock Market Index fund, up 14.5%. Vanguard also had the worst of the big 10: Vanguard Total International fund, down 0.6%.

The biggest losers: precious metals funds, which plunged an average 49.6%, according to Lipper. These funds invest in stocks of precious metals mining companies. Funds that invest directly in precious metals fell 26.7% — the second-worst sector.

Emerging markets funds submerged in the first half, falling 8.4%. Funds that invest in India fell 17.2%, and those that invested in Latin America dropped 14.7%.

The average stock fund has gained 164% since the stock market's bottom in March 2009, and an average 7.9% a year the past decade. Since the 2007 market peak, the average fund is up 17%, according to Lipper.