NEW YORK, FEB. 22 -- The stock market chalked up another broad gain today, extending its recent rally in a mood of increasing optimism about the economic outlook.

The Dow Jones average of 30 industrials climbed 25.70, to 2040.29, advancing for the third straight session.

Advancing issues outnumbered declines by more than 5 to 2 on the New York Stock Exchange. Big Board volume totaled 178.93 million shares, down from 180.30 million in the previous session.

Analysts said traders were looking ahead to congressional testimony Tuesday by Alan Greenspan, chairman of the Federal Reserve Board.

Several statistical reports are also due this week on such subjects as durable goods orders, the consumer price index and personal income and consumption.

Of special interest to traders is the Commerce Department's revised figure for the gross national product in the fourth quarter of last year, scheduled to be issued Thursday. The department earlier estimated GNP growth, after adjustment for inflation, at a 4.2 percent annual rate, but many analysts believe that will be revised upward.

Economists at Smith Barney, Harris Upham & Co., for example, say it is possible that the report will show growth of 5.5 percent or more.

While such news might not be especially favorable for interest-rate prospects, brokers said, it would tend to support recent arguments that the economy has not been dealt a severe setback by the market plunge last October.

Joseph Barthel, director of technical strategy at Butcher & Singer Inc., said the market "started off the day with some weakness, primarily because most people viewed the sharp move late Friday as a result of program trading."

But "the preconditions for a sharp break on the downside are absent because sentiment has improved," Barthel said, adding that the "severe oversold" condition which has characterized the market for 16 of the 19 weeks since the Oct. 19 plunge has started to dissipate.

Barthel cautioned that a high level of risk remains in the market because of "a strong element of disbelief in the current rally," which has seen the Dow advance more than 125 points since Feb. 9.

Polaroid rose 2 1/2 to 30 and Eastman Kodak dropped 1 1/2 to 40 3/4. Late Friday it was disclosed that Polaroid was seeking to recover as much as $5.7 billion from Kodak in connection with violations of instant-photography patents.

Among other actively traded blue chips, International Business Machines gained 1 7/8 to 115 1/4; Exxon 5/8 to 43 3/8; American Telephone & Telegraph 3/8 to 29 7/8, and General Electric 1 3/4 to 45.

Manufacturers Hanover jumped 2 1/4 to 25 3/4 in buying fueled by takeover rumors and speculation. The company said it had no knowledge of any potential bid to acquire it.

Other money-center bank issues posted fractional gains. Chase Manhattan rose 3/4 to 24, Chemical New York 3/8 to 23 5/8, and J.P. Morgan 7/8 to 37 1/4.

Allegheny International dropped 1/2 to 2 7/8. Over the weekend the company filed for protection under Chapter 11 of the federal bankruptcy law.

"Underneath the surface the market has broadened out a little, and we like the look of that," said Ralph Acampora, director of technical research at Kidder, Peabody & Co.

"The market should meander for a while and possibly trade off a little bit," Acampora said, but he added that it "is looking to pierce the Jan. 7 close of 2051.89. If we take out that number, we could bring in all the nervous money on the sidelines. Until then, it should trade in a narrow range with an upward bias."

The NYSE's composite index of all its listed common stocks gained 2.00 to 148.96.

Nationwide turnover in NYSE-listed issues, including trades in those stocks on regional exchanges and in the over-the-counter market, totaled 203.55 million shares.

Standard & Poor's index of 400 industrials rose 4.86 to 306.34, and S&P's 500-stock composite index was up 4.03 at 265.64.

The Nasdaq composite index for the over-the-counter market added 2.86 to 359.98. At the American Stock Exchange, the market value index closed at 283.01, up 2.85.