NEW YORK (Reuters) - U.S. stocks ended little changed on Friday, though Amazon.com's deal to buy upscale grocer Whole Foods Market pressured a wide range of companies including Wal-Mart, while the dollar and U.S. Treasury yields dipped after disappointing economic data.
Energy shares offset the declines in consumer names, with the S&P energy index .SPNY rising 1.7 percent and oil prices ending higher on the day.
The Amazon deal sent shockwaves through the food distribution market and others, hurting stocks like Wal-Mart Stores (WMT.N), which slid 4.7 percent, grocer Kroger (KR.N), which tumbled 9.2 percent, and Costco Wholesale (COST.O), which fell 7.2 percent.
The S&P 500 consumer staples index .SPLRCS ended down 1 percent.
"It's disrupting a number of industries here, and that's what's causing the market problems," said Bruce Bittles, chief investment strategist at Robert W. Baird & Co in Sarasota, Florida.
The Dow Jones Industrial Average .DJI was up 24.38 points, or 0.11 percent, to end at 21,384.28, the S&P 500 .SPX added 0.69 point, or 0.03 percent, to 2,433.15 and the Nasdaq Composite .IXIC dropped 13.74 points, or 0.22 percent, to 6,151.76.
MSCI's index of stock markets across the world .MIWD00000PUS rose 0.3 percent, while European shares .FTEU3 added 0.6 percent, rebounding from recent losses.
In the foreign exchange market, the U.S. dollar .DXY fell against a basket of key currencies after the day's data, which raised concerns about spending. It was last down 0.3 percent after the day's data.
U.S. homebuilding fell for a third month in May to the lowest in eight months as construction activity declined broadly, while the University of Michigan said its barometer of U.S. consumer sentiment unexpectedly fell in early June.
The Japanese yen JPY= rose against the dollar, reversing course after sliding to a two-week low, when the Bank of Japan left its mass money printing programme unchanged, maintaining the contrast with the Federal Reserve, which signalled further tightening this week.
The weaker-than-expected U.S. data also weighed on U.S. Treasury yields as it fuelled uncertainty about the U.S. rate outlook.
Benchmark 10-year Treasuries US10YT=RR were last up 2/32 in price to yield 2.155 percent, compared with 2.162 percent late Thursday.
"There are some very serious concerns about the Fed tightening right now and about the Fed reducing their balance sheet right now. We're potentially prompting a recession here," said Stephen Massocca, senior vice president at Wedbush Securities in San Francisco.
Oil prices staged a modest rebound as some producers reduced exports and U.S. rig additions slowed.
Brent crude futures LCOc1 rose 45 cents to settle at $47.37 per barrel, while U.S. crude CLc1 settled at $44.74, up 28 cents. Both benchmarks notched a weekly loss exceeding 1.6 percent.
Additional reporting by Sam Forgione and Richard Leong in New York, Marc Jones in London and Nichola Saminather in Singapore; Editing by Bernadette Baum and James Dalgleish