The stock market declined, interest rates rose and mutual funds went into the tank during the latest quarter.

Battered by rising oil prices, inflation fears and a general economic slowdown, the nation's mutual funds posted their worst quarterly showing since the stock market crash of 1987.

The average stock mutual fund lost 15 percent of its value in the three-month period ended Sept. 30, and small-company growth funds declined by 22 percent, according to figures released last week by Lipper Analytical Securities Corp., a New York firm that tracks mutual fund performance.

There was almost no refuge for investors. Growth funds didn't grow, capital appreciation funds didn't appreciate, even fixed-income funds posted negative returns.

Equity income funds fared a little better, losing 11.25 percent, but among general equity funds, no major group showed a gain.

"With rare exception, the third quarter provided no place to hide from the sharp contraction of equity prices around the world," A. Michael Lipper, the firm's head, said in a report accompanying the data.

Among groups of funds, only those with investments dispersed around the world and those concentrated in gold stocks showed positive results, both returning slightly more than 4 percent for the period.

The decline was so broad that even asset-allocation funds, which spread their money across a wide variety of investments, lost ground. The gains they made in precious metals were too small to offset big drops in both stocks and bonds.

On the fixed-income side, there was also a decline, though a large portion of that was accounted for by a renewed slump in the high-risk, high-yield junk bond funds. Lipper noted that preliminary results of his survey showed junk bond funds losing 7 percent or 8 percent for the quarter.

The Lipper data also showed that all equity funds lost 14.91 percent for the quarter, compared with a loss of 13.73 percent for the Standard & Poor's 500 stock index and 14.05 for the Dow Jones industrial average. These figures, as are all Lipper numbers, include reinvested dividends.

At the same time, not all was gloom in the report.

More than 25 funds reported gains for the quarter of 6 percent or more, with the top-performing fund, the Dreyfus Capital Value Fund, returning 12.96 percent.

The third-quarter's winners employed a variety of strategies, but most tended to come out ahead by picking spots that went against the general trend.

Several top performers were foreign currency funds, which benefited from the dollar's weakness over the summer. Others concentrated in energy stocks, which got a boost from the Middle East turmoil that sent oil prices soaring.

Top-performer Dreyfus Capital Value scored through flexibility, according to Stanley D. Salvigsen of Comstock Partners Inc., which manages the fund.

Salvigsen said he and his colleagues sensed that troubles were coming. "We had been positioned pretty cautiously during the first half {of the year}. We thought the stockmarket was pretty expensive, and we thought interest rates would go higher," he said.

So the fund put 25 percent of its assets overseas in the foreign equivalents of Treasury bills "because we thought the dollar might be weak, 10 percent in gold and 15 percent short in banks, insurance stocks and some of the growth stocks that had led the market up," Salvigsen said.

These investments, plus a large position in "Nikkei puts" -- the right to sell a basket of Japanese stocks at a predetermined price -- paid off handsomely as stock and bond markets slumped.

"It was a bunch of what taken by themselves might seem to be strange holdings, but in the third quarter they all came into play," Salvigsen said.

He said the fund was originally a small-company growth fund, but when his firm took over management in 1987 it obtained charter amendments that allowed major changes in asset classes. He said the fund might be called an asset-allocation fund now, but it does not follow any rigid formula.

"We go wherever we think there's the least risk or best opportunity," he said.

A number of other top performers during the quarter specialized in foreign currencies.

Patti Thorp, a foreign exchange trader with Fidelity Investments in Boston, said that higher interest rates abroad contributed to a deterioration of the dollar against foreign currencies, making the currency futures contracts that her funds buy more valuable.

The interest rate differential was the key, Thorp said. "That's the real reason these funds outperformed the market."

As for the future, caution appears to be the guiding theme.

Salvigsen said his fund remains in the same essentially pessimistic stance today in the expectation of continued economic weakness. He expects continued global demand for capital to keep interest rates high, an environment in which "stocks usually don't do too well."

Lipper, too, said the signs indicate continued weakness in the stock market. There have been 12 major stock market declines during the 30 years that Lipper has tracked mutual funds. On average, stocks give up about 35 percent of their previous gains during these "retrenchments," Lipper has found, but the recent decline has moved prices back only 24.08 percent.

"This analysis suggests we may have further to go in this decline," Lipper said.

The slump in the Washington area was only too apparent in the three funds that specialize in local stocks.

The Washington Area Growth Fund, operated by the Calvert Group of Washington, plunged 31.69 percent in the third quarter, leaving it down 36.37 percent for the year through Sept. 30.

The Growth Fund of Washington, run by Johnston, Lemon & Co. of Washington, fell 20.02 percent in the quarter and 23.25 percent for the year so far.

The Southeastern Growth Fund, owned by Wheat, First Securities Inc. of Richmond, was off 21.95 percent for the quarter and 20.22 percent for the year.

While the latest quarter was rather glum all around, stock mutual funds continue to show good returns over the long term. Longtime champion Fidelity Magellan Fund has rewarded those who invested in September 1980 with a total return of 622.67 percent in the subsequent decade, despite a loss of 16.46 percent in the third quarter. And 24 other funds all returned more than 340 percent over the past decade.

However, investments in the stock market since the mid-1970s generally have performed much better than during any prior period. Lipper noted that the dismal third-quarter showing has reduced returns to levels more in keeping with years past.

As of Sept. 30, general equity funds had returned 11.88 percent annually for the past 10 years. For the 10 years ended Dec. 31, 1985, the annual growth rate was 17.12 percent, and the 10 years ended in 1986 through 1989 each show returns in excess of 15 percent.