By Kate Gibson, MarketWatch

NEW YORK (MarketWatch) -- U.S. stocks opened higher on Tuesday, with the S&P 500 continuing its longest stretch of gains since mid-July, after positive economic data from China and indications that U.S. military action against Syria might be averted.

"The markets are right now breathing a sigh of relief that we're moving closer to a diplomatic solution as opposed to a military solution in Syria," said Darrell Cronk, regional chief investment officer for Wells Fargo Private Bank. "Any military solution would cause some angst" by creating uncertainty as to its scale and duration, Cronk said.

"Overnight we had really strong economic data out of China, both their industrial production numbers and their retail-sales numbers were up double digits over year-ago numbers. That has Asian markets up nicely," Cronk added of reports from Beijing's National Bureau of Statistics.

The data had China's industrial output rising 10.4% in August from a year ago and retail sales gaining 13.4%. Wall Street finished higher on Monday after China reported exports growth that surpassed expectations.

On Tuesday, the Dow Jones Industrial Average (DJI) added 64.78 points, or 0.4%, to 15,127.93.

The makeup of the blue-chip index will change dramatically as of the open on Sept. 23, with Goldman Sachs Group Inc. (GS) replacing Bank of America Corp. (BAC), Visa Inc. (V) replacing Hewlett-Packard Co. (HPQ), and Nike Inc. (NKE) bumping Alcoa Inc. (AA), S&P Dow Jones Indices said on Tuesday.

Shares of Hewlett-Packard and Alcoa fell on the news, with the former off 1.8% and the latter down 1%, while Bank of America was up 0.4%.

Goldman Sachs rose 3.2%, Visa gained 1.9% and Nike advanced 1.8%.

"The Dow is going to look and act very differently going forward. Leaving aside Nike and Hewlett-Packard, you've replaced two stocks that essentially don't matter in Alcoa and Bank of America with two that do," said Dan Greenhaus, chief market strategist at BTIG LLC, in emailed commentary.

The S&P 500 index (SPX) rose 7.72 points, or 0.5%, to 1,679.40.

The Nasdaq Composite (RIXF) climbed 15.06 points, or 0.4%, to 3,721.24.

For every share falling, roughly two rose on the New York Stock Exchange, where 77 million shares traded as of 9:40 a.m. Eastern.

Composite volume neared 284 million.

Apple Inc. (AAPL) fell 0.8% as the consumer-technology company readied to reveal its new iPhone models. Follow streaming coverage of Apple.

Subscribe to WSJ: http://online.wsj.com?mod=djnwires

HP (NYSE:HPQ)
Historical Stock Chart
Von Jun 2024 bis Jul 2024 Click Here for more HP Charts.
HP (NYSE:HPQ)
Historical Stock Chart
Von Jul 2023 bis Jul 2024 Click Here for more HP Charts.