US stocks advanced on Tuesday as technology names rallied and investors continued to prepare for Nvidia Corp. earnings and the Jackson Hole Symposium.