Stocks drifted mostly lower in late-afternoon trading on Wall Street Thursday, on track to add to the market’s modest losses a day earlier. A slide in banks and energy companies offset solid gains for the technology sector. Homebuilders also declined following new data showing sales of new U.S. homes slumped in July.

KEEPING SCORE: The S&P 500 fell 5 points, or 0.2 percent, to 2,857 at closing time. The Dow Jones Industrial Average slid 77 points, or 0.3 percent, to 25,657. The Nasdaq composite lost 10 points, or 0.1 percent, to 7,878. The Russell 2000 index of smaller-company stocks gave up 3 points, or 0.2 percent, to 1,718. The Russell is coming off two consecutive all-time highs. Declining stocks outnumbered rising ones two to one on the New York Stock Exchange.

TRADE TUSSLE: The U.S. and China imposed 25 percent tariffs on $16 billion of each other’s goods, including automobiles and factory equipment. The increases, which were announced previously, came even as envoys from both countries met in Washington for their first high-level talks in two months. Beijing has rejected U.S. demands to scale back technology development plans that its trading partners say violate Chinese market-opening pledges and that American officials worry might erode the United States’ industrial leadership.

Investors came into this week feeling cautiously optimistic that the talks may lead to an end to the U.S.-China trade dispute. The market has mostly shrugged off the trade uncertainty in recent weeks, focusing instead on another strong quarter of corporate earnings growth. Earnings at S&P 500 companies have surged 23 percent in the first half of this year versus the same period a year earlier, according to S&P Global Market Intelligence.

THE QUOTE: “The market is waiting to see the effect of the tariffs,” said JJ Kinahan, chief market strategist for TD Ameritrade. “It’s hard to argue what’s going on with earnings.”

BIG MEETING: Investors were looking ahead to an annual gathering of central bankers on Friday in Jackson Hole, Wyoming, that has often generated market-moving news. Federal Reserve Chairman Jerome Powell was scheduled to deliver a keynote speech that traders are sure to scrutinize for signs of Fed views on Turkey’s currency crisis and U.S.-Chinese trade tensions. If Powell sounds confident, investors would likely conclude the Fed will keep gradually raising rates.

NOT BANKING ON IT: Banks and other financial stocks took some of the biggest losses. Charles Schwab declined 1.4 percent to $50.23.

ON SHAKY GROUND: Homebuilders were trading lower after the Commerce Department said sales of new U.S. homes slumped in July for the second month in a row. Meritage Homes lost 1.6 percent to $43.28.

UNAPPETIZING TURN: Hormel Foods fell 3.3 percent to $37.24 after the Spam maker cut its sales outlook, partly because of uncertain trade conditions. Other packaged foods companies also declined. J.M. Smucker lost 1.3 percent to $104.08. Campbell Soup slid 1.5 percent to $40.61.

TECH BOOST: Technology companies notched some of the biggest gains. Synopsys was among the sector’s big gainers, climbing 6.4 percent to $100.75 after the maker of software used to test and develop chips topped Wall Street expectations in the third quarter.

COOKING GOOD: Williams-Sonoma jumped 16.1 percent to $72.66 after the home furnishings and cookware company reported quarterly results that topped Wall Street’s forecasts.

ENERGY: Benchmark U.S. crude settled essentially flat at $67.83 per barrel in New York. Brent crude, used to price international oils, dipped 0.1 percent to $74.73 per barrel in London.

The slide in oil prices weighed on some energy stocks. Concho Resources lost 1.5 percent to $134.28.

BOND YIELDS: Bond prices were little changed. The yield on the 10-year Treasury held steady at 2.82 percent.

CURRENCY: The dollar rose to 111.26 yen from 110.57 yen late Wednesday. The euro weakened to $1.1532 from $1.1589.

METALS: Gold fell 0.8 percent to $1,194 an ounce. Silver slid 1.4 percent to $14.54 an ounce. Copper dropped 0.6 percent to $2.68 a pound.

MARKETS OVERSEAS: In Europe, Germany’s DAX dropped 0.2 percent while the CAC 40 in France was little changed. London’s FTSE 100 slid 0.1 percent. Earlier in Asia, Tokyo’s Nikkei 225 closed 0.2 percent higher, while Hong Kong’s Hang Seng lost 0.5 percent. Seoul’s Kospi gained 0.4 percent.

© The Associated Press. All rights reserved.