A Wall Street sign stands near the New York Stock...

A Wall Street sign stands near the New York Stock Exchange, Wednesday, July 8, 2015, in Manhattan. Credit: AP / Bebeto Matthews

Stocks are closed with slight gains Thursday, a retreat from the higher numbers earlier in the day as investors seemed to think that last-ditch talks will produce an agreement between Greece and its creditors.

At the close on Wall Street, the Standard & Poor's 500 index was up 4.6 points, about 0.2 percent, at 2,051.3. The Dow Jones industrial average added 33.2 points, about 0.2 percent, to 17,548.6. The Nasdaq composite gained 12.6 points, about 0.3 percent, to 4,922.4.

European markets closed with bigger gains. Chinese stocks rose sharply overnight after the government's latest efforts to halt a plunge.

The New York Stock Exchange said a four-hour outage in its trading systems Wednesday was caused by problems with a software upgrade.

As markets closed, the price for the Aug. 15 contract for U.S. benchmark crude oil rose $1.22 to $52.86 a barrel on the New York Mercantile Exchange. Bond prices fell. The yield on the 10-year Treasury note rose to 2.30 percent.

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

Power bills may increase ... What's up on LI ... Plays of the week ... Get the latest news and more great videos at NewsdayTV

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

Power bills may increase ... What's up on LI ... Plays of the week ... Get the latest news and more great videos at NewsdayTV

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME