Stock indexes finished mostly higher after a day of bouncing around as retailers, energy companies and banks recovered some of their losses from the day before, but technology companies struggled as Facebook dropped again.
Amazon led a rally among retailers, and it passed Alphabet, Google's parent, as the second most-valuable US-listed company, while energy companies rose with oil prices.
Banks rose along with interest rates as the leaders of the Federal Reserve met. They are expected to raise interest rates on Wednesday.
Facebook sank following reports that the Federal Trade Commission will investigate its handling of user data while authorities in the US and UK demanded answers from the company.
That came after reports that Cambridge Analytica, a data mining firm working for President Donald Trump's campaign, improperly obtained data on 50 million Facebook users without their permission.
While Facebook stock regained a portion of its losses at the end of the day, it has fallen more than 9% this week.
Social media companies Twitter and Snap also fell as investors considered the possibility that the government will pass new laws affecting their businesses.
"We don't know what's in store for an industry that isn't really regulated," said Samantha Azzarello, global market strategist at JPMorgan Exchange Traded Funds.
After a drop of 1.4% on Monday, the S&P 500 index rose 4.02 points, or 0.1%, to 2,716.94.
The Dow Jones industrial average gained 116.36 points, or 0.5%, to 24,727.27. The Nasdaq composite rose 20.06 points, or 0.3%, to 7,364.30. The Russell 2000 index of smaller-company stocks dipped 0.16 points to 1,570.41.