US stocks have closed higher on optimism about the development of coronavirus vaccines and a revival of business activity, but the S&P 500 failed to hold above the key psychological level of 3000 points.

Stocks pared gains late in the session, after Bloomberg News reported the Trump administration was weighing a range of sanctions on Chinese officials, businesses and financial institutions, reinforcing comments earlier in the day from White House adviser Larry Kudlow.

Kudlow said US President Donald Trump was “so miffed with China on virus and other matters that the trade deal is not as important to him as it once was”.

The benchmark S&P 500 had crossed 3000 for the first time since March 5 before dropping back late in Tuesday’s session.

The S&P 500 has risen as much as 37.9 per cent from its March 23 low due to central bank and government stimulus at a time when the US economy is seeing its biggest job losses since the Great Depression of the 1930s.

It closed 11.7 per cent below its February 19 record high.

On Monday, California, which has had one of the country’s most restrictive shutdowns, said it would allow retail businesses to offer in-store shopping and places of worship to reopen.

On top of vaccine-related news, Shawn Snyder, head of investment strategy at Citi Personal Wealth Management, pointed to better-than-expected home sales data and comments from JPMorgan Chase chief executive Jamie Dimon.

“When you add the news all together everyone’s getting a boost,” Snyder said.

Data showed US consumer confidence nudged up in May, adding to hopes that the worst of the economic impact of the shutdown is in the past.

The Dow Jones Industrial Average rose 529.95 points, or 2.17 per cent, to 24,995.11, the S&P 500 gained 36.32 points, or 1.23 per cent, to 2,991.77, and the Nasdaq Composite added 15.63 points, or 0.17 per cent, to 9,340.22.

While all 11 S&P sector indexes were higher for much of the day, the technology and healthcare sectors ended slightly lower.

Still, sectors such as financials and industrials charged ahead with gains of five per cent and four per cent, respectively.

A comment from JPMorgan’s Dimon suggesting the bank may not need to increase its reserves in the second half of the year was a boost for the financial sector as well as the broader market, according to Citi’s Snyder.

JPMorgan shares closed up seven per cent, making it the biggest boost for the financial sector.

US biotech group Novavax closed up 4.5 per cent as it joined the race to test coronavirus vaccine candidates on humans and enrolled its first participants.

Merck ended up 1.2 per cent after it announced plans to develop two separate vaccines.

While macroeconomic data was pointing at a deep recession, Citi’s Snyder was focused on the recovery.

But he questioned how much further the market would rise with the US presidential election in November and simmering US-China tensions.

“The returns from here will be harder to come by,” he said.

Beaten-down travel-related stocks climbed with the S&P 1500 airlines stocks index rising 13 per cent and with cruise operators including Carnival, which closed up 12.6 per cent.

The New York Stock Exchange on Tuesday partially reopened its trading floors at the iconic 11 Wall Street building, which had been closed since March 23.

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

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

On US exchanges 12.11 billion shares changed hands compared with the 11.26 billion average for the last 20 sessions.