The stock market ended higher Thursday after flipping between small gains and losses throughout the morning. Uncertainty about the "fiscal cliff," just days away, was top of mind for many traders.

The Republican-controlled House pushed ahead with a bill aimed at averting the fiscal cliff, but President Barack Obama has threatened to veto it and Democratic leaders in the Senate vowed to let it die.

House Speaker John Boehner (R-Ohio) later canceled the vote, and issued a statement late Thursday saying, "The House did not take up the tax measure today because it did not have sufficient support from our members to pass. Now it is up to the president to work with Reid on legislation to avert the fiscal cliff."

Many traders expected that Republicans and Democrats wouldn't reach an agreement before Christmas. The political haggling kept markets muted, and trading volume was low.

"Every time someone makes a speech, you get another move in the market," said Ben Fischer, founder and managing director of NFJ Investment Group in Dallas.

The Dow Jones industrial average fell as much as 36 points before ending the day higher, rising 59.75 points to close at 13,311.72. The Standard & Poor's 500 rose 0.55 percent to 1,443.69. The Nasdaq composite index rose 0.20 percent to 3,050.39.

For many traders the big news was that NYSE Euronext, the parent of the New York Stock Exchange, planned to sell itself to IntercontinentalExchange.

advertisement | advertise on newsday

NYSE Euronext's stock surged $8.20 to $32.25. IntercontinentalExchange shares rose $1.79, or 1.40 percent, to $130.10.