On Wall Street, the S&P 500 added 0.5% on Wednesday, while the Nasdaq surged 1.2% as megacap tech stocks rebounded sharply.