NEW YORK — The stock market shuttled between optimism and pessimism Wednesday, finally betting that the government might succeed in lifting the economy out of recession after all.
News late in the session that key lawmakers had agreed on a $790-billion economic stimulus package helped the Dow Jones industrials finish with a 50-point gain a day after the blue-chip average plunged almost 400 points.
On Wednesday, share prices meandered for much of the session as investors struggled over what to make of developments in Washington.
"I think everybody is trying to get through all this news," said Anthony Conroy, managing director and head trader for BNY ConvergEx Group. "Everybody has to digest all the tidbits of information that are coming out."
Stocks had plummeted Tuesday on disappointment in the lack of detail from Treasury Secretary Timothy F. Geithner about the latest version of the government's bank bailout plan.
On Wednesday, heavily beaten-down bank stocks rebounded as chief executives of the nation's top banks appeared before a House committee to answer questions about how they have used more than $160 billion in taxpayer money to date.
But a sustained turn higher didn't come until key members of the Senate announced a deal on the stimulus bill and said President Obama could sign it within days. The measure includes provisions for more spending on unemployment benefits, food stamps, health coverage and more. It also includes billions for states facing yawning budget gaps.
But investors are still cautious. The Dow's gain for the session is "not a strong statement here," said Kim Caughey, equity research analyst at Fort Pitt Capital Group. "More information is what we need. What I mean by that is what exactly has been agreed to with the stimulus plan."
The Dow rose 50.65 points, or 0.6%, to 7,939.53.
Broader stock indicators also climbed. The Standard & Poor's 500 index advanced 6.58 points, or 0.8%, to 833.74, and the Nasdaq composite index rose 5.77 points, or 0.4%, to 1,530.50.
The Russell 2,000 index of smaller companies climbed 0.5%.
Advancing issues outnumbered decliners by about 3 to 2 on the New York Stock Exchange.
The financial sector, which led the market down Tuesday, led it up Wednesday. An index of 24 bank stocks jumped 6% after tumbling 15% the day before.
Citigroup shot up 10%, Bank of America surged 9.2%, Wells Fargo gained 7% and JPMorgan Chase climbed 6%.
The Treasury bond market was mixed. The yield on the benchmark 10-year T-note fell to 2.76% from 2.84% late Tuesday. The three-month T-bill, considered one of the safest investments, edged down to 0.3% from 0.31%.
Oil futures for March delivery fell $1.61 to $35.94 a barrel on the New York Mercantile Exchange.
Energy stocks slid along with crude. Exxon Mobil fell 2.1%, while Devon Energy sank 6.4%.
Gold futures jumped $30.10 to $943.80 an ounce, their highest price since July. The metal is up 5.8% in the last two days.
Other precious metals also rallied Wednesday. Silver futures surged 39 cents to $13.51 an ounce, their highest level since August.
The dollar was mixed against other major currencies.
The tech-heavy Nasdaq was weighed down by Research in Motion, which slumped 15% after warning late Tuesday that its fourth-quarter earnings would come in at the low end of its forecast range.
Overseas, key stock indexes rose 0.5% in Britain and Germany, 0.2% in France and 0.3% in Japan.