Stocks closed lower on Wall Street as losses for technology and energy companies offset gains in other sectors and more in Wednesday’s Stock Market Update.

The modest losses came as investors weighed mixed data on the economy and continued to pore over corporate earnings reports.

The Commerce Department said U.S. retail sales fell in September by the largest amount in seven months, stoking worries that consumers are pulling back on spending. A slowdown in retail sales is concerning because consumer spending is a key growth driver for the U.S. economy, which has slowed this year as the costly trade war between the U.S. and China has escalated.

Microsoft and Adobe were among the big decliners in the technology sector, which accounted for most of the selling. Microsoft slid 0.8% and Adobe dropped 2.4%.

Homebuilders marched broadly higher after an industry survey showed builders’ confidence increased to the highest level since February 2018. Beazer Homes USA gained 3.6%.

Companies that rely on consumer spending also rose. McDonald’s added 0.4%, while retailer Advance Auto Parts picked up 1.8%.

General Motors rose 1.3% after the auto company and the United Auto Workers reached a tentative deal.

A potential settlement in the opioid epidemic involving some of the nation’s largest drug distributors helped lift some health sector stocks.

Traders bid up shares in United Airlines and Bank of America after the companies turned in third-quarter results that topped Wall Street’s forecasts.

The mixed bag of earnings and economic data follows a rally on Tuesday that was driven by surprisingly good earnings and hopeful forecasts.

Investors are waiting on several other important corporate earnings reports Wednesday. Railroad operator CSX, Netflix and IBM were scheduled to report results later in the day.

STOCK MARKET UPDATE

KEEPING SCORE: The S&P 500 slipped 5 points, or 0.2%, to 2,989. The Dow Jones Industrial Average fell 22 points, or 0.1%, to 27,001. The Nasdaq fell 24 points, or 0.3%, to 8,124. Small-company stocks rose.

Bond prices rose. The yield on the 10-year Treasury fell to 1.74% from 1.77% late Tuesday.

ANALYST’S TAKE: “We’re in the height of earnings season and the results that we got last night, as well as this morning, I would characterize as better-than-feared,” said Cayman Wills, global head of equities at J.P. Morgan Private Bank.

However, investors’ optimism about the odds of meaningful progress in the latest round of negotiations between Washington and Beijing may have been dampened after the House of Representatives passed three bills Tuesday aimed at showing U.S. support for pro-democracy protesters in Hong Kong.

Investors are worried the action by the House could blunt the recent positive momentum in the trade talks, she said. “It might take it a step back.”

On Friday, the U.S. agreed to suspend a planned hike in tariffs on $250 billion of Chinese goods that had been set to kick in Tuesday. Beijing, meanwhile, agreed to buy $40 billion to $50 billion in U.S. farm products.

EARNINGS REWARDED: Bank of America rose 1.4% after beating Wall Street’s third-quarter profit forecasts. The bank was able to grow loans quite noticeably in the quarter, despite worries about a slowdown in borrowing from businesses and consumers.

United Airlines gained 2% following its report late Tuesday that cheaper jet fuel and slightly higher fares drove a surge in profit that beat analyst’s forecasts. The company also raised its own profit forecast for the year.

OPIOID SETTLEMENT: A potential settlement deal in the opioid epidemic lifted stocks for several drug distributors. McKesson rose 4.8%, AmerisourceBergen climbed 3.4% and Cardinal Health added 2.4%.

The companies are defendants in the first federal trial over the epidemic. They are discussing a deal that would have them collectively pay $18 billion over 18 years.

OVERSEAS: Major stock indexes in Europe closed mostly lower after the European Commission’s statistics agency revised inflation figures for September in the 19 nations using the euro to its lowest rate in nearly three years. Low inflation can be a sign of economic weakness and has been a concern the European Central Bank.

© The Associated Press. All rights reserved.