Home Investing US stocks end in the green: S&P inches away from record highs, Nvidia surges 4%