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 turned in 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 had made their moves earlier in the week, said Quincy Krosby, market strategist at Prudential Financial.
"The market has performed very well," she said.
The Dow slid 65.27 points, or 0.3 percent, to 20,663.22. The S&P 500 lost 5.34 points, or 2 percent, to 2,362.72. The Nasdaq fell 2.61 points to 5,911.74. The index hit an all-time high on Thursday.
Small-company stocks fared better than the rest of the market. The Russell 2000 index picked up 3.57 points, or 0.3 percent, 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 percent from 2.42 percent late Thursday.
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 percent in February compared to a year ago, a five-year high.
The latest economic data followed positive reports on consumer confidence, housing and economic growth earlier this week, 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 percent, the Nasdaq posted a gain of 9.8 percent and the Dow climbed of 4.6 percent. The Russell 2000 ended the quarter with a gain of 2.1 percent, its fourth quarter of growth in a row.
Investors bid up shares in companies with better-than-expected earnings Friday.
Industrial products company DXP Enterprises jumped $5.13, or 15.7 percent, to $37.87, while BlackBerry surged $1.03, or 11.1 percent, to $10.30.
NantHealth didn't fare as well. The health care information technology company slid 2.7 percent after it reported disappointing fourth-quarter revenue. The stock shed 13 cents to $4.96.
Auto dealership companies were among the decliners Friday. AutoNation fell $1.20, or 2.8 percent, to $42.29. CarMax slid 84 cents, or 1.4 percent, to $59.22.
Traders cheered several corporate deals.
TRC vaulted 46 percent 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. The stock climbed $5.50 to $17.45.
Shares in 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 jumped $8.09, or 13.2 percent, to $69.59. DuPont shares fell $1.31, or 1.6 percent, to $80.33.
Major indexes overseas were mixed Friday.
In Europe, Germany's DAX rose 0.5 percent, while France's CAC 40 gained 0.7 percent. The FTSE 100 index of leading British shares fell 0.6 percent.
In Asia, Tokyo's Nikkei 225 and Hong Kong's Hang Seng each fell 0.8 percent. Sydney's S&P-ASX 200 declined 0.5 percent. Seoul's Kospi fell 0.2 percent. India's Sensex gave up 0.2 percent, while Taiwan and New Zealand rose.
Oil futures also posted an uneven finish.
Benchmark U.S. crude recovered from an early slide to add 25 cents and close at $50.60 per barrel in New York. Brent crude, used to price international oils, slipped 13 cents to close at $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 per gallon and heating oil gained 2 cents to $1.57 per gallon.
The price of gold rose $3.20 to settle at $1,251.20 an ounce. Silver added 5 cents to $18.26 per ounce. Copper slipped 2 cents to $2.65 per pound.
In currency trading, the euro weakened to $1.0684 from $1.0691 on Thursday. The dollar fell to 111.29 yen from 111.60 yen.