By Joe Wallace and Michael Wursthorn

U.S. stocks, from health care to technology to financials, rallied Thursday, giving major indexes a boost as the euphoria in some of the most overheated segments of the market showed signs easing.

All 11 sectors of the S&P 500 rose in recent trading, led by health care stocks and utilities. Some of the gains followed better-than-expected earnings reports from companies such as American Airlines Group, but much of the green that flashed across the stock market was attributed to opportunistic investors willing to pounce on stocks following their biggest pullback since October, analysts said.

The Dow Jones Industrial Average rose 532 points to 30830, while the S&P 500 added 1.6%. The Nasdaq Composite also traded higher, adding nearly 1%. Those gains helped ease losses indexes have suffered throughout the week, with the Dow remaining down just 0.6% over the past four trading days, while the S&P 500 sits on a 0.8% loss.

At the same time, the euphoria surrounding stocks like GameStop and AMC Entertainment showed signs of abating. GameStop shares fluctuated before falling more than 60%, while AMC stock slumped 67%.

Trading around those two stocks and others had captured the attention of Wall Street and Main Street alike. At its core, internet day traders pitted themselves against short-selling hedge funds, driving a parabolic rise in stocks like GameStop. Trading appeared to hit a fevered pitch Wednesday, as more shares changed hands that day than any other since mid-2019.

The stumble in stocks followed a strong start to the year that some investors say had pushed share prices beyond levels justified by corporate fundamentals and created pockets of excessive enthusiasm within segments of the stock market, including in GameStop shares.

Analysts are urging investors to look past those one-off situations and focus on earnings, which have been mostly upbeat. Nearly a third of the S&P 500 has reported results so far, and about 81% have topped analyst's forecasts, according to FactSet data.

"While the behavior of some market participants is reminiscent of historical stock market bubbles," said Mark Haefele, chief investment officer of global wealth management at UBS Group AG, "we don't believe the market as a whole is in a bubble."

Mr. Haefele and other analysts continue to make the argument that stocks continue to trade at attractive valuations relative to interest rates and bond yields, which remain subdued. UBS believes the S&P 500 could eventually close at 4000 by the end of the year, about a 5% gain from current levels.

Quarterly earnings appeared to factor into some of the biggest moves in the stock market on Thursday.

Shares of American Airlines jumped 10% after the airliner reported a narrower loss than what analysts had predicted. Other travel stocks rallied, including United Airlines, up 6.6%, and Carnival, which added 5.9%.

Comcast stock added 5.8% after the company reported growth in its broadband business, pushing results above analysts' forecasts.

Shares of Apple, meanwhile, fell 1.7% after the iPhone maker reported its most profitable three months on record but didn't provide specific revenue guidance for the current quarter.

Tesla dropped 3% after the electric-vehicle maker -- whose shares have soared in recent months -- posted its first full-year profit but missed Wall Street's expectations.

Visa and Mondelez International are scheduled to publish results after the close. Both were recently trading higher.

"It is nerve-racking," said Remi Olu-Pitan, a fund manager at Schroders, referring to the big moves in stocks fueled by day traders swapping tips online.

"You will see more violent pullbacks," she said, adding that Europe's slow progress on vaccines and Covid-19 restrictions in major economies were also weighing on stocks.

Meanwhile, investors parsed the latest releases of economic data. Weekly Applications for unemployment benefits, tracked as an indicator of the health of the labor market, declined last week but remained elevated at 847,000. Separate figures showed gross-domestic product, a broad gauge of the value of goods and services produced in the economy, grew at a 4% annual rate in the final quarter of 2020, slightly slower than economists had expected.

This data came after the Federal Reserve maintained its easy money policies Wednesday, saying that business activity has softened with the resurgence of Covid-19 cases.

In one sign of rising risk aversion, the yield on the benchmark 10-year U.S. Treasury note dropped below 1% for the first time since Jan. 6, before climbing back to 1.047%, according to Tradeweb. Bond yields fall as prices rise. Falling yields are often an indicator that investors see the economic outlook weakening.

Stocks traded mostly lower overseas. The pan-continental Stoxx Europe 600 was mostly flat in recent trading. Hong Kong's Hang Seng dropped 2.6%, the Shanghai Composite Index fell 1.9% and Japan's Nikkei 225 declined 1.5%. Container-shipping giant Cosco Shipping led losses in mainland China, sliding 10%.

Caitlin Ostroff

contributed to this article.

Write to Joe Wallace at Joe.Wallace@wsj.com and Michael Wursthorn at Michael.Wursthorn@wsj.com

(END) Dow Jones Newswires

01-28-21 1215ET