NEW YORK, Nov 28 (Reuters) - U.S. stocks sharply pared losses on Wednesday after U.S. House Speaker John Boehner said he was optimistic that a deal on the “fiscal cliff” to avert large tax hikes and spending cuts could be reached.

After falling nearly 1 percent, the S&P 500 pared losses to trade near flat after Boehner said that Republicans were willing to put revenues on the table if Democrats agreed to spending cuts.

For weeks now, the market has been swinging back and forth on headlines out of Washington regarding the ongoing U.S. budget talks.

Later in the day, President Barack Obama will meet at the White House with chief executives from top corporations including Goldman Sachs, Deloitte LLP, and Caterpillar Inc, to discuss U.S. fiscal problems.

“While there’s little that the president and vice president could do at today’s meeting to improve moods in America’s corner office, we still believe a legislative compromise will be reached before ‘fiscal cliff’ detonates,” said Jack Ablin, chief investment officer at BMO Private Bank.

One possible result of the deficit reduction talks is a rise in the tax rate on dividends, prompting some firms to issue special dividends or move up plans for dividends.

The latest example is retailer Costco Wholesale Corp , which said it will pay a special $3 billion dividend to investors. The company posted monthly same-store sales that beat forecasts. The stock rose 4.7 percent to $101.07.

The Dow Jones industrial average was up 3.38 points, or 0.03 percent, at 12,881.51. The Standard & Poor’s 500 Index was down 1.73 points, or 0.12 percent, at 1,397.21. The Nasdaq Composite Index was down 5.10 points, or 0.17 percent, at 2,962.69.

Earlier, the S&P 500 fell nearly 1 percent on data that showed U.S. single-family home sales fell in October, casting a shadow over what has been one of the brighter spots in the U.S. economy.

Knight Capital Group Inc shares jumped 10 percent to $3.27 on news that Getco LLC has sent a proposal for a merger between Getco and Knight Capital at a price of $3.50 per share, according to a regulatory filing.