NEW YORK (AP) -- U.S. stocks climbed Thursday 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 Thursday as the controversy didn't 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 percent, to 2,666.94. The Dow Jones industrial average added 238.51 points, or 1 percent, to 24,322.34. The technology-heavy Nasdaq composite advanced 114.94 points, or 1.6 percent, to 7,118.68.
The Russell 2000 index of smaller-company stocks added 7.43 points, or 0.5 percent, 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 Jan. 26 the market has been hit by worries about rising inflation and a potential trade war between the U.S. and China, and big names like Facebook and Amazon have had a rough ride. The S&P is down 7.2 percent in the last three months and the Dow has slumped 8.6 percent.
Facebook surged 9.1 percent 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 percent to $1,043.31. Twitter gained 1.7 percent 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 percent 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.
Amazon jumped 4 percent to $1,517.96. It rose another 6 percent in aftermarket trading as Wall Street was pleased with the online retailer's first-quarter results.
Wren, of Wells Fargo, said that big name technology and consumer-focused stocks have struggled since the market reached its recent highs, but they should continue to do well.
"This cycle isn't over and technology and the consumer discretionary sector are going to continue to participate in the upside (for the market)," he said.
Chipotle Mexican Grill climbed after the company said sales improved in the first quarter, raising hopes that the chain is recovering from repeated food safety scares. The shares rose 24.4 percent to $422.50. They traded as high as $757 in mid-2015.
Bond prices edged higher. The yield on the 10-year Treasury note dipped to 2.98 percent from 3.03 percent.
AT&T fell 6 percent to $33.107 after its profit and revenue fell short of Wall Street estimates, and analysts said its video business struggled. E-commerce company eBay slid 5.6 percent to $38.68 after its first-quarter sales and second-quarter forecast disappointed Wall Street.
Benchmark U.S. crude oil inched up 0.2 percent to $68.19 a barrel in New York. Brent crude, used to price international oils, rose 1 percent to $74.74 a barrel in London.
Oil prices have surged in recent months, driving up fuel costs for many companies. Those expenses were a problem for airlines in the first quarter, as American said its profit fell 45 percent and cut its profit forecast for the rest of the year. Its stock lost 46.4 percent to $42.37.
Wholesale gasoline gained 1.1 percent to $2.11 a gallon. Heating oil rose 1.1 percent to $2.16 a gallon. Natural gas rose 1.3 percent to $2.82 per 1,000 cubic feet.
Gold lost 0.4 percent to $1,317.90 an ounce. Silver fell 0.1 percent to $16.49 an ounce. Copper sank 0.7 percent to $3.11 a pound.
The dollar rose to 109.36 yen from 109.34 yen and the euro dipped to $1.2106 from $1.2175.
France's CAC 40 rose 0.7 percent and the British FTSE 100 and German DAX both added 0.6 percent. Japan's benchmark Nikkei 225 index climbed 0.5 percent and South Korea's Kospi jumped 1.1 percent after Samsung reported better than expected earnings. Hong Kong's Hang Seng lost 1.1 percent.