The S&P 500 closed at a record Friday, helped by gains in technology stocks on the last trading day of the quarter.
The tech-heavy Nasdaq composite rose more than half a percent to post its 50th record close for this year. The Dow transports and small-cap Russell 2000 also hit record highs.
The Dow Jones industrial average closed up nearly 24 points, within 0.1 percent of its record high. Goldman Sachs contributed to the most to gains in the index.
The index posted quarterly gains of 4.9 percent its eighth straight quarter of gains for the first time since 1997.
The S&P 500 rose nearly 4 percent in the quarter, also its eighth straight quarter of gains. The Nasdaq composite gained almost 5.8 percent for the quarter, its fifth straight positive quarter since 2015.