Stocks rose on Thursday as Greece moved closer to concluding a bond swap with private creditors that is needed to stave off a messy default.

The S&P 500 continued to claw back after a string of losses drove the index down more than 2 percent in three sessions. Adding to Wednesday's gains, it is still down slightly for the week.

Athens was on track to secure the deal with its bond holders as part of a financial bailout that has been at the center of investors' concerns globally. Missing a repayment would potentially destabilize the euro zone's financial system, cripple the euro and take down commodity and equity markets.

The market is up on expectations the Greek swap deal will go through, said Quincy Krosby, market strategist at Prudential Financial in Newark. We're seeing short-covering as the signs point to the deal being concluded.

She also said bets against more market gains are being closed before Friday's government payrolls report. The expectation is for a net gain of 210,000 jobs in February.

An unexpected rise in new U.S. claims for unemployment benefits in the latest week was not enough to change perceptions that the labor market was strengthening, a major catalyst in the current stocks rally.

Investors holding at least 61 percent of the more than 200 billion euros in Greek debt have already signed up ahead of the 3 p.m. EST (2000 GMT) deadline for the debt swap. This means Greece has crossed the 50 percent minimum threshold required for a deal and was almost certain to top the two-thirds level needed to enforce losses on any holdouts.

An S&P index of basic materials stocks <.GSPM> shot up 1.5 percent, leading the S&P 500's advance. The Reuters/Jefferies CRB commodities index <.CRB> rose 0.5 percent, shifting into positive mode after four straight down sessions.

The Dow Jones industrial average <.DJI> rose 78.11 points, or 0.61 percent, to 12,915.44. The S&P 500 Index <.INX> gained 12.69 points, or 0.94 percent, to 1,365.32. The Nasdaq Composite <.IXIC> added 30.61 points, or 1.04 percent, to 2,966.30.

Shares of Coach , the luxury leather goods brand and retailer, hit a record high of $78.22 on the overall positive tone of the company's presentation at the Bank of America consumer and retail conference. The stock jumped 5.4 percent to $77.36 in midday trading.

Shares of American International Group Inc fell 2.8 percent to $28.62 after the U.S. Treasury priced its $6 billion AIG offering at $29 a share, allowing the Obama administration to break even on its investment in the insurer as it winds down bailout programs from the financial crisis.

The S&P financial sector <.GSPF> gained 0.9 percent while the KBW insurance index <.KIX> climbed 0.8 percent.

McDonald's Corp fell 3.1 percent to $97.06 after the world's largest hamburger chain reported a smaller-than-expected rise in February sales, weighed down by weakness in Europe and in the Asia-Pacific, the Middle East and Africa.

(Reporting by Rodrigo Campos; Editing by Jan Paschal)