The Dow Jones Industrial Average increased 173.31 points, or 0.68 percent, to 25,635.01. The S&P 500 was up 17.14 points, or 0.63 percent, to 2,755.45. The Nasdaq Composite Index rose 47.11 points, or 0.64 percent, to 7,375.96.
The results of the U.S. midterm elections are expected to send ripples throughout capital markets.
On the economic front, the number of job openings decreased to 7 million on the last business day of September, the U.S. Department of Labor said on Tuesday.
Over the month, hires and separations were both little changed at 5.7 million. Within separations, the quits rate was unchanged at 2.4 percent and the layoffs and discharges rate was little changed at 1.1 percent, said the department.
On Monday, a report showed that the ISM non-manufacturing index hit 60.3 percent, higher than analysts' expectations.
The non-manufacturing sector has again reflected strong growth despite a slight cooling off after a record month in September, said experts.