The S&P 500 and Nasdaq Composite jumped to all-time highs Friday, a remarkable comeback from the dark days of April.