U.S. stock indexes finished with modest gains as solid earnings from Walmart encouraged investors to bid up other retailers and consumer goods companies and more in Tuesday’s Stock Market Update.

Homebuilders also contributed to the gains following an industry survey showing improved confidence heading into the key spring homebuying season.

Stocks bounced back after wavering early on as U.S. markets reopened following the Presidents Day holiday.

Traders weighed the latest batch of earnings reports from companies, including Walmart, which climbed after its earnings topped Wall Street’s expectations. Oil and gas rig operator Transocean fell after its quarterly results fell short of analysts’ forecasts.

Beyond the quarterly corporate report cards, investors were keeping a close eye on talks between U.S. and Chinese negotiators in Washington that are aimed at ending a trade war between the world’s largest economies.

After March 2, the U.S. is set to impose additional tariffs on Chinese goods, escalating a dispute that has already raised costs for companies and consumers. President Donald Trump has said there is a possibility he would extend that deadline if the two countries are close to a deal.


KEEPING SCORE: The Dow Jones Industrial Average rose 8 points to 25,891 at closing time. The benchmark S&P 500 index, which is on a three-week winning streak, gained 0.2 percent. The Nasdaq composite added 0.2 percent. Major European indexes finished mostly lower.

THE QUOTE: “Now that we’re winding down on earnings, investors are looking forward to what’s going to move the market higher,” said Karyn Cavanaugh, senior markets strategist at Voya Investment Management. “The fact that the consumer is still strong is a comfort to investors.”

TRADE TALKS: A truce between the U.S. and China on increased American tariffs on Chinese goods expires at the end of next week, leaving the U.S. free to more than double its import duties on $200 billion in Chinese goods. Much is riding on the outcome after an inconclusive end to an earlier round of talks in Beijing last week.

The U.S. is wrangling over trade with many nations. On Monday, the European Union warned that the bloc will hold back on a commitment to buy more American soybeans and liquefied gas if European cars are hit with punitive tariffs.

Vice Premier Liu He, China’s economy czar, was due to arrive in Washington on Thursday, China’s state media reported, after two days of preliminary talks by lower-level officials.

RETAIL THERAPY: Walmart rose 2.4 percent after the retail giant reported quarterly earnings that beat forecasts. The company benefited from growth in online sales and the expansion of its grocery pickup and delivery business. Amazon gained 1.3 percent, while Target added 1.9 percent.

CONFIDENCE BOOST: U.S. homebuilders are feeling more confident about their sales prospects this month, according to a new survey.

The National Association of Home Builders/Wells Fargo Housing Market Index released Tuesday has a reading of 62. That’s an increase of four points from last month’s index and the highest reading since October.

Readings above 50 indicate more builders see sales conditions as good rather than poor.

Homebuilder shares marched broadly higher following the release of the survey. William Lyon Homes was among the biggest gainers, adding 3.2 percent.

AN UNWELCOME DROP: Weight Watchers slid 3.8 percent after analysts at JPMorgan downgraded the weight management services company, citing a decline in daily average users of the company’s app and growing competition.

DRILLED: Transocean lost 2 percent after the oil and gas drilling services company reported quarterly earnings that came in below analysts’ forecasts.

OVERSEAS STOCK MARKET UPDATE: London-based HSBC fell 3.1 percent after the bank reported results that fell short of analysts’ estimates.

BOND WATCH: Bond prices rose. The yield on the 10-year Treasury note fell to 2.65 percent from 2.66 percent late Friday. That yield is used to set rates on mortgages and other kinds of loans.

METALS: Gold climbed 1.7 percent to $1,344.80 an ounce. Silver gained 1.4 percent to $15.97 an ounce. Copper jumped 2.7 percent to $2.87 a pound.

© The Associated Press. All rights reserved.