"First-quarter earnings season for the S&P 500, while admittedly still unfolding, appears to be positioning well for upside surprises that could deliver earnings growth of around 9%, in line with consensus expectations and perhaps even better than that", said John Stoltzfus, chief investment strategist at Oppenheimer.
Apple (AAPL.O) rose 1.5 percent after Morgan Stanley and Stifel raised their price targets on the stock, helping lift both the S&P 500 and the Nasdaq. "Friday should be a risk-off trading day ahead of the election", Hogan said.
The Dow Jones Industrial Average gained 174.22 points (0.85 per cent) to 20,578.71, while the broad-based S&P 500 advanced 17.67 points (0.76 per cent) to 2,355.84.
France: Uncertainty surrounds France's presidential election set for Sunday as there are several front-runners, including Marine Le Pen of the far-right National Front and Centrist Emmanuel Macron.
The Nasdaq composite surged 53.74 points, or 0.9 percent, to 5,916.78.
Seven of the 11 major S&P sectors were higher, with the industrials index's.SPLRCI 1.2 percent rise leading the advancers, helped by gains in CSX Corp (CSX.O).
CSX Corp jumped 7 percent to $50.16 after the No. 3 US railroad operator's quarterly profit beat estimates.
Oil majors Chevron (CVX.N) and Exxon (XOM.N) were up about 1.3 percent. The stock was among the biggest boosts to the S&P and the Nasdaq.
Key companies scheduled to report results on Thursday include Dow component Visa (V.N) and toymaker Mattel MAT.N.
The S&P 500 index showed 25 new 52-week highs and one new low, while the Nasdaq recorded 75 new highs and 20 new lows.