Apple Inc jumped ahead of an event on Tuesday, when it is expected to unveil its newest iPhones.

Amazon rallied ahead of its annual Prime Day shopping event on Oct. 13 and 14. Microsoft also jumped, helping lift the S&P 500 information technology index sharply.

The S&P 500 was about 1% below its record closing high from Sept. 2, nearly recovering from most of a 9% pullback last month.

"Apple is crushing it. There's some euphoria around the name," said Phil Blancato, chief executive of Ladenburg Thalmann Asset Management in New York. "The market leaders are once again the tech names, supported by the fact that the economy continues to expand."

Optimistic sentiment dominated after the Trump administration on Sunday called on Congress to pass a stripped-down coronavirus relief bill as negotiations on a broader package ran into resistance.

"It looks like the administration wants a deal done before the election," said Brian Battle, director of trading at Performance Trust Capital Partners in Chicago. "Now it's up to the Republican Senate to figure out how big the number is going to be."

Many investors view Democratic candidate Joe Biden as more likely to raise taxes, and for months have seen a second term for Trump, who favors deregulation, as better for the overall stock market.

However, with growing expectations of a Democratic win in next month's presidential election, investors are increasingly pointing to potential benefits of a Biden presidency, such as greater infrastructure spending and less global trade uncertainty.

Betting odds aggregated by RealClearPolitics suggest bettors see a 67% chance Biden will win and a 33% chance for Trump, the greatest gap so far between the two candidates.

With the Oct. 15 presidential debate officially canceled, Trump plans to travel to key battleground states this week as his doctor declared he was no longer a transmission risk for the novel coronavirus.

Results from big U.S. banks will be in focus this week, with JPMorgan & Co and Citigroup set to report on Tuesday.

Overall, analysts expect third-quarter earnings for S&P 500 companies to fall 21% from a year earlier, smaller than a 31% slump in the second quarter.

"Earnings are expected to be negative, but I think most people would say, 'Yes, but we set the bar so low that we will probably beat Q3 numbers the way we beat Q2 numbers'," said Sam Stovall, chief investment strategist at CFRA in New York.

Unofficially, the Dow Jones Industrial Average rose 250.03 points, or 0.87%, to 28,836.93, the S&P 500 gained 56.93 points, or 1.64%, to 3,534.06 and the Nasdaq Composite added 296.32 points, or 2.56%, to 11,876.26. The S&P 500 energy index fell as oil prices dropped on easing supply worries. [O/R]

Twitter Inc jumped after Deutsche Bank upgraded the social media company's shares to "buy" on expectations of continued growth in 2021.

(Additional reporting by Medha Singh and Shivani Kumaresan in Bengaluru, and Sinead Carew in New York; Editing by Marguerita Choy)

By Noel Randewich