The major U.S. stock indexes capped a day of mostly subdued trading with slight gains Monday.
Consumer and household goods companies led the market higher, offsetting losses by industrial and energy stocks.
A batch of corporate deal news also helped put investors in a buying mood. Mattel soared nearly 21% on a report that rival toy maker Hasbro offered to buy it.
General Electric slumped about 7% after cutting its dividend and releasing a weak forecast for next year.
The Standard & Poor's 500 index rose 2.54 points, or 0.1%, to 2,584.84. The Dow Jones industrial average rose 17.49 points, or 0.1%, to 23,439.70. The Nasdaq composite rose 6.66 points, or 0.1%, to 6,757.60.
The Russell 2000 index of smaller-company stocks slipped 0.21 of a point, or 0.01%, to 1,475.07. More stocks fell than rose on the New York Stock Exchange.
Bond prices were little changed. The yield on the 10-year Treasury note stayed at 2.40%.
Gains in consumer stocks and utilities, which also rose, suggest that investors were looking for yield, said Lindsey Bell, investment strategist at CFRA Research.
"They're maybe showing a little bit of skepticism in the bull market that's more than 8 years old," she said. "Maybe they're feeling a little bit squeamish after last week."
Last week, the stock market snapped an eight-week string of gains.
The major stock indexes opened lower Monday and then wavered between small gains and losses. By midmorning they had inched up into positive territory, hovering just above their Friday closing levels for the rest of the day.
Consumer and household goods companies were among the big gainers Monday. J. M. Smucker rose 2.3% to $106.49.
Investors also bid up shares in some of the companies at the center of merger-related news.
Mattel soared 20.7% to $17.64 — the biggest gainer in the S&P 500 — after a report that rival Hasbro made an offer to buy the company. Hasbro shares climbed 5.9% to $96.84.
Mall owner GGP jumped 8.3% to $24.05 after Brookfield Property Partners offered to buy the rest of the company for $14 billion, or $23 a share.
Qualcomm rose 3% to $66.49 after the chip maker rejected an unsolicited takeover offer from Broadcom worth $103 billion, or $70 a share. Qualcomm said the proposal was significantly undervalued and that a tie-up between the massive chip makers would face substantial regulatory resistance. Broadcom shares rose 5 cents to $265.01.
Other corporate deals failed to put investors in a buying mood.
WisdomTree Investments fell 5.5% to $11.28 after the asset management company said it will pay $611 million to buy a European division of ETF Securities.
General Electric tumbled 7.2% to $19.02 — the biggest decliner in the S&P 500 — after the company said it would slash its dividend in half to 12 cents a share, starting next month, and released annual profit projections that were well below what Wall Street expected. Chairman and CEO John Flannery told investors that the cost-cutting maneuver was part of the measures GE will undertake to make the company simpler and stronger. GE shares are down nearly 40% this year.
The slide in GE weighed on the industrials sector. GE accounts for about 8% of the sector's market capitalization.
Traders also had their eye on company earnings.
Tyson Foods rose 2% to $75.59 after the meat producer posted a larger profit and greater sales than analysts expected.
Energy futures mostly fell. Benchmark U.S. crude rose 2 cents to settle at $56.76 a barrel. Brent crude, used to price international oils, fell 36 cents to $63.16 a barrel. Wholesale gasoline fell 2 cents to $1.79 a gallon. Heating oil was little changed at $1.93 a gallon. Natural gas fell 5 cents to $3.17 per 1,000 cubic feet.
Stocks in the S&P 500's energy sector declined the most. Newfield Exploration slid 3.7% to $32.09.
Gold rose $4.70 to $1,278.90 an ounce. Silver rose 18 cents to $16.05 an ounce. Copper rose 4 cents to $3.12 a pound.
The dollar rose to 113.57 yen from 113.54 yen. The euro rose to $1.1667 from $1.1618. The pound slid to $1.3114 from $1.3126 as investors worried that British Prime Minister Theresa May is facing a rebellion within her own party over the handling of the Brexit talks.
Major stock indexes in Europe closed lower. Germany's DAX shed 0.4%. France's CAC 40 fell 0.7%. London's FTSE 100 slipped 0.2%.
Tokyo's Nikkei 225 fell 1.3%, while Hong Kong's Hang Seng gained 0.2%. Seoul's Kospi slid 0.5%. Sydney's S&P-ASX 200 fell 0.1%. India's Sensex lost 0.4%. Benchmarks in New Zealand and Jakarta rose, while those in Taiwan and Singapore declined.
4:15 p.m.: This article was updated with closing prices, context and analyst comment.
1:15 p.m.: This article was updated with the close of markets.