House Speaker John A. Boehner told reporters that he remained hopeful that a compromise could be reached, but said President Obama had yet to offer a balanced deficit-cutting plan. Boehner said Obama's latest offer for $1.3 trillion in tax increases over the next decade with $850 billion in spending cuts was not enough.
The White House said Obama had moved halfway to meet Boehner on a budget deal.
"People are cheering the prospect for some compromise in Washington right now," said Joe Costigan, director of equity research at Bryn Mawr Trust Co. "At the moment, there is some pretty good news, and the market is reacting favorably to it, but the deal isn't done yet."
Stocks slumped after the November presidential election on concern that a divided government would struggle to reach an agreement before Jan. 1, when a series of tax increases and government spending cuts are scheduled to take effect if no deal is reached. Those measures could push the United States back into recession.
The S&P 500 has since recouped all those losses.
Some investors say stocks are pricing in too much optimism. Any deal, while ensuring that the economy avoids the full impact of the fiscal cliff, still will involve higher taxes and less government spending.
That will be a drag on economic growth, said David Wright of Sierra Investment Management, in Santa Monica, Calif. "There are just too many naive people thinking that the agreement itself is a significant event. It isn't," he said. "The implementation is going to be negative for the economy."
On Tuesday, Allstate gained 56 cents, or 1.4 percent, to $41.35 after its board of directors approved a plan to buy back up to $1 billion of the insurer's shares by year's end.
Drugmaker Eli Lilly rose $1.18, or 2.4 percent, to $49.52, after saying it approved a $1.5 billion share buyback.