Central banks in West Germany, France, Belgium and the Netherlands lowered key interest rates yesterday, cheering the U.S. stock market and boosting the Reagan administration's hopes for sustaining world economic growth.

The rate cuts, although small, provided the first concrete evidence that U.S. trading partners are prepared to stoke their own economies in response to the agreement struck Friday between President Reagan and congressional leaders on the U.S. budget deficit.

Treasury Secretary James A. Baker III has sought action from West Germany's Bundesbank, in particular. He has been urging the Bonn government to stimulate the West German economy to help avoid a global recession.

On Wall Street, stock prices rose sharply in response to the foreign rate cuts and also to news that the U.S. economy expanded at a 4.1 percent annual clip in the third quarter, higher than the 3.8 percent rate reported previously.

The Dow Jones industrial average of 30 blue-chip New York Stock Exchange issues advanced 40.45 points, closing at 1963.53. {Details on Page E1.}

Stock markets abroad also rose, and the dollar initially climbed on currency markets in reaction to the rate cuts, but later gave up its gains.

Analysts cautioned that the economic impact of yesterday's central bank actions will be limited. The four European central banks cut key short-term interest rates by only a quarter of a point. But the significance of the moves comes from the suggestion that the allies may be willing to take more extensive steps once Congress has put Friday's budget pact in action.

"It looks as if the foreign central banks were tipping their hat to the U.S." for having reached a budget agreement, said Scott Pardee, vice chairman of Yamaichi International (America) in New York. West Germany, he said, appears to be "setting the stage" for further interest rate reductions, perhaps in the more visible discount rate, the central bank's charge on loans to financial institutions.

U.S. officials, eager to restore financial-market confidence, are hoping to reach an international agreement to promote economic growth and currency stability at a meeting of finance ministers of the seven major industrial countries. Yesterday, U.S. officials continued private negotiations with their foreign counterparts to plan for the meeting, which could come as early as next week. {Details on Page E1.}

The Reagan administration believes that an agreement by U.S. trading partners to speed up their economies would be helpful for two reasons. First, faster growth abroad would offset the restricting effect of budget cuts and tax increases in the United States. Second, it would increase demand for U.S. exports and help shrink the bloated U.S. trade deficit. That in turn would reduce the risk of a renewed plunge in the dollar and the potential for a financial-market panic.

Yesterday's moves provided no guarantees that West Germany will go as far in stimulating its economy as the United States and its European partners want. U.S. Treasury officials have urged Bonn to bring forward next year some tax cuts now planned for 1990. So far, the West German government has resisted, saying only that it would refrain from raising taxes next year if revenues fall below projections.

In a speech to the West German parliament yesterday, Chancellor Helmut Kohl disputed criticism that West German policies have been too restrictive. Bonn's policies "have been clearly expansionary for a long time," Kohl said. But he also said that West Germany is "prepared, especially in the current situation, to contribute actively to further international efforts to strengthen growth and employment."

According to both Bundesbank sources and private analysts, the West German central bank was motivated by more than a desire to please Washington when it lowered the interest rate charged on 28-day loans to banks from 3.5 to 3.25 percent. In reducing that key rate, the Bundesbank also wanted to help prop up the dollar because a lower dollar hurts West German companies by making their products less competitive on world markets.

Thus, analysts said, self-interest played a large role in the central bank's action. A Bundesbank source suggested as much, saying that the rate cut was "in accordance with the needs of a further stabilization of the foreign exchange market, as well as a contribution to better support of the economy." By reducing interest rates, the Bundesbank can give the dollar a lift because investors find it less attractive to hold investments denominated in marks.

West Germany also has been under pressure from its European trading partners and some domestic critics to step up its growth. "It is now vital to see further fiscal stimulus {by Bonn} to prevent a world recession," said Peter Pietsch, a senior economist at Commerzbank in Frankfurt. "Up to now, the government seems not to be ready to bring forward the tax cut. It will only tolerate a higher deficit. This is not enough. This is a passive attitude."

The French central bank issued a statement linking its action to the U.S. budget pact. It said it cut rates "following the announcement in the United States of an accord on the reduction of the U.S. budget deficit, and in cooperation with the Bundesbank."

Japan's central bank didn't reduce interest rates as overtly as its European counterparts, but it injected cash into the Japanese banking system, a move that tends to ease market interest rates.

Besides the news on the monetary front, Wall Street was buoyed by a Commerce Department report that the U.S. gross national product, the total output of goods and services, grew at a 4.1 percent annual rate, adjusted for inflation, from July to September. The report provided fresh evidence that the American economy had built up considerable momentum before the Oct. 19 stock market collapse.

But the report "is for the period prior to the crash, and the whole ball game changed on Oct. 19," said Ira Kaminow, vice president and chief economist at Government Research Corp. "We have to wait until we get the fourth quarter numbers before we can get a sense of how much damage was done by the crash."

In other economic news yesterday, Commerce said the after-tax profits of U.S. corporations rose 5.2 percent in the third quarter to a seasonally adjusted annual rate of $141.5 billion. The department said the third-quarter gain was the largest increase in after-tax corporate profits since a 6.5 percent rise in the third quarter of 1986.

Commerce also reported the largest quarterly deficit ever in the nation's trade accounts on a "balance of payments" basis. The department said the U.S. trade deficit widened by $274 million in the third quarter, to $39.8 billion. The balance of payments calculation omits costs of shipping and insurance and all military sales from the total.

Analysts said the report reinforced the view that America's trade problems are taking much longer than expected to turn around.

In foreign currency markets yesterday, the dollar peaked at 1.6880 West German marks and 135.50 yen after the central bank rate cuts were announced. But the U.S. currency settled back to close at 1.6685 marks and 134.63 yen, slightly below Monday's finish.

Traders said the dollar gave up its gains after a Bundesbank official said the United States would have to make deeper cuts in its budget deficit. Washington Post correspondent Robert J. McCartney in Bonn contributed to this report.