A choppy session to end a volatile week as investors head out for the weekend with mostly upbeat economic data.
Business activity picked up in May, according to a private survey.
Sales of previously owned homes dropped last month because there weren't enough homes to sell, driving median home prices to a record high.
The Dow gained 123 points on Friday. The S&P 500 slipped 3 and the Nasdaq was down 64.
Ken Kamen of Mercadien Asset Management:
"If you're looking for the negative in the positive is this: people wondering whether that means things are going to overheat and the Fed is going to have to move sooner than most people think. I think the market, for the most part has baked in that the Fed is not going to do anything this year and change their stance. So I think today's activity, we should all just take with a smile and say things continue as they were."
Bitcoin related stocks were big losers after China's Vice Premier Liu He said his government was going to crack down on bitcoin mining and trading. Coinbase, the world's largest publicly traded bitcoin exchange, shed nearly 4 percent. The price of bitcoin has lost about a quarter of its value this week alone.
While many national retailers are getting rid of mask mandates for employees, Gap Inc. is not. The parent of Gap, Old Navy, Banana Republic and Athleta stores said employees will have to continue wearing masks. It also asked customers who are not fully vaccinated to wear masks when shopping. Gap shares were little changed ahead of its quarterly results next week.
Boeing plans to boost output for the 737 MAX by the fall of next year, industry sources told Reuters. Boeing declined to confirm. The comeback for Boeing's fastest-selling jet after two deadly crashes forced a global grounding has been hobbled by safety issues. Boeing closed the day up by more than 3 percent.