A machine works on purification of potential hepatitis C virus drug candidate. Gilead Sciences was a big winner. / David Paul Morris, Bloomberg

by John Waggoner, USA TODAY

by John Waggoner, USA TODAY

Mutual fund investors will be talking about 2013 the way wine aficionados talk about a great vintage.

The average U.S. stock mutual fund gained 31.8% through Dec. 20, including reinvested dividends and gains, just edging out the Standard and Poor's 500-stock index, which rose 30.2% the same period. It's the best year for stock funds since 2009, according to Lipper, which tracks the funds.

Leading the way:

â?¢ Small-company stocks beat their larger brethren. The average small-company core fund jumped 34.5% this year, vs. 29% for large-cap core funds. Investors should note that large-cap core funds most closely track the S&P 500, and that they lagged the index mainly because of expenses.

â?¢ U.S. funds clobbered overseas funds. The average large-company international fund gained just 16.8% this year, held back by a rising dollar, which detracts from gains for U.S. investors.

The top-performing fund for the year so far is one that bet against gold-mining stocks, one of the worst-performing sectors. Direxion Daily Gold Miners 3X Shares soared 219.8%. The tiny fund uses futures and options to gain $3 for every $1 an index of gold-mining stocks falls.

Among U.S. funds that don't use jet fuel to boost returns, Managers AMG Essex Small/Micro-cap fund is the top performer, soaring 59.5% this year. Runner-up: Oberweis Micro-cap fund, up 59.1%.

Best fund category: Health and biotechnology funds, propelled by gains in companies such as Gilead Sciences, which has soared 103.7% this year because of its treatment for hepatitis C.

Runner-up: Small-cap growth funds, many of which have invested strongly in small biotechnology and technology companies. The category has gained 39.9% this year.

Precious metals were the biggest disappointment this year. Gold started 2013 at $1,657.50 an ounce, according to gold dealer Kitco. It closed Dec. 20 at $1,195.25, a loss of 27.9%.

Funds that invest in gold-mining stocks have been hammered, falling an average 51% in 2013. When the price of gold falls, the earnings of mining companies walk off a cliff.

Next worse: funds that bet on a decline in stock prices. Bear funds got clawed for a 28.8% loss.

Lured by big gains, investors have poured an estimated net $159 billion into stock funds this year, according to the Investment Company Institute, the funds' trade group.

What's ahead for 2014? David Winters, manager of the Wintergreen Investor fund, thinks next year could be the time for international funds to shine. "International markets, in general, have done very little," he says. "The world over time will do better."