Stocks rose on Tuesday, with the Dow briefly topping 13,000 for the first time since May 2008 after Greece secured a bailout to avoid a March default, but gains were limited as investors had priced in expectations of a deal.
Signs of improvement in the economy and stabilization of Europe's debt crisis have driven the Dow more than 20 percent since late last year, while the S&P has climbed more than 8 percent so far this year.
Euro zone finance ministers agreed on a 130-billion-euro ($172 billion) rescue for Greece to avert an imminent chaotic default after forcing Athens to commit to unpopular cuts and private bondholders to take bigger losses.
This is the most solid agreement Greece has had, with actual money behind it, and that makes the market optimistic, said Phil Flynn, senior market analyst at PFG Best in Chicago.
Even with the bailout, Greece faces a long road to economic recovery. European Union officials said the Greek economy will only return to growth in 2014 after a recession that will shrink output by 17 percent.
If you say this is definitely the end of the story, then that shows you're not familiar with the history of the issue, Flynn said. We're cautious optimistic, but we're not likely to move significantly higher from this point since we've rallied going into it.
The Dow Jones industrial average <.DJI> was up 47.72 points, or 0.37 percent, at 12,997.59. The Standard & Poor's 500 Index <.SPX> added 5.46 points, or 0.40 percent, at 1,366.69. The Nasdaq Composite Index <.IXIC> rose 10.60 points, or 0.36 percent, at 2,962.38.
Wal-Mart Stores Inc
Home Depot Inc
The Morgan Stanley retail index <.MVR> rose 0.2 percent. The S&P retail index <.RLX>, which excludes Wal-Mart, gained 0.8 percent.
Kraft Foods Inc
Earnings season continued to wind down this week, with 59 companies scheduled to report. According to Thomson Reuters data through Tuesday morning, of the 418 companies in the S&P 500 that have reported earnings, 64 percent have topped analyst expectations.
(Reporting By Ryan Vlastelica; editing by Jeffrey Benkoe)