NEW YORK (AP) — Stocks gained on signs that lawmakers are edging toward a deal that would help the U.S. avoid the "fiscal cliff."
Indexes shrugged off an early loss and rose in afternoon trading Wednesday. The Dow Jones industrial average closed up 106.98 points at 12,985.11. It had been down as much as 112 points in early trading.
The Standard and Poor's 500 was up 10.99 points at 1,409.93. The Nasdaq composite rose 23.99 points to at 2,991.78.
Huge tax increases and spending cuts will come into effect Jan. 1 if no deal on the U.S. budget is reached. Economists say the measures could push the country back into recession. President Barack Obama said he believed both parties can reach a "framework" on a debt-cutting deal before Christmas, while House Speaker John Boehner told reporters that he was optimistic a deal could be reached, according news outlets including CNBC.
Craig Johnson, a Minneapolis, Minn.-based technical market strategist at Piper Jaffray, said lawmakers realize that there is too much at stake to allow the deadline to pass.
"I don't think that anybody in Washington is going to do something so draconian, or so negative, that we're going to trigger a recession," Johnson said. "There will be some compromise."
Concern that the U.S. will go over the fiscal "cliff" has weighed on stocks since the Nov. 6 elections returned a divided government to power, with President Barack Obama staying in the White House and Republicans retaining control of the House.
Uncertainty about a possible increase in capital gains taxes has been prompting investors to sell stocks, said Johnson.
As the third-quarter corporate earnings period draws to a close, investors and traders have become increasingly fixated on the negotiations to cut the budget deficit. Before Wednesday's gain, the market slumped Tuesday after Senate Majority Leader Harry Reid said he was frustrated by the lack of progress in talks. The two moves canceled each other out, leaving both the Dow and the S&P 500 little changed for the week.
"We're all on pins and needles waiting for every bit of news, or rumors, coming out of Washington," said Ryan Detrick, a Cincinnati, Ohio-based technical analyst at Schaeffer's Investment Research. "That's what Wall Street is focused on. Everybody is watching the fiscal cliff."
Many companies are making special end-of-year dividend payments or moving up their quarterly payouts because investors will have to pay higher taxes on dividend income starting in 2013, unless lawmakers reach a compromise on taxes and government spending.