Stocks closed sharply higher after the Federal Reserve raised rates for the third time this year and indicated that the latest increase might be all that's needed to slow the nation's rapid economic growth.

At the close of a volatile session on Wall Street, the Standard & Poor's 500 and Nasdaq composite indexes were at new record highs. The S&P 500 rose 25.64, to 1420.03, its highest close since July 16. The Nasdaq composite index gained 73.51, to 3293.05, topping a record set Friday.

The Dow Jones industrial average rose 171.58 to end at 10,932.33, its highest close since Sept. 13, when the index closed at 11,030.33.

The Fed's decision to raise the federal funds and discount rates a quarter-point sent the Dow rising from a gain of about 90 points in early afternoon to a gain of 133 right after the announcement. Within moments, however, the Dow plunged into negative territory.

Traders said the dramatic swing was prompted in part by computer-driven program trading, and in part by investors who hoped to take profits from the fierce initial rally. Broader stock indicators proved less volatile than the Dow.

Today's rate increase was the third of 1999, taking back three cuts implemented last year to help end a global financial crisis. The Fed raised rates this June and August in an effort to slow the nation's torrid economic growth, and in recent weeks data have suggested that the central bank may have succeeded.

To that end, the Fed announced it would adopt a "neutral bias" on further rate changes. Many analysts expect today's rate hike to be the last for several months, as the Fed is likely to want a stable money supply until year 2000 computer issues are resolved.

"Today's increase in the federal funds rate, together with the policy actions in June and August and the firming of conditions more generally in U.S. financial markets over the course of the year, should markedly diminish the risk of inflation going forward," the Fed said in a statement that accompanied its decision.

Analysts agreed. "The economy has been inoculated against inflation," said Richard L. Babson, president and chairman of investment advisory firm Babson-United Inc. "This rate rise helps insure the Fed doesn't get behind the curve, and we will probably not see another one until February 2000 at the earliest."

After the Fed's decision, bond prices, which are highly sensitive to inflation and interest rates, fell. That brought the yield on the 30-year Treasury bond, which was at 6.02 percent late Monday, back up to 6.06 percent after it had dipped to as low as 6.01 percent earlier in the session. The price of the benchmark bond fell $5.93 3/4 per $1,000 invested.

Financial stocks flourished amid the stable outlook for rates. J.P. Morgan rose 4 1/8, to 142 1/2, and Morgan Stanley Dean Witter gained 6-3/16, to 127 1/4.

The Dow's strongest performances came from a wide range of sectors. General Electric rose 4 1/8, to 139 5/8; Intel gained 2 1/2, to 76-9/16; and 3M rose 3-11/16, to 101 1/8.

The Nasdaq's march higher came in spite of a 17-minute failure of the electronic trading systems that run the small-order execution system and SelectNet, which allows trading desks to share information. The outage forced traders to place orders over the telephone or on electronic trading networks.