Traders work on the floor of the New York Stock...

Traders work on the floor of the New York Stock Exchange this week. Stocks rose Thursday after Greek leaders agreed to cost-cutting measures that should prevent the country from defaulting on its debt next month. The rally, however, was short-lived. (Feb. 9, 2012) Credit: AP

The stock market finally got a deal in Greece, but it didn't produce much of a rally.

U.S. stocks rose Thursday morning after Greece announced an agreement to cut costs and keep from defaulting on its debt next month, an event that could have shocked the world financial system.

But stocks dropped later in the morning and never returned to their highs for the day.

Analysts cautioned that the market had expected the deal in Greece and warned that Europe still faced problems.

"We still have a lot of wood to chop," said Jeremy Zirin, chief equity strategist at UBS Wealth Management.

The Dow Jones industrial average finished up 6.51 points at 12,890.46. The Standard & Poor's 500 index rose 1.99 to 1,351.95. The Nasdaq composite index climbed 11.37 to 2,927.23.

Earlier in the day, the Dow was as high as 12,924.71, its highest level during a trading day since May 20, 2008. That was also the last day the average traded above 13,000.

In the afternoon, the S&P rose as high as 1,354.32, more than double its level on March 9, 2009, the low for stocks during the Great Recession. It last closed at double the low last July. The Nasdaq is trading at its highest level since December 2000.

Get the latest news and more great videos at NewsdayTV Credit: Newsday

LI impact of child care funding freeze ... LI Volunteers: America's Vetdogs ... Learning to fly the trapeze ... Get the latest news and more great videos at NewsdayTV

Get the latest news and more great videos at NewsdayTV Credit: Newsday

LI impact of child care funding freeze ... LI Volunteers: America's Vetdogs ... Learning to fly the trapeze ... Get the latest news and more great videos at NewsdayTV

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME