S&P 500 rises 4th straight week, Nasdaq posts longest streak since November