US stocks have closed solidly higher as government leaders continue talks for a new pandemic relief package and positive economic data helped the major indexes end the third quarter in positive territory.

All three major indexes surged after US House of Representative Speaker Nancy Pelosi and Treasury Secretary Steven Mnuchin both expressed hope for a breakthrough in partisan stimulus negotiations.

But the indexes pared gains after Senate Majority Leader Mitch McConnell warned the sides remain “far apart” in their talks.

Paul Nolte, portfolio manager at Kingsview Asset Management in Chicago, cautioned that the market was still proving volatile.

“We had the economic news which was pretty good, and continued discussions with Mnuchin and Pelosi drove hopes that we could have stimulus before the election before McConnell threw cold water on it,” he said.

“Volatility has been the watchword all month and I don’t think we’re out of the woods yet.”

Market participants also were digesting Tuesday’s contentious presidential debate, where President Donald Trump and Democratic challenger Joe Biden talked over each other and traded insults as they sparred over the COVID-19 pandemic, healthcare and the economy.

A spate of economic data mostly surprised to the upside, with ADP National Employment index blowing past analyst expectations and pending home sales surging to an all-time high.

The major indexes wrapped up September with their first monthly declines since March, when mandated shutdowns slammed the economy.

But the indexes showed third-quarter gains, with the S&P enjoying its biggest two-quarter winning streak since 2009 and the Nasdaq posting its biggest gain for two quarters since 2000.

The Dow Jones Industrial Average rose 329.04 points, or 1.2 per cent, to 27,781.7 on Wednesday, the S&P 500 gained 27.53 points, or 0.83 per cent, to 3,363 and the Nasdaq Composite added 82.26 points, or 0.74 per cent, to 11,167.51.

Of the 11 major sectors in the S&P 500, 10 ended the session in positive territory, with healthcare and financials enjoying the largest percentage gains.

Nikola stock soared by 14.5 per cent after chief executive Mark Russell said he was close to a deal with an energy partner and defended the company against a short-seller’s fraud allegations.

Micron Technology said it has not yet obtained new licences needed to sell memory chips to China’s Huawei, sending its shares down 7.4 per cent.

Duke Energy jumped 7.5 per cent after the Wall Street Journal said the company had been approached by peer NextEra Energy regarding a possible takeover. Shares of NextEra Energy fell 2.0 per cent.

Advancing issues outnumbered declining ones on the NYSE by a 1.20-to-1 ratio; on Nasdaq, a 1.06-to-1 ratio favoured advancers.

The S&P 500 posted 13 new 52-week highs and no new lows; the Nasdaq Composite recorded 63 new highs and 36 new lows.

Volume on US exchanges was 10.38 billion shares, compared with the 10.07 billion average over the last 20 trading days.