S&P 500 and Nasdaq close at highest since April 2022