US Markets

Stocks close mildly higher amid retail sales, Greece news

Pisani: Retail sales in line
VIDEO1:0501:05
Pisani: Retail sales in line
Europe closes slightly higher with Greece still in focus
VIDEO1:4501:45
Europe closes slightly higher with Greece still in focus
Greek bailout talks stopped: IMF
VIDEO1:1601:16
Greek bailout talks stopped: IMF

U.S. stocks closed slightly higher on Thursday, extending the prior day's rebound, as negative news out of Greece counterbalanced a good retail sales report. (Tweet This)

In mid-morning trade the International Monetary Fund spokesman said there were "major differences" with Greece on aid negotiations and that the IMF team has left Brussels, where the talks were held, Reuters said.

The news pressured stocks, with the Dow Jones industrial average closing about 40 points higher, off earlier gains of 100 points. The Nasdaq Composite also briefly fell into negative territory in midday trade. The major indices opened higher on signs consumer spending was picking up and hopes that Athens was close to a resolution with its creditors.

"I do think the Greece situation just continues to be a little of a headwind," said Ben Pace, chief investment officer at HPM Partners.

European stocks pared gains from earlier hopes of a Greece deal, with the DAX closing 0.6 percent higher after earlier rising 1.5 percent. The ATHEX Composite ended 8.16 percent higher. European officials had said there was a "good chance" of a deal ahead of the euro group meeting next week.

Greece's Prime Minister, Alexis Tsipras, and European Commission President Jean-Claude Juncker ended talks on the debt negotiations without coming to a resolution. A European Union diplomat told Reuters the discussion was a "last attempt" to reach a deal, while Dow Jones reported that Juncker said in a statement that he held an "important, friendly and constructive meeting" with Tsipras.

Analysts remained optimistic that Greece would come to a deal with its creditors.

"We used a lot of the internal energy in yesterday's moonshot," said Jeffrey Saut, chief investment strategist at Raymond James. "I think Greece is not impactful. ... I think there's going to be a solution on Greece. They're not going to pull out."

U.S. stocks bounced on Wednesday, closing more than 1 percent higher amid some encouraging signs on talks between Greece and its creditors on a cash-for-reform deal.

Transports continued to recover on Thursday, rising 1 percent, with railroads leading the way higher as CSX shot up 3 percent.

"I think in general (retail sales was) spot on and it will keep the rally going," said Marc Chaikin, CEO of Chaikin Analytics. "I think we're going to break out to new highs."

showed an increase of 1.2 percent, with the ex-autos figure up 1 percent. April retail sales were revised upward to 0.2 percent from flat.

"The revision for the previous flat month, up 0.2 percent, makes it slightly more positive than previously thought," said Peter Cardillo, chief market economist at Rockwell Global Capital.

Economists polled by Reuters forecast retail sales rose 1.1 percent month-on-month and 0.7 percent excluding autos.

"With three positive retail sales numbers, the trend is starting to improve," said Robin Anderson, senior economist at Principal Global Investors.

Weekly jobless claims totaled 279,000, slightly above expectations. showed an increase of 0.4 percent, the largest gain in nearly a year. Retail inventories excluding autos, which go into the calculation of GDP, rose a solid 0.6 percent in April.

The Atlanta Fed raised its GDPNow model forecast for real GDP growth in the second quarter to 1.9 percent from last Wednesday's 1.1 percent estimate.

Treasury yields extended losses after earlier trading just below recent multi-month highs, with the 10-year yield falling about 10 basis points to trade below 2.40 percent. The German 10-year bund yield fell below 0.9 percent after crossing 1 percent on Wednesday for the first time since September.

The 30-year bond yield traded near 3.10 percent after a $13 billion auction at a high yield of 3.138 percent.

"I think that part of that (pullback in yields) is due to some of the news that came out of Greece," said Kevin Mahn, chief investment officer at Hennion & Walsh Asset Management.

Shorter-term yields traded flat, with the at 0.73 percent.

"The front end remains focused on strong data which puts a September rate move by the Fed on track," said Brandon Swensen, co-head of the fixed-income desk at RBC Global Asset Management. "In this environment, volatility will remain a dominant theme in our view."

Read MoreHow the Fed screwed up the bond market

The U.S. dollar extended gains against the euro, which held near $1.12.

Investors also looked ahead to next week's U.S. Federal Reserve meeting, which is not expected to change the consensus view for a September rate hike.

Major U.S. Indexes


On the corporate front, Nike gained 0.5 percent on news the athletic apparel and footwear maker signed an , starting in 2017. Terms were not disclosed.

Rupert Murdoch, the 84-year old CEO and controlling shareholder of Twenty-First Century Fox, is preparing to step down as CEO of the media giant and hand that title to his son James, according to numerous sources close to the Murdoch family. Shares of Twenty-First Century Fox lost 0.2 percent and News Corp. closed about 0.5 percent lower.

Facebook closed down 0.40 percent after its .

Amazon.com closed half a percent higher. The European Commission has opened a formal probe into the online retailer's e-book business, focusing on agreements between Amazon and publishers. Regulators are focusing on clauses that require them to offer Amazon terms that are at least as good as those offered to competitors.

Krispy Kreme surged nearly 14 percent after it reported earnings tha beat estimates by 2 cents with adjusted quarterly profit of 24 cents per share, though revenue fell slightly short. Comparable store sales for the doughnut chain were up 5.2 percent during the quarter, amid improving profit margins.

JetBlue ended 0.6 percent higher after reporting its "load factor" for May at 85.7 percent, an improvement of 0.5 percent from a year earlier.

Read MoreEarly movers: GE, GOOG, AMZN, NKE, M, HOG, JBLU & more

The Dow Jones Industrial Average closed up 38.97 points, or 0.22 percent, at 18,039.37, with UnitedHealth leading gainers and Chevron the greatest decliner.

The closed up 3.66 points, or 0.17 percent, at 2,108.86, with utilities leading seven sectors higher and energy the greatest laggard.

The Nasdaq closed up 5.82 points, or 0.11 percent, at 5,082.51.

The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, traded below 13.

About three stocks advanced for every two decliners on the New York Stock Exchange, with an exchange volume of 785 million and a composite volume of 3.1 billion in the close.

Crude oil futures for July delivery settled down 66 cents, or 1.07 percent, at $60.77 a barrel on the New York Mercantile Exchange. Gold futures ended down $6.20 at $1,180.40 an ounce.

The supply of oil from the Organization of Petroleum-Exporting Countries (OPEC) in May reached its highest level since August 2012, the International Energy Agency (IEA) said in a report published on Thursday.

—CNBC's Peter Schacknow contributed to this report.

On tap this week:

Thursday

Earnings: Restoration Hardware, Korn Ferry, Casey's General, ExOne

Friday

8:30 a.m.: PPI

10 a.m.: Consumer sentiment

More From CNBC.com: