US stocks climbed today as Facebook led a rally by technology companies.
Most of the market moved higher as interest rates declined from the four-year highs reached over the last few days.
Facebook saw its stock price wither last month after its data privacy scandal, but shares surged on Thursday as the controversy did not appear to affect the social media platform's business in the first quarter.
Other big technology companies like Alphabet and Microsoft also rallied and reversed some of their recent losses.
Strong first-quarter results from companies including Chipotle Mexican Grill and O'Reilly Automotive helped retailers and other consumer-focused companies.
Amazon surged and energy companies also climbed. Stock indexes rose and interest rates decreased after a Commerce Department survey showed business investment decreased in March for the third time in the last four months.
Scott Wren, senior global equity strategist for the Wells Fargo Investment Institute, said investors were happy to see the decline in business investment because it might encourage the Federal Reserve to raise interest rates at a slower clip.
"To me the biggest risk (to the market) is the Fed, and the Fed hiking rates too much, given at least the level of economic growth we expect," he said.
The S&P 500 index jumped 27.54 points, or 1%, to 2,666.94. The Dow Jones industrial average added 238.51 points, or 1%, to 24,322.34. The technology-heavy Nasdaq composite advanced 114.94 points, or 1.6%, to 7,118.68.
The Russell 2000 index of smaller-company stocks added 7.43 points, or 0.5%, to 1,557.89.
Three months ago the S&P 500 and Dow closed at all-time highs. At that time they had repeatedly set records for a year and a half.
But since January 26 the market has been hit by worries about rising inflation and a potential trade war between the US and China, and big names like Facebook and Amazon have had a rough ride. The S&P is down 7.2% in the last three months and the Dow has slumped 8.6%.
Facebook surged 9.1% to $174.16 after the company's advertisers appeared to shrug off the Cambridge Analytica privacy scandal. Facebook said its revenue jumped and there were few signs users or advertisers were abandoning the company since the scandal broke in mid-March.
Alphabet, Google's parent company and the only digital publisher larger than Facebook, rose 2% to $1,043.31. Twitter gained 1.7% to $30.27.
Facebook has faced a backlash about how it collects and uses data since the revelation that Cambridge Analytica, a data mining firm linked to the Trump campaign, had gained information on up to 87 million of its users.
Facebook stock is down 5.9% since then, and other technology companies have also stumbled as investors worried about the possibility that the government would start regulating them more harshly, which could affect their profits.