U.S. stocks were modestly higher Thursday, as investors grew hopeful that private sector bondholders are on the verge of accepting a debt swap deal with Greece.

The Dow Jones industrial average (INDU) added 40 points, or 0.3%, the S&P 500 (SPX) gained 7 points, or 0.5%, and the Nasdaq (COMP) rose 12 points, or 0.4%.

Greece is moving closer to finalizing an agreement with its private-sector bondholders on a restructuring of Greece's debt. The agreement is the final hurdle Greece must clear to meet all the conditions of its second €130 billion bailout program from the European Union and International Monetary Fund.