S&P 500 adds $8 trillion in Q2 as capital spending fuels rally