BOSTON ( TheStreet) -- For investors, it was the worst of times followed by the best of times. September's slide set the groundwork for October's stock-market rally, the biggest in almost four decades.October is bestowing a blessing on mutual fund managers, as battered and beleaguered a group as you will find in the investment industry. A sustainable rally could lure individual investors back to equity funds after they stampeded out of them, frustrated by outsized volatility and gloomy forecasts for global economies. The S&P 500 Index, the benchmark for U.S. stocks, is up 13.5% for the month through Thursday, its best performance since a 16.3% gain in October 1974. The rally has helped the benchmark index move into positive territory -- it was up 3.8% through Oct. 27 -- for the first time since Aug. 3. And that bellwether event may be the catalyst that will get investors back into the market and mutual funds. Much of the recent gains came last week after euro-zone leaders hammered out an agreement to avoid sovereign debt defaults, and that helped allay recession fears at home, this while U.S. companies continue to report solid third-quarter results. The 15,561 mutual funds tracked by Morningstar, including international and domestic stock, bond, balanced and alternative funds, returned an average of 6% in the 30 days through Oct. 27. Domestic equity funds rose an average of 10%. The big winners among domestic stock funds, with total returns in the teens to low 20s, in terms of percentage, were oil- and gas-sector funds and small-cap stock funds. The $14 million ProFunds Oil Equipment Services and Distribution Ultrasector Fund ( OEPIX) led the way with a 28.7% return, followed by a half-dozen highly leveraged funds, which similarly focus on daily returns and therefore are highly volatile. Actively managed buy-and-hold funds were further behind, but still recorded gains as high as 20%. One of the top performers is the Integrity Williston Basin/Mid-America Fund ( ICPAX). The $322 million mutual fund has a 30-day return of 20%, including a 10% gain in the past week, but it is up only 8% this year. The fund is a sniper shot on the booming oil-shale industry. It's benefitting from a rise in crude oil prices on prospects of an economic recovery. The top-performing holdings are all oil-field exploration and oil-field services companies, including: Brigham Exploration ( BEXP), up 35% this month; National Oil Well Varco ( NOV), up 31.6%; and Carbo Ceramics ( CRR), up 10.3%.