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.

The Dow slid 65.27 points on Friday, 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.

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” in the quarter, she said.

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.

advertisement | advertise on newsday

The Russell 2000 index of small-company stocks ended the quarter with a gain of 2.1 percent, its fourth quarter of growth in a row.