Wall Street closed out a solid quarter Friday with a day of listless trading that ended on a soft note.
The Standard & Poor's 500 index notched its best three-month stretch since the fourth quarter of 2015. The Nasdaq composite had its best quarter since the end of 2013.
The S&P 500, Nasdaq and the Dow Jones industrial average ended the day down slightly, with financials companies posting the biggest decline. Real estate companies led the gainers.
Trading was largely subdued, suggesting portfolio managers looking to bolster their end-of-quarter performance made their moves earlier in the week, said Quincy Krosby, market strategist at Prudential Financial.
"The market has performed very well," she said.
On Friday, the Dow slid 65.27 points, or 0.3%, to 20,663.22. The S&P 500 fell 5.34 points, or 2%, to 2,362.72. The Nasdaq, which hit an all-time high Thursday, fell 2.61 points to 5,911.74.
Small-company stocks fared better than the rest of the market. The Russell 2000 index picked up 3.57 points, or 0.3%, to 1,385.92. Three stocks rose for every two that fell on the New York Stock Exchange.
Bond prices edged higher. The 10-year Treasury yield fell to 2.39% from 2.42%.
The major stock indexes got off to a downbeat start Friday and spent much of the day wavering between small gains and losses as investors weighed several corporate deals and new economic data on consumer spending and inflation.
The Commerce Department said consumer spending kept rising in February, though gains in the last two months have been slow. Meanwhile, an inflation gauge closely watched by the Federal Reserve increased 2.1% in February compared with a year earlier, a five-year high.
Earlier this week there were positive reports on consumer confidence, housing and economic growth, which have added to the market's expectation for stronger first-quarter corporate earnings.
"The market is moving ahead into the second quarter with valuations that are high, but the expectations are that the first-quarter earnings season will confirm the valuations," Krosby said.
All told, the S&P 500 index ended the first three months of this year with a gain of 5.5%, the Nasdaq posted a gain of 9.8% and the Dow climbed 4.6%. The Russell 2000 rose 2.1%, its fourth consecutive quarter of growth.
On Friday, investors bid up shares in companies with better-than-expected earnings. Industrial products company DXP Enterprises jumped 15.7% to $37.87, and BlackBerry surged 11.1% to $10.30.
NantHealth didn't fare as well. The healthcare information technology company slid 2.7% to $4.96 after it reported disappointing fourth-quarter revenue.
Auto dealership companies were among the decliners Friday. AutoNation slid 2.8% to $42.29. CarMax slid 84 cents, or 1.4%, to $59.22.
Traders cheered several corporate deals.
TRC soared 46% to $17.45 after the engineering and consulting services company agreed to be bought by a unit of the investment firm New Mountain Capital for $17.55 a share, or $365.5 million.
FMC also got a lift after the company agreed to buy part of DuPont's crop protection business. At the same time, DuPont will buy FMC's health and nutrition unit. DuPont also gets $1.6 billion, mostly in cash. Antitrust regulators in Europe wanted DuPont to make the sale as part of its combination with competitor Dow Chemical. FMC shares jumped 13.2% to $69.59. DuPont fell 1.6% to $80.33.
Major indexes overseas were mixed Friday.
Germany's DAX rose 0.5% and France's CAC 40 gained 0.7%. The FTSE 100 index of leading British shares fell 0.6%. Tokyo's Nikkei 225 and Hong Kong's Hang Seng each fell 0.8%. Sydney's S&P-ASX 200 declined 0.5%. Seoul's Kospi and India's Sensex each slipped 0.2%, while Taiwan and New Zealand rose.
Benchmark U.S. crude oil futures rose 25 cents to $50.60 a barrel in New York. Brent crude, used to price international oils, slipped 13 cents to $52.83 a barrel in London.
Natural gas held steady at $3.19 per 1,000 cubic feet. Wholesale gasoline rose 2 cents to $1.70 a gallon, and heating oil rose 2 cents to $1.57 a gallon.
Gold rose $3.20 to $1,251.20 an ounce. Silver rose 5 cents to $18.26 an ounce. Copper fell 2 cents to $2.65 a pound.
The euro fell to $1.0684 from $1.0691. The dollar fell to 111.29 yen from 111.60 yen.
3:10 p.m.: This article was updated with closing prices, context and analyst comments.
1:15 p.m.: This article was updated with the close of markets.