By Stan Choe and Alex Veiga

Updated 4:51 pm ET

Stocks overcame a late-afternoon burst of selling and closed higher Tuesday, as gains in big technology companies outweighed losses in banks and elsewhere in the market.

The S&P 500 rose 0.5 percent after being up 1.1 percent earlier. It's the second straight sizable gains for the benchmark index following its worst week since June.

High-flying technology stocks, which have been driving the market higher throughout the pandemic, abruptly lost altitude earlier this month amid worries that their prices had simply climbed too high, even after taking into account their tremendous growth.

But the past two days has marked a reversal of that trend, with shares in technology companies and others that play a key role in online access and commerce climbing again. Microsoft rose 1.6 percent Tuesday, while Amazon gained 1.7 percent and Zoom Video climbed 1.8 percent.

A key reason tech stocks are climbing again is that investors' expectations that the companies' profits will boom as even more of daily life shifts online haven't changed.

"The things that are doing well or are beneficiaries or are working in this environment, for good reason, are the things that are going up," said Tom Martin, senior portfolio manager with Globalt Investments. "That isn't going to change until we get a notable change in one of the things that are uncertain: The virus itself and the effect that's having on the economy, and whether we get anything new on the fiscal stimulus front."

The S&P 500 rose 17.66 points to 3,401.20. The Dow Jones Industrial Average inched up 2.27 points, or less than 0.1 percent, to 27,995.60. The index swung between a gain of 237 points and loss of 61. The Nasdaq, which is heavily weighted with tech stocks, climbed 133.67 points, or 1.2 percent, to 11,190.32.

Stocks of smaller companies eked out a tiny gain. The Russell 2000 index of small-caps picked up 1.18 points, or 0.1 percent, to 1,538.15.

Because tech companies have grown so massive, their movements alone can dictate the market's performance more than ever. Tech stocks as a group account for nearly 28 percent of the S&P 500, and they're up 3.1 percent this week after slumping more than 4 percent in each of the prior two weeks.

Analysts expect more volatility for stocks in the months ahead as the market navigates uncertainty over the outcome of the election, pessimism that Democrats and Republicans in Washington will be able to reach a deal to send more aid to unemployed workers and an economy still struggling amid the pandemic.

Investors weighed a batch of mixed global economic data Tuesday.

Stocks in Europe and much of Asia ticked higher following reports showing retail sales in China were higher last month than a year earlier for the first such growth this year, after the pandemic pancaked the world's second-largest economy. In Europe's largest economy, a reading on German economic confidence rose more than expected.

In the United States, a report showed that industrial production also strengthened last month. But the growth wasn't as strong as economists were expecting. Other reports showed that manufacturing in New York State is expanding more than economists expected, as are import and export prices.

Treasury yields were relatively steady. The yield on the 10-year Treasury was at 0.67 percent, unchanged from late Monday. The 30-year yield ticked up to 1.44 percent from 1.41 percent.

Shorter-term rates remain pinned at lower levels on expectations that the Federal Reserve will keep its benchmark rate at nearly zero for some time to help the economy recover. The central bank is beginning its latest meeting on interest-rate policy Tuesday, and it will announce its decision on Wednesday. Economists say it could change some of the language around its existing pledge to buy bonds to support markets, but they expect no major news.

On the losing side was Carnival, which dropped 10.8 percent, making it the biggest decliner in the S&P 500. The cruise ship operator said it may sell up to $1 billion in stock to raise cash, and it reported a preliminary $2.9 billion loss for its latest quarter. More encouragingly, it also said its advance bookings for the second half of 2021 are similar to where booking positions were in 2018 for the second half of 2019, before the coronavirus pummeled the industry.

Financial stocks were also laggards. JPMorgan Chase fell 3.1 percent, losing an earlier modest gain. It trimmed its forecast for this year's net interest income, which measures how much profit it makes from interest payments for loans and other products after subtracting the interest it pays out on deposits.

In European stock markets, Germany's DAX returned 0.2 percent, and the French CAC 40 rose 0.3 percent. The FTSE 100 in London climbed 1.3 percent. Markets in Asia ended mostly higher.

Share:
More In Business
Disney content has gone dark on YouTube TV: What you need to know
Disney content has gone dark on YouTube TV, leaving subscribers of the Google-owned live streaming platform without access to major networks like ESPN and ABC. That’s because the companies have failed to reach a new licensing deal to keep Disney channels on YouTube TV. Depending on how long it lasts, the dispute could particularly impact coverage of U.S. college football matchups over the weekend — on top of other news and entertainment disruptions that have already arrived. In the meantime, YouTube TV subscribers who want to watch Disney channels could have little choice other than turning to the company’s own platforms, which come with their own price tags.
Universal Music and AI song generator Udio partner on new AI platform
Universal Music Group and AI platform Udio have settled a copyright lawsuit and will collaborate on a new music creation and streaming platform. The companies announced on Wednesday that they reached a compensatory legal settlement and new licensing agreements. These agreements aim to provide more revenue opportunities for Universal's artists and songwriters. The rise of AI song generation tools like Udio has disrupted the music streaming industry, leading to accusations from record labels. This deal marks the first since Universal and others sued Udio and Suno last year. Financial terms of the settlement weren't disclosed.
Load More