The stock market finished modestly lower yesterday after resisting the powerful influences of a falling dollar, heavy selling in overseas stock markets and growing Wall Street pessimism about Washington's efforts to deal with the U.S. budget deficit.

The 30-stock Dow Jones industrial average lost 18.24 points to close at 1945.29. On Tuesday, the Dow fell 50.56 points to end a string of five days of advances. The Dow now rests 28.5 percent below its all-time high of 2722.42 on Aug. 25.

Volume on the New York Stock Exchange was 202.5 million shares, down from 227.8 million on Tuesday.

Prices fell across the board, with losers running ahead of winners by a 5 to 4 ratio on the New York Stock Exchange, a 4 to 3 margin on the American Stock Exchange and a 7 to 5 rate on the Nasdaq over-the-counter market.

Wall Street analysts said that despite yesterday's small loss, the market seemed to be seeking a measure of stability in the uncertain and nervous market environment that has prevailed since the Dow plunged 508 points on Black Monday, Oct. 19.

"Nothing has happened in the external world to solve any of our problems, but the internal market is improving and showing signs of stability," said Michael Metz, market analyst for Oppenheimer & Co. in New York.

Richard McCabe, an analyst for Merrill Lynch in New York, said he expected the market to continue to pull back and retest its lows in a pattern of consolidation. "We'll see the market go higher in November and December and eventually recover half of the 1,000 points it lost," he said.

For the moment, McCabe said, institutional buyers appeared to be sitting on the sidelines with their cash or buying bonds with 9 percent yields. "They're reluctant to do any aggressive buying," he said.

When trading began yesterday, analysts noted, the fall in the dollar in overseas trading and the drop in foreign share prices caused the Dow to slide about 35 points and raised fears that a big decline was at hand. However, the Dow rebounded later, rising 20 points before turning back down.

The dollar fell against key currencies, closing in New York at 1.7060 West German marks from Tuesday's 1.7120, and at 136.90 yen, down from 137.25. In Frankfurt the dollar ended at 1.7090 marks.

In the bond market, where bad news often is good news for bond prices, buyers staged a vigorous rally based on the conviction that the nation is headed toward slow economic growth and possibly a recession, analysts said. A weak economy diminishes prospects for rekindling inflation and the threat of higher interest rates. Rising rates would cause bond prices to fall.

William V. Sullivan Jr., director of money market research at Dean Witter Reynolds in New York, said the rush to buy bonds was prompted by the decline in share prices overseas as well as uncertain economic conditions.

"The turbulence in the global equity markets has made bonds a high-quality, safe haven for investors," Sullivan said.

Prices rose $10 for every $1,000 of face value on the key 30-year Treasury bond and its yield fell to 8.93 percent from 9.03 percent. The rally came as the Treasury sold $9.25 billion in 10-year notes, part of its regular refunding operation. Buying included participation by both domestic and Japanese investors, Sullivan said.

The average yield on the 10-year notes was 8.88 percent.

Sullivan said falling interest rates in Japan had made U.S. bonds increasingly attractive to Japanese investors. The spread between bonds of the two nations, he said, had grown from about 4 percent to almost 4.5 percent in the last two weeks.

On the other side of the coin, Sullivan said, it is risky for Japanese investors to buy U.S. bonds at a time when the dollar is falling because they stand to lose part of their gains on the currency loss.

Scott E. Pardee, vice chairman of Yamaichi International (America) in New York, said the brisk buying in the bond market lowered the expected yields on the 10-year notes and curtailed the participation of some domestic and foreign investors.

Wall Street rumors suggested that the Japanese would buy 40 to 50 percent of the 10-year notes, but he estimated that it might have been only about 25 percent.

Terence W. Collins, president of ASB Capital Management in Washington, which manages $5.5 billion in pension funds and other money, decried what he saw as signs of political infighting over the budget deficit. "The mood of putting politics aside has broken down and we've returned to politics as usual," he said.

Pardee echoed those thoughts. "The market is still waiting for the political leaders in Washington to resolve their political differences and get on with it," he said.

The NYSE composite index was down 1.00 at 139.11.

Standard & Poor's index of 400 industrials fell 2.63 to 283.93, and S&P's 500-stock composite index was off 1.86 at 248.96.

The Nasdaq over-the-counter market index fell 0.53 to 320.13. At the American Stock Exchange, the market value index closed at 252.17, down 3.32.

On the trading floor, General Electric dropped 1 1/2 to 44; Eastman Kodak 3 1/2 to 50 5/8; Digital Equipment 3 to 131 7/8; International Business Machines 1 1/4 to 120 5/8, and American Telephone & Telegraph 3/8 to 29 3/8.

General Motors gained 1 1/2 to 60 1/4; RJR Nabisco 1 1/4 to 53 1/8, and Merck 3/4 to 176 1/4.

With oil prices dropping, energy stocks were lower. Mobil fell 1 1/2 to 38; Exxon 7/8 to 42 5/8; Atlantic Richfield 1 1/4 to 77 1/8; Amoco 5/8 to 69 1/4, and Occidental Petroleum 1/2 to 26 1/4.