Stocks closed flat, giving up early gains by technology companies and makers of household products and more in Monday’s Stock Market Update.

The market turned lower in the late afternoon after wobbling earlier as investors digested some weak economic figures out of Germany.

Chip stocks rose. Nvidia gained 1.2% and Qualcomm rose 1%.

Procter & Gamble and Altria Group helped power a rally in consumer goods makers. P&G added 0.8% and Altria gained 0.2%. Traders also bid up shares in several retailers and restaurant chains. Target climbed 2% and McDonald’s rose 1%.

Utilities showed small gains. Investors typically shift to both those sectors and bonds when they are seeking safer places to put their money amid worries about economic growth.

Bond prices rose and pushed down the yield on 10-year Treasury notes to 1.71% from 1.75% late Friday, another sign that investors were seeking to avoid some risk.

Health care stocks were the biggest laggards. UnitedHealth Group slid 1.7% and Medical supply company McKesson dropped 2.6%.

Netflix was among the big decliners in the communication services sector. The stock fell 1.7%.

Investors are preparing for the next round of corporate earnings, and several companies could provide a clearer picture this week of the impact from the costly trade war between the U.S. and China.

“This quarter will be somewhat interesting in that tariffs have been around for a while now and the whole trade conflict is almost two years old,” said Craig Birk, chief investment officer at Personal Capital. “We’ll start to see more this quarter if tariffs are truly having an impact, how well companies are able to navigate that or how much it’s just an excuse.”

Nike, which could be a gauge of the trade war’s effect on shoemakers and retailers, will report fiscal first quarter results on Tuesday. Technology company Micron will report its fiscal fourth quarter results on Thursday.

STOCK MARKET UPDATE

KEEPING SCORE: The S&P 500 was unchanged at 2,991. The Dow Jones Industrial Average rose 14 points, or 0.1%, to 26,949. The Nasdaq fell 5 points, or 0.1%, to 8,112. The major indexes are each up modestly for the month and the quarter.

MARKET WORRIES: Stocks are coming off their first week of losses after three straight gains and investors are keeping a close watch on the United Nations General Assembly this week.

Oil prices and the energy sector could experience more volatility as President Donald Trump seeks a coalition to confront Iran after the U.S. blamed it for last week’s strike on a Saudi Arabian oil facility.

Prospects for a trade war resolution seem to have once again cooled following comments by Trump that he doesn’t necessarily need to make a deal before the next U.S. elections in 2020. Chinese officials canceled a planned trip to farms in Montana and Nebraska, an action that raised concerns of yet another halt in trade negotiations.

U.S. and Chinese officials are expected to meet in October to restart trade talks.

Despite their slide last week, the S&P 500 remains close to its all-time high set in late July.

THINLY STOCKED: E-commerce company Overstock.com slumped 25.2% after the company cut its financial forecast partly because tariffs have increased the costs of goods from China. It also named Jonathan Johnson as its new CEO. He has been acting CEO since August when Patrick Byrne resigned.

CRYPTO FUTURE: Intercontinental Exchange Inc., the owner of the New York Stock Exchange, entered the bitcoin futures game over the weekend. Bakkt Bitcoin Futures contracts are trading in ICE’s federally regulated markets and are payable in digital currency. Bakkt is the firm behind the contracts. Competitor CME Group launched its digital currency futures in 2017 and those are payable in cash.

MARKETS OVERSEAS: Major stock indexes in Europe closed broadly lower as a gauge of Germany’s private sector activity contracted for the first time in nearly seven years, according to IHS Markit. Germany is Europe’s largest economy and often acts as an indicator for the continent’s overall economic health. The latest data adds to worries that Europe is facing a slowdown. The European Central Bank is urging governments to spend more on stimulus as economic growth stalls. Asian stocks edged lower.

© The Associated Press. All rights reserved.