(AP) -- Technology companies powered U.S. stocks to solid gains Thursday, snapping the market's two-day losing streak.
Banks, consumer-focused companies and industrial stocks also helped lift the market. Even so, the broad gains, which came on the last day of trading ahead of the Easter holiday weekend, weren't enough to make up for the stock market's first quarterly loss since 2015.
After years of slow-and-steady growth and a roaring start to 2018, the market plunged in early February, marking its first 10 percent drop in two years. In the weeks since, the market has been more volatile and trading has frequently turned choppy.
"The equity market is ending the week and the quarter on a positive note, and that's following a quarter that's been volatile and uniformly lackluster," said Terry Sandven, chief equity strategist at U.S. Bank Wealth Management. "We still look for positive trends as we now move into the second quarter, but we think the pace at which equities move will still be muted."
The S&P 500 index rose 35.87 points, or 1.4 percent, to 2,640.87. The Dow Jones industrial average gained 254.69 points, or 1.1 percent, to 24,103.11. The blue chip average was briefly up 465 points. The Nasdaq added 114.22 points, or 1.6 percent, to 7,063.44. The Russell 2000 index of smaller-company stocks picked up 16.40 points, or 1.1 percent, to 1,529.43.
The Dow is down 2.5 percent for the year, while the S&P 500 is off 1.2 percent. The Nasdaq is holding to a 2.3 percent gain.
Sandven said the market's first-quarter performance has tempered expectations for the rest of the year after the market's strong start in January.
"Volatility has ramped up, inflationary pressures are more prevalent, interest rates are on the cusp of change, so that presents a higher level of uncertainty and higher investor angst," Sandven said.
The major indexes were headed higher from the start of trading Thursday as investors sized up several company earnings reports and new government data showing that spending by U.S. consumers rose 0.2 percent in February, while their incomes increased 4.4 percent. The healthy income gains could spur more spending in the coming months.
Technology stocks, which were big decliners earlier in the week, powered much of the market's climb Thursday.
Facebook was among the gainers, its shares adding 4.4 percent. The social media giant, which has taken a beating in recent days over privacy concerns, rose $6.76 percent, to $159.79.
Even with the roller-coaster ride that technology stocks have been on lately, the sector is up 3.2 percent this year, while most other sectors are in the red.
Thursday's run-up in technology stocks signaled that investors believe the sector was oversold in recent weeks, said Sandven, adding that perhaps some it can be explained by some fund managers padding portfolios with stocks to elevate their quarter-end results, what Wall Street calls "window-dressing."
Shares in several companies that reported improved quarterly earnings or outlooks got a boost.
PVH, which owns Calvin Klein and Tommy Hilfiger, climbed $7.41, or 5.1 percent, to $151.43, while beverage maker Constellation Brands rose $7.43, or 3.4 percent, to $222.92.
Solid results and a better-than-expected outlook also gave Movado Group shares a lift. The watchmaker's stock jumped $5.20, or 15.7 percent, to $38.40.
Some companies had a rough day, even after delivering strong quarterly results.
Gamestop slumped 10.8 percent after the retailer issued a disappointing full-year revenue and earnings outlook, which overshadowed fourth-quarter results that beat Wall Street's expectations. The stock slid $1.53 to $12.62.
The fallout from the heightened scrutiny on how social media portals use consumers' personal data weighed on Acxiom shares. The marketing data firm's stock tumbled 19 percent after it disclosed that Facebook would cease using third-party data providers like Acxiom over the next several months. Acxiom said it doesn't expect the move to affect its fiscal 2018 guidance, but noted it expects its total revenue and profitability to be negatively affected by as much as $25 million. Acxiom declined $5.34 to $22.71.
Bond prices rose. The yield on the 10-year Treasury fell to 2.74 percent from 2.78 percent late Wednesday.
Benchmark U.S. crude rose 56 cents to $64.94 a barrel on the New York Mercantile Exchange. Brent crude, used to price international oils, added 74 cents to $70.27 per barrel in London.
In other energy futures trading, heating oil gained 1 cent to $2.03 a gallon. Wholesale gasoline rose a penny to $2.02 a gallon. Natural gas added 4 cents to $2.73 per 1,000 cubic feet.
The dollar fell to 106.50 yen from 106.88 yen on Wednesday. The euro weakened to $1.2306 from $1.2313.
Gold fell $1.40 to $1,322.80 an ounce. Silver rose 2 cents to $16.27 an ounce. Copper added 2 cents to $3.03 a pound.
Germany's DAX added 1.3 percent and France's CAC 40 gained 0.7 percent. Britain's FTSE 100 rose 0.2 percent. In Asia, Japan's Nikkei 225 rose 0.6 percent. South Korea's Kospi added 0.7 percent and Hong Kong's Hang Seng index rose 0.2 percent.
U.S. stock markets will be closed for the Good Friday holiday.