Major US stock indexes wobbled and finished mostly higher Tuesday, led by technology companies and a handful of retailers.
The gains were enough to mark more record highs for several of the indexes, though not the Dow Jones industrial average.
Trading was lighter than usual, and stocks flipped between small gains and small losses for most of the day.
Outside of technology and retail, most other stocks finished lower. Energy companies dipped along with oil prices, and an increase in bond yields dented high-dividend stocks like utilities and phone companies, which investors tend to buy when they are seeking income.
Canada’s foreign minister arrived in Washington to resume trade talks Tuesday, a day after stocks rose on news that the Trump administration had reached a preliminary deal with Mexico to replace the North American Free Trade Agreement.
‘‘If we do get a new agreement in North America with lower overall tariffs or trade restrictions, long-term that’s a pretty positive result,’’ said Jim Paulsen, chief investment strategist at Leuthold Group.
The S&P 500 index rose 0.78 points to 2,897.52. The Dow rose 0.1 percent, to 26,064.02. The Nasdaq gained 0.2 percent, to 8,030.04.
The Russell 2000 index of smaller-company stocks inched up 0.02 point to 1,724.42.
The S&P 500, Nasdaq, and Russell all closed at record highs. But more stocks fell than rose on the New York Stock Exchange.
Shoe retailer DSW surged 20.2 percent after reporting second-quarter results that were far stronger than analysts expected and the company raised its estimates for the rest of the year.
Tiffany did the same and its stock added 1 percent. Like many other retailers, their stocks had slumped in recent years due to growing competition from online retailers and sinking sales in stores.
Retail stocks have climbed recently as they improved their online businesses. DSW has risen 53 percent in 2018 and Tiffany has rallied 26 percent. When the companies fall short of expectations, however, their stocks have plunged.
That happened to Macy’s, Gap, and J.C. Penney in the second quarter. And on Tuesday Best Buy fell 5 percent after issuing a disappointing forecast for the current quarter.
Apple added 0.8 percent as technology companies, the most valuable part of the S&P 500, did better than the rest of the market. Chip maker Xilinx rose 2.3 percent and Qualcomm gained 3.6 percent.
The dollar continued to slip as investors reacted to signs the United States was making progress in resolving some of its trade disputes. The Trump administration has announced numerous tariffs this year, and those tariffs have made the dollar stronger.
The dollar rose to 111.21 yen from 111.10 yen. The euro rose to $1.1696 from $1.1680.
Bond prices fell. The yield on the 10-year Treasury note rose to 2.88 percent from 2.85 percent.
High-dividend stocks including utilities, phone companies, and household goods makers lagged the rest of the market, as they did Monday.
Campbell Soup lost 2.1 percent after the New York Post reported the company is wrapping up a strategic review and is unlikely to try to sell itself. Campbell announced the review in May along with the departure of CEO Denise Morrison.
The Post reported in July that activist investor Daniel Loeb is pushing the company to sell, and if it decides not to do that, he could launch a bid for control of the company.
News and financial information company Thomson Reuters jumped 3.2 percent after it announced an offer to buy back up to $9 billion in company stock.
Akcea Therapeutics plunged 25.3 percent and Ionis Pharmaceuticals dropped 15.9 percent after the Food and Drug Administration didn’t approve their drug Waylivra, to treat a rare genetic condition that can cause fatal pancreatitis.
Benchmark US crude dipped 0.5 percent to $68.53 a barrel in New York while Brent crude, used to price international oils, fell 0.3 percent to $76 in London.