index

By Mark Decambre &Anora Mahmudova, Market Watch—

U.S. stocks ended sharply higher Tuesday with the main indexes posting their second-largest daily gains of the year.

Stocks rebounded from last week’s rout as investment funds repositioned their portfolios in the wake of the Labor Day holiday and market participants were cheered by rising expectations for additional economic stimulus measures by Chinese authorities.

The S&P 500 SPX, +2.51% closed 48.19 points, or 2.5%, higher at 1,969.41, with all 10 main sectors finishing sharply higher. Among the 502 issues on the S&P 500, only 11 ended in negative territory. Health-care and technology sectors led the gain, advancing 2.9% and 2.8%, respectively.

The Dow Jones Industrial Average DJIA, +2.42% jumped 390.30 points, or 2.4%, to 16,492.68, with all of its 30 components closing in positive territory, led by General Electric GE, +4.00% up 4% on news that European Union is set to approve its $17 billion acquisition of Alstom SA’s ALO, +1.40% power business.

The Nasdaq Composite COMP, +2.73%  ended the day up 128.01 points, or 2.7% at 4,811.93, with biotechnology stocks leading the gains. The iShares Nasdaq Biotechnology ETF IBB, +4.35%  rose 4.4%.

Advances by U.S. stocks followed gains in Europe and Asia as weak export data in China, released overnight, fueled bets that Beijing might be inspired to implement further measures to boost the country’s sluggish economy.

Ian Winer, managing director of equity trading at Wedbush Securities, said stocks were buoyed by macro hedge funds, which take long and short bets on stocks, currencies and bonds. Winer said traders unwinding short bets that stocks and markets would fall in value boosted the market amid otherwise lackluster trade.

“Individual stock volumes and the volume in the market overall aren’t that great,” he said.

Tuesday’s gains follow sharp losses the previous week, when the main indexes suffered their second-biggest weekly decline in 2015.

Some investors attributed the updraft in stocks Tuesday to an improved mood on Wall Street after the holiday in China and in the U.S. The U.S. stock market was closed Monday for Labor Day.

“Investors who took some risk off the table last week when China’s markets were closed for two days came back on Tuesday to rallying markets in Europe and Asia, which helped sentiment,” said Colin Cieszynski, chief market strategist at CMC Markets.

Cieszynski warned that despite Tuesday’s rally, markets are likely to remain turbulent for the next several weeks, when trading is mostly driven by sentiment, rather than fundamentals, especially ahead of the Federal Reserve policy meeting on Sept. 16-17.

Movers & shakers: Shares of Teco Energy TE, +25.01%  surged 25% after Emera Inc. agreed to buy the company for $6.5 billion in cash.

Shares of E-Trade Financial Corp ETFC, +7.49%  jumped 7.5% after the company announced a restructuring plan to eliminate all of the $4.4 billion of wholesale funding obligations from its bank balance sheet by the end of the quarter.

Apple Inc. AAPL, +2.78%  rose 2.8% a day before the tech giant is expected to unveil its iPhone 6S and iPhone 6S Plus models at its Sept. 9 hardware event.

Other markets: Expectations for further monetary easing by China helped prop up markets in Asia on Tuesday, where the Shanghai Composite Index SHCOMP, +2.92%  closed 2.9% higher.

Also on Tuesday, Chinese stock market regulators revealed plans to introduce a “circuit breaker” mechanism for its stock exchanges, aimed at preventing panic selloffs during heightened volatility.

European stocks closed sharply higher after data showed rising exports propelled Germany’s trade balance to a record surplus in July.

Oil futures CLV5, -0.41%  settled slightly lower, down 0.2% at $45.94 a barrel. Gold GCZ5, +0.15%  settled a fraction lower at $1,121 an ounce, while the ICE dollar index DXY, +0.09%  fell 0.1%.

—Sara Sjolin contributed to this article.