Investors were encouraged by several positive economic reports, including a higher estimate of third-quarter U.S. economic growth, an increase in home sales and a drop in claims for unemployment benefits.
After a meeting with Treasury Secretary Tim Geithner, Boehner told reporters that Democrats still haven't said which cuts they would accept to government benefit programs, suggesting a final budget deal remains a long way off. Republicans have said that they are open to increasing tax revenues as part of an agreement but only if they're accompanied by significant cuts to spending.
Investors have been closely watching the talks between the White House and Congress over the "fiscal cliff", a reference to sharp government spending cuts and tax increases scheduled to start Jan. 1 unless a deal is reached to cut the budget deficit. New developments in the talks have whipsawed the market.
"It's a headline-watching market with this fiscal cliff," said David Brown, chief market strategist of the investment research firm Sabrient Systems.
Brown says the ongoing negotiations are likely to cause the stock market to take sudden turns in the weeks ahead. "But things seem to be moving in the right direction," Brown said. "I don't think either party wants to get pinned with hurting the market or the economy."
In other trading, the Standard & Poor's 500 rose 6.02 points to 1,415.95. The Nasdaq composite index gained 20.25 points to 3,012.03.
In the market for government bonds, the yield on the 10-year Treasury note slipped to 1.62 percent from 1.63 percent late Wednesday.
Stock in Guess gained 55 cents to $25.81 after the clothing maker joined the ranks of companies pledging special dividends to shareholders before favorable tax rates on dividends expire at the end of the year. The clothing company said it will make a one-time payment of $1.20 per share on top of its regular quarterly dividend of 20 cents.
Dividends, now taxed at 15 percent, will be treated like ordinary income next year unless Congress and the White House extend current tax breaks as part of a budget deal.
The Commerce Department raised its estimate for U.S. economic growth to an annual rate of 2.7 percent in the July-through-September period. That's much better than the 2 percent rate estimated a month ago and more than twice the 1.3 percent rate logged in the three previous months.
The Labor Department also reported that the number of Americans applying for unemployment benefits dropped to 393,000 last week, in line with what economists had expected. It was the second straight drop after Superstorm Sandy drove applications higher earlier this month.
Target, The Gap, and others retail stores posted poor sales numbers, driving their stocks lower. It's a crucial time for retailers, who log a huge chunk of their yearly profits in the weeks running up to the holidays.
Among other companies making news:
Kohl's plunged 12 percent, the biggest drop in the S&P 500 index. The company posted a drop in sales and said stores in the Mid-Atlantic and the Northeast, areas hit by Superstorm Sandy, fared the worst. Kohl's stock lost $6.13 to $45.02.
Kroger Co. rose $1.19 to $26.25 after the supermarket chain reported stronger quarterly profits and raised its earnings outlook for the year. Stronger sales helped the operator of Fred Meyer and Food 4 Less stores post better results than analysts had expected.