By Alexandra Scaggs 

U.S. stocks rose Tuesday, putting the S&P 500 and the Nasdaq on track for October gains, as riskier corners of the market led benchmarks higher.

The Dow Jones Industrial Average gained 125 points, or 0.7%, to 16943. The S&P 500 added 17 points, or 0.8%, to 1978, on pace to gain 0.3% for October. The Nasdaq Composite Index rose 67 points, or 1.5%, to 4553, on track for a 1.3% monthly advance.

Investors were moving back into areas that are seen as riskier, traders said, after they had fled some of those sectors during steep stock-market declines earlier this month. Small-cap stocks, energy shares and technology stocks posted the strongest gains, and safe-haven investments such as Treasurys and utility stocks declined. Traders said that investors were feeling more confident after stronger-than-expected corporate earnings reports and an upbeat reading on consumer confidence.

"The tunnel vision is off...once your scope gets bigger, the fear subsides over this recent downturn in the market," said Jonathan Corpina, senior managing partner at brokerage firm Meridian Equity Partners.

A rally in so-called momentum stocks outpaced the broader market's rise. The small-cap Russell 2000 Index, which has trailed broader benchmarks in recent months, rallied 2.3%. The Nasdaq was bolstered by an advance in biotechnology and social-media stocks, with the Nasdaq Biotechnology Index advancing 0.8%.

"People have woken up to the fact that maybe global growth isn't going to collapse," said Mark Luschini, chief investment strategist for Janney Montgomery Scott, which helps oversee $58 billion in assets. He added that short-term investors had bet on further declines in some of those riskier sectors and traders could be unwinding those bets.

Among large-cap stocks, two sectors that set the early-October declines led benchmarks higher. The Dow Jones Transportation Average jumped 1.1%, reaching a record high intraday. Energy shares were the biggest gainers in the S&P 500, advancing 1.8%. The sector has struggled over the last three months, down 14% compared with the S&P 500's 0.1% decline. But all year, investors have been steadily sending money into State Street's Energy Select Sector SPDR Fund, said Mike Arone, State Street Global Advisors' chief investment strategist for financial advisers.

"There is anticipation that if the economy continues to do well, if Europe can recover... energy prices will pick up," said Mr. Arone. "That is bolstering flows into the stocks."

Investors are now looking ahead to a statement from the Federal Reserve, due out Wednesday at the end of its two-day meeting. The central bank is expected to end its bond-buying program, but traders say they will be closely watching the central bank's outlook for short-term interest rates.

An upbeat reading on consumer confidence outshined a surprise decline in durable-goods orders. Consumer confidence rose to 94.5 in October, according to the Conference Board, while a slide to 87.9 was expected. Orders for durable goods fell 1.3% in September, marking the second consecutive month of declines. A rise of 0.7% was expected.

Third-quarter earnings from companies have been better than expected in recent sessions. With 213 companies reporting, the S&P 500 is on pace to grow earnings 5.6% in the third quarter, according to FactSet, above the 4.5% expected before the start of reporting season.

"Even with European [economic] data deteriorating, these companies' earnings are able to keep grinding higher," said Michael Purves, chief global strategist at Weeden & Co. "That's a very important sign here."

On Tuesday, Pfizer Inc. reported third-quarter results that beat analysts' estimates and tightened its profit and revenue outlook for the year. Still, shares slipped 0.2%.

DuPont Co. said earnings jumped 52% in its third quarter on lower expenses. While that beat Wall Street's forecasts, the chemical company's shares lost 0.1%.

A broad advance in European stocks helped set a positive tone early in the session. The Stoxx Europe 600 gained 1%.

In other economic news, a report on home prices in 20 U.S. cities from S&P/Case-Shiller showed a rise of 5.6% in August, while economists forecast a rise of 5.7%. A report on manufacturing in the mid-Atlantic region beat forecasts, as the Federal Reserve Bank of Richmond's manufacturing index rose to 20 in October, while a slide to 10 was expected.

In commodity markets, crude-oil futures gained 0.5% to $81.35 a barrel. Gold futures slipped 0.1% to $1228.50 an ounce.

Demand for safe-haven U.S. government debt declined, pushing the yield on the 10-year Treasury note up to 2.277% from 2.257% on Monday.

In other earnings news, Aetna Inc. lifted its earnings outlook for the year and reported third-quarter results that beat expectations. But shares fell 2.8%. The stock is up 12% so far this year.

Twitter Inc. said Monday it added 13 million monthly active users in the third quarter, up 4.8%. That is a slower pace than the 6.3% added in the previous quarter. The slowing user growth overshadowed Twitter's revenue, which more than doubled in the quarter and prompted an increase in full-year guidance. Shares sank 8.8%.

Coach Inc. reported a decline in profit and sales in the latest quarter, with a slump in North American sales offsetting sales gains internationally. Results topped expectations, but shares fell 6.5%.

Whirlpool Corp. said its profit rose 17% in the third quarter as sales increased 3%. While results came in below analysts' expectations, shares gained 6.6%.

Write to Alexandra Scaggs at alexandra.scaggs@wsj.com

Nasdaq (NASDAQ:NDAQ)
Historical Stock Chart
From Mar 2024 to Apr 2024 Click Here for more Nasdaq Charts.
Nasdaq (NASDAQ:NDAQ)
Historical Stock Chart
From Apr 2023 to Apr 2024 Click Here for more Nasdaq Charts.