The major U.S. stock indexes were mixed at the close Friday, weighed down by new data showing retail sales and producer prices came in weaker than expected in July. Materials companies were down the most, while energy companies led the gainers as the price of oil headed higher.

The market was coming off records set by the three major stock indexes a day earlier.

advertisement | advertise on newsday

ON WALL STREET: At the close, the Dow Jones industrial average was down nearly 37.1 points, about 0.2 percent, at 18,576.5. The Standard & Poor’s 500 index was off 1.7 points, about 0.08 percent, at 2,184.1. The Nasdaq composite index, however, gained 4.5 points, about 0.09 percent, to nearly 5,233.

OIL PRICES: About the same time, benchmark U.S. crude was up $1.23 at $44.72 a barrel on the New York Mercantile Exchange. In London, the oil used to price international oils, Brent crude, was up $1.17 at $47.21 a barrel.

ECONOMIC DATA: The Commerce Department said that U.S. retail sales held steady in July from the previous month, as U.S. consumers spent less at grocery stores, clothing shops, sporting goods and electronics and appliance outlets. Those declines were offset by big increases in auto sales and online and catalog sales. Separately, the Labor Department said producer prices posted the biggest drop last month since September, pulled down by tumbling energy, clothing and food prices. Inflation remains modest at both producer and consumer levels.

ANALYST’S OPINION: “It’s very understandable that people are not particularly keen to rush into buying at these historically high levels,” said analyst Erik Davidson, chief investment officer at Wells Fargo Private Bank. “Add in this economic data that leans to the weaker side and it’s not surprising that the market is off a little bit.”