Budget talks in Washington described as cooperative gave investors reason to believe the economy would not go over the so-called fiscal cliff -- the nickname given to a combination of the scheduled expiration of lower federal income tax rates and spending cuts mandated by law, which could be circumvented with a new budget.
Optimism was held in check Tuesday as technical giant Hewlett-Packard announced the purchase of software firm Autonomy Corp. would include a massive write-down of $8.8 billion due to accounting fraud.
Best Buy shares declined on a loss in the third quarter related to a one-time restructuring charge and, more ominously, a drop in sales.
By close of trading, the Dow Jones industrial average shed 7.45 points or 0.06 percent to 12,788.51. The tech-heavy Nasdaq composite index added 0.61 points or 0.02 percent to 2,916.68. The S&P 500 gained 0.92 points or 0.07 percent to 1,387.81.
On the New York Stock Exchange, 1,710 stocks advanced and 1,325 declined on a volume of 3.1 billion shares traded.
The benchmark 10-year treasury fell 16/32 to yield 1.671 percent.
The euro rose to $1.2814 from Monday's $1.2813. Against the yen, the dollar rose to 81.68 yen from 81.41 yen.
In Tokyo, the Nikkei 225 index slipped 0.12 percent, 10.56 points, to 9,142.64.
In London, the FTSE 100 index added 0.18 percent, 10.44 points, to 5,748.10.
Chipotle plans first price increase in 3 years
Putin thinks Obama would save him if he were drowning