Stocks closed mixed Tuesday, with the Standard & Poor's 500 index near its average price for the past 50 days, as a rally in energy companies and oil overshadowed semiconductor declines.

At the close on Wall Street, the major indexes, which had been up and down, were mixed. The Dow Jones industrial average was up 59.7 points, about 0.3 percent, at 18,036.7. The Standard & Poor's 500 index was up 3.4 points, about 0.2 percent, at 2,095.8. The Nasdaq composite was down nearly 11 points, about 0.2 percent, at 4,977.3.

advertisement | advertise on newsday

As the markets closed, benchmark U.S. crude was up $1.38 at $53.29 a barrel on the New York Mercantile Exchange.

"The market will go as earnings go for the next couple of weeks," said analyst Terry Morris, a senior equity manager who helps oversee about $2.8 billion at National Penn Investors Trust Co., based in Wyomissing, Pennsylvania. "The market wants to see some sales growth, but we haven't seen it yet."

Sales at U.S. retailers rose less than forecast in March after being depressed by harsh winter weather, signaling consumers are intent on not overextending themselves. Purchases increased 0.9 percent, the first gain in four months, after a 0.5 percent drop in February, U.S. Commerce Department figures showed. The median forecast of 87 economists surveyed by Bloomberg called for a 1.1 percent advance.

A separate report showed that U.S. wholesale prices climbed in March for the first time in five months, reflecting higher costs for fuels and motor vehicles.

A pickup in wholesale costs that filters through to consumers would help reassure Federal Reserve policymakers that inflation will advance toward their goal. At the same time, a rising dollar and limited growth overseas may hamper efforts by American companies to be more aggressive in raising prices.