The Dow Jones industrial average broke through 12,000 for the first time in 2 1/2 years Wednesday, but a late fade kept it from closing above that level.
The index of 30 prominent U.S. companies finished the day with a modest gain.
Weak profit forecasts from Boeing Co. and Xerox Corp. weighed on the market. Boeing fell 3 percent after saying its 2011 profits would be hurt by production delays. Xerox fell 8 percent after saying its profit margins were not increasing.
The Dow gained 8.25 points, or 0.1 percent, to end at 11,985.4. It reached as high as 12,020 in morning trading.
The last time the Dow closed above 12,000 was June 19, 2008, just as the financial crisis was worsening.
The Standard and Poor's 500 index rose 5.45, or 0.4 percent, to 1,296.63. The Nasdaq composite index jumped 20.25, or 0.7 percent, to 2,739.50.
Energy and materials companies gained more than 2 percent, the most among the 10 company groups that make up the S&P 500 index.
Investors were pleased with President Obama's calls for lower tax rates on businesses during the State of the Union address late Tuesday, said Jack Ablin, chief investment officer at Harris Private Bank.
"If he can take steps to simplify the tax codes, be it for individuals or corporations, I think it would be a lot easier to do business," Ablin said.
The Federal Reserve said Wednesday afternoon that it was not making any changes to its $600 billion bond-buying program. The plan is meant to encourage borrowing by keeping interest rates low.
The Commerce Department said new home purchases rose 17.5 percent in December compared with November. Despite the strong one-month jump, new home sales for all of 2010 fell to the lowest level on records going back 47 years.
Eastman Kodak Co. fell 18 percent. The company's income fell 95 percent on weaker revenue from its camera business and lower royalties from digital imaging.
The yield on the 10-year Treasury note rose to 3.41 percent from 3.34 percent.
Two stocks rose for every one that fell on the New York Stock Exchange. Consolidated volume came to 4.8 billion shares.