S&P 500 ends higher as traders weigh stimulus and virus worries