Stocks rose 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 S&P 500's close is on the cusp of closing levels not seen since before Lehman Brothers collapsed in September 2008, an important psychological barrier for investors at 1,255.08.

Financials led the way higher, continuing their December rally after underperforming the broader market for much of the year. The KBW bank index <.BKX> jumped 1.9 percent.

Fund managers have been reallocating cash to equities from fixed income and reduced cash positions.

We've been putting risk at work for some period of time and we think people will continue to regret holding too much cash and being too conservatively positioned, said Bob Browne, chief investment officer at Northern Trust in Chicago.

Northern Trust, which has $657 billion in assets under management, recently reduced its cash allocation and increased investments in U.S. large cap equities and fixed income.

If you take a balanced view of the positives and the negatives short term and long run, we think it gets you to an overweight position in equities, said Browne.

Adobe Systems Inc jumped 6 percent to $30.93 after it gave an upbeat forecast, while coal miner Massey Energy Co rose on expectations the company was lining up potential buyers. Massey gained 1.2 percent to $52.45.

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

The S&P 500 notched another two-year high. The index has rallied 6.3 percent for the month and is up 12.5 percent for the year.

The S&P 500, which has gained in each of the last three weeks, broke through the 61.8 percent Fibonacci retracement of the 2007-2009 bear market slide earlier this month.

Technicians said the next stop is the 76.4 percent retracement at 1,362. The exponential Relative Strength Index (RSI), though, suggests the S&P may be overbought in the short term. The RSI provides a measure of higher closes to lower closes over a given trading period and is closely watched by traders.

Elsewhere on the earnings front, electronics manufacturer Jabil Circuit Inc surged 10.7 percent to $19.55 after it reported better-than-expected quarterly profit and forecast a robust second quarter.

American International Group Inc gained 3.3 percent to $55.18 after officials briefed on the situation told Reuters the U.S. government plans to sell a large piece of its stake in the company in two stock offerings next year.

In other individual movers, Martek Biosciences Corp spiked up 35.6 percent at $31.67 after Dutch group DSM , the world's largest vitamins maker, agreed to buy the maker of U.S. baby food ingredients.

(Additional reporting by Rodrigo Campos, Editing by Chizu Nomiyama)