NEW YORK — U.S. stocks ended back where they started Friday as the stock market wrapped up its best quarter in almost five years. Electric car maker Tesla plunged after federal regulators moved to oust CEO Elon Musk following his tweet last month saying that he was close to a deal to take Tesla private.
Health-care companies did better than any part of the market during the third quarter and they continued to rise Friday, while technology companies rose as chipmakers also traded higher. Facebook said it discovered a security breach in which 50 million accounts were accessed by unknown attackers, and its stock fell again, ending its worst quarterly run in six years.
Global banks fell and European stocks skidded after Italy’s new government announced a big increase in spending. Italy’s main stock index fell almost 4 percent as investors worried that the government’s plan will lead to a clash with European Union leaders who want Italy to reduce its debt level.
Through the third quarter, pain in other markets led to gains for U.S. stocks, and that was true again Friday. The S&P 500 rose 7.2 percent, its biggest quarterly increase since the end of 2013.
One reason is that investors are worried about other regions, especially emerging markets. The currencies of Turkey and Argentina both dropped during the quarter and investors worried that their currency and economic problems would harm the rest of the world.
“Investors do pivot to the U.S. when they have concerns about other regions,” said Marina Severinovsky, an investment strategist at Schroders. But emerging markets stocks have bounced back somewhat over the last two weeks, and Severinovsky said they might do better than U.S. stocks in the fourth quarter.
The S&P 500 index inched down 0.02 points to 2,913.98 on Friday. The Dow