Stocks were higher on Friday as bullish comments about Greece caused the dollar to fall, resulting in strength in commodity prices.

A weak pending home sales number, which continues a recent trend of disappointing data, helped equities to pare their gains in early trading.

The U.S. dollar index <.DXY> fell 0.6 percent as the euro rose following comments from European Central Bank Governing Council member George Provopoulos, who said Greece could handle its debt if it sticks to its aid program.

The dollar helped lift commodity prices. Oil gained 0.2 percent while gold was up 0.8 percent. The S&P Energy index <.GSPE> rose 0.7 percent while Occidental Petroleum added 2 percent to $107.07. Freeport-McMoRan Copper & Gold Inc rose 1.8 percent to $51.29.

This has been a choppy week for equities, with steep losses early offset by a rally in the past two days. The S&P 500 is down 0.6 percent for the week. Trading volume could be anemic on Friday ahead of Monday's Memorial Day holiday.

The losses early in the week came on worries about euro-zone sovereign debt, as well as concerns that global demand was slowing. While there are few catalysts seen for strong positive advances, technical support suggests there is a floor for stocks.

We're having a little bit of a snap-back rally given the stretch of selloffs we had earlier this week, said Doug Godine, head of institutional sales and trading at Signal Hill Capital in Baltimore. I don't think there will be a lot of volume today, as no one is going to make any huge bets going into the holiday weekend.

The Dow Jones industrial average <.DJI> was up 24.29 points, or 0.20 percent, at 12,427.05. The Standard & Poor's 500 Index <.SPX> was up 3.38 points, or 0.25 percent, at 1,329.07. The Nasdaq Composite Index <.IXIC> was up 6.87 points, or 0.25 percent, at 2,789.79.

Pending home sales slumped 11.6 percent in April, hitting a seven-month low. Analysts were anticipating a drop of 1 percent.

I think people have pretty much given up on housing recovering in the near term, and since the sector contributes such a small amount to the overall economy now, a weak number here won't have a huge impact on stocks, said Maris Ogg, president of Tower Bridge Advisors in West Conshohocken, Pennsylvania.

U.S. consumer sentiment improved in May as job gains offset high gasoline prices, while inflation expectations diminished, according to the final reading by the Thomson Reuters/University of Michigan survey.

The Group of Eight leaders agreed on Friday that the global economic recovery was becoming more self-sustained, though higher commodity prices were hampering further growth.

Medco Health Solutions Inc will lose a major pharmacy benefit contract starting next year. The Blue Cross Blue Shield Association will move its mail order and specialty pharmacy benefit coverage to CVS Caremark under a three-year contract.

Medco shares fell 10 percent to $57.75 while CVS rose 3.2 percent to $39.35.

(Editing by Kenneth Barry)