Stocks ended higher on Tuesday as solid earnings and a flurry of merger activity underpinned a steady upward trend that reinforced investor optimism for the coming year.

The Dow Jones industrial average <.DJI> added 55.03 points, or 0.48 percent, to 11,533.16. The Standard & Poor's 500 <.SPX> rose 7.53 points, or 0.60 percent, to 1,254.61. The Nasdaq Composite <.IXIC> gained 18.05 points, or 0.68 percent, to 2,667.61.