Stocks were mixed on Wall Street Tuesday, but gains were strong enough for tech companies and other pockets of the market to carry the S&P 500 to its fourth straight gain and another record high.

The benchmark index rose 12.34, or 0.4%, to 3,443.62, even though slightly more stocks within it sank than rose. The Dow Jones Industrial Average fell 60.02, or 0.2%, to 28,248.44, and the Nasdaq composite rose 86.75, or 0.8%, to 11,466.47.

The modest moves followed some more mixed data reports on the economy. One showed that consumer confidence unexpectedly dropped this month, contrary to economists’ forecast for a strengthening. Another said sales of new homes accelerated faster than economists expected last month. They fit in with a general slowing of the economy recently, following its plummet into recession earlier this year and subsequent, initial burst off the bottom.

Earlier in the morning, most stocks on Wall Street had been edging higher after the United States and China said they held constructive talks as they negotiate how to implement their “Phase 1” deal, which set a truce in their trade war.

“We had three days of record highs” for the S&P 500 earlier in the past week, said Adam Taback, chief investment officer for Wells Fargo Private Wealth Management. “It’s not surprising to see some resistance here.”

The market has been making a lot of small moves recently on snippets of news about the virus, developments on a potential vaccine for it and other concerns. But the economy is still hurting, with airlines running at a fraction of their capacities and restaurants still mostly empty.

“That’s not an economy that’s back to normal,” said Tom Hainlin, national investment strategist at U.S. Bank Wealth Management. “Ultimately, the economy doesn’t fully reopen until we get a vaccine or a therapeutic,” he said.

For the moment, though, he said, “People are willing to see that the world’s cup is slightly half-full right now.”

Adding to the cup was an announcement from the U.S. Trade Representative that “both sides see progress” following trade talks between the world’s two largest economies. China’s Ministry of Commerce said the two sides discussed strengthening coordination of their economic policies, though it gave no details.

Tensions between the United States and China have been ramping up recently, with President Donald Trump targeting Chinese technology companies in particular. The worsening relationship has been one of the bigger concerns for investors, particularly given how destructive the escalating tariffs of the U.S.-China trade war were for the global economy earlier.

Other concerns for the market include whether Congress can get past its partisan disagreements to agree on sending more aid to the economy, which investors say is desperately needed, and whether stock prices have become too expensive relative to how much profit companies are producing.

But none of those concerns has been loud enough to keep the S&P 500 from plowing to new record heights by the day.

Underlying it all is massive support for markets and the economy from the Federal Reserve. The central bank has slashed short-term rates to nearly zero and is buying all kinds of bonds, which helps drive some investors into the stock market and push up its prices.

The Fed’s chair, Jerome Powell, will give a highly anticipated speech later this week, where investors expect to hear him talk about next steps for monetary policy.

He’ll likely touch on many topics, including inflation and the need for more help from Congress. “But most of all, it will be a reality check that we have a very fragile economy and they still have a number of concerns out there,” said Taback of Wells Fargo Private Wealth Management.

The yield on the 10-year Treasury rose to 0.68% from 0.64% late Monday.

Shares of Exxon Mobil, Pfizer and Raytheon Technologies all slipped in their first trading after an announcement that they’ll drop out of the Dow Jones Industrial Average before trading opens Monday. Exxon Mobil dropped 3.2%, Pfizer fell 1.1% and Raytheon lost 1.5%.

Salesforce.com, Amgen and Honeywell International will replace the trio. All three rose at least 3%.

S&P Dow Jones Indices said it’s making the moves because Apple is about to split its stock, which will result in a lower share price. Because the Dow’s movements are based on how much a company’s share price is — not how much the company is worth in total, like other indexes — the stock split would have reduced the technology industry’s weight in the Dow.

In European stock markets, the French CAC 40 and German DAX were both close to flat. The FTSE 100 in London fell 1.1%.

Asian markets were mixed. Japan’s Nikkei 225 rose 1.4%, and South Korea’s Kospi jumped 1.6%. The Hang Seng in Hong Kong lost 0.3%, while stocks in Shanghai slipped 0.4%

Benchmark U.S. crude oil rose 73 cents to settle at $43.35 per barrel as Hurricane Laura barrels toward the U.S. Gulf coast, home to much of the country's energy production. Brent crude, the international standard, gained 73 cents to $45.86 a barrel.

Wholesale gasoline for September delivery rose 3 cents, or 2.1%, to $1.40 a gallon amid worries that the hurricane could damage refineries and cut off supplies.