U.S. stocks closed near year-to-date highs Friday on low volume ahead of a long holiday weekend and tentative optimism that Greece will get the bailout money it needs to avoid a default.

The combination of upbeat comments from Germany's chancellor, the European Central Bank's decision to swap Greek bonds and Fitch Ratings' decision to raise Iceland's credit rating to investment grade reinforced market sentiment. The absence of fresh saber-rattling from Iran helped.

Merger-and-acquisition developments plus expanding U.S. manufacturing also encouraged risk: TNT Express remained in talks with United Parcel Service on a combination and Caterpillar Inc. said it will build a plant near Athens, Ga.

Here's a look at how the markets reacted:                                                     

Stocks. Global equities closed higher. Within reach of the 13,000 milestone last hit in mid-2008, the benchmark Dow Jones Industrial Average rose modestly to 12,950.10. The wider S&P 500 Index gained 0.25 percent to 1,361.23, near its April peak of 1,363.61, its highest level since June 2008. The tech-focused Nasdaq Composite fell slightly. Britain's FTSE 100 and Japan's Nikkei 225 closed significantly higher.

Bonds. Yields on the benchmark 10-year Treasury climbed back over two percent on optimism that Greece's sovereign debt woes would not infect Spain or Portugal. The yield on the 30-year bond increased to 3.16 percent.

Commodities. Most commodities gained. Light, sweet crude oil for March delivery climbed to its highest mark since May 10 due to supply disruption worries. Europe's benchmark crudeoil, Brent blend, closed slightly lower. Nymex March natural gas futures rose to its highest level in a month, while gold and copper fell.

Currencies. The euro gained on the U.S. dollar which fell against a basket of major rivals. The yen tumbled further on the back of dovish comments from the central bank. Latin American currencies edged higher and the South African rand and Turkish lira, seen as particularly sensitive to risk, climbed.