U.S. stocks closed slightly higher Friday, the first day of the quarter, in a fourth day of gains after the post-Brexit sell-off.

The S&P 500 closed above the psychologically key 2,100 level and gained 3.22 percent for the week, its best since November. The Dow Jones industrial average gained 2.15 percent on the week, also its best week since November.