Home S&P 500, Nasdaq end up with Nvidia; Walmart hits record after forecast