Updated from 9:38 a.m.

Stocks edged lower on Friday morning, retreating from records set a day earlier, after disappointing retail sales data was released.

The S&P 500 was down 0.13%, the Dow Jones Industrial Average slid 0.13%, and the Nasdaq fell 0.2%.

A massive rally in crude oil and better-than-expected quarterly performance from the retail space helped to drive the S&P 500 to new highs on Thursday. The S&P 500 closed at 2,185.78, a new record high which beat Friday's record by just a few points. The Nasdaq and Dow also closed at new record highs. It was the first time since 1999 that all benchmark indices closed at records at once.

U.S. retail sales were flat in July, a disappointing read after three months of growth. Analysts had expected sales to climb by 0.4% in July after a revised-upwards reading of 0.8% in June. Auto sales were the biggest driver, climbing 1.1% in July, its strongest since April. Excluding auto sales, retail sales fell 0.3%, well below analysts' estimates of 0.1% growth.

Producer prices came in lower in July as inflation pressures from energy prices continued. The U.S. producer price index fell 0.4% last month compared to an expected 0.1% increase. Excluding food and energy, producer prices came in flat.

Consumer sentiment in August remained elevated, though did not reach the levels analysts expected, according to a preliminary reading from the University of Michigan. The consumer sentiment index increased to 90.4 in August compared to a final reading of 90 in July. Analysts expected the measure to increase to 91.5.

Business inventories increased 0.2% at U.S. companies in June, according to the Commerce Department, in line with analysts' estimates. Business sales rose 1.2% to $1,307.8 billion in June, the biggest gain in more than three years. 

In earnings news, Nordstrom (JWN - Get Report) jumped 8.3% after reporting a better-than-expected second quarter. Earnings of 67 cents a share beat by 11 cents, while revenue fell 1.4% to $3.65 billion, largely in line with consensus.

Planet Fitness (PLNT - Get Report) exceeded analysts' estimates on its top and bottom line over the recent quarter. The gym chain earned 17 cents a share on revenue of $91.47 million, nearly 16% higher than a year earlier. Analysts expected earnings of 15 cents a share on revenue of $85 million. Shares rose 5.8%.

Graphics chipmaker Nvidia (NVDA - Get Report) reported strong earnings on Thursday. The company earned 53 cents a share, breezing past estimates of 37 cents a share. Revenue of $1.43 billion exceeded expectations of $1.35 billion. The company also raised its earnings estimates for the next quarter. Shares were up 2.5%.

J.C. Penney (JCP - Get Report) was up 2% after narrowing its quarterly loss and affirming positive adjusted earnings for the full year. The retailer narrowed its per-share loss to 18 cents, less than a loss of 38 cents a share a year earlier. An adjusted per-share loss of 5 cents was better than an expected loss of 14 cents. Same-store sales increased 2.2%, lower than consensus of 2.4% growth.

Silicon Graphics International (SGI) shot up nearly 30% after Hewlett Packard Enterprise (HPE - Get Report) announced plans to purchase the enterprise hardware developer in a deal worth $275 million. Hewlett Packard Enterprise said the deal would help it expand its big-data analysis business.

BlackBerry (BBRY) was upgraded to outperform from market perform at Raymond James. The firm said its software business can drive solid growth. 

SunPower (SPWR - Get Report) was downgraded to equal-weight from overweight, Morgan Stanley said on Friday. Analysts cited the company's recent reduced guidance tied to its power plant business as reason for the revision.