The broad index closed 0.5% higher at 3,386.15, breaking above a previous all-time high of 3,385.09, while the Nasdaq climbed nearly 0.9% to 9,817.18. Meanwhile, the Dow Jones Industrial Average was up 115.84 points, or 0.4% to close at 29,348.03.
Apple shares contributed to the gains, closing 1.5% higher. The Technology Select Sector SPDR ETF (XLK) — which tracks the S&P 500 tech sector — gained more than 1% to hit an all-time high. Tesla, meanwhile, jumped more than 6.5% after an analyst at Piper Sandler hiked his price target on the electric car maker to $928 per share from $729 per share.
China's National Health Commission on Wednesday reported an additional 1,749 cases of the coronavirus nationwide. That's the lowest number of newly confirmed cases since late January.
"Encouraging signs have continued to emerge over the past week that China's coronavirus outbreak ... is contained," said Yan Wang, emerging markets and China strategist at Alpine Macro. "China's stringent quarantine requirements will likely soon be relaxed, and the government's focus will shift quickly from containing the virus to supporting the economy."
Bloomberg News reported, citing people familiar with the matter, that China is considering the use of cash infusions and mergers to bail out its airline industry, which has been hit by the coronavirus.
Still, the total number of cases has broken above 74,000 while confirmed deaths from the coronavirus are more than 2,000. Cases of the deadly flu-like virus, which originated in the Chinese city of Wuhan, have also been reported in more than two dozen countries around the world. Last month, the World Health Organization (WHO) declared the outbreak a global health emergency.
The Dow and the S&P 500 were coming off losing sessions as a stark revenue warning from Apple pressured them. The tech giant said it will not meet its revenue guidance due to the coronavirus. Apple also failed to issue new revenue guidance.
The lack of a guidance update can mean "mean the company doesn't have much of an idea how big of a hit it will be," said Tom Essaye, co-founder of The Sevens Report. He noted, however, the market will look through any earnings disruption as long as it is limited to the first quarter of 2020.
On the data front, the Labor Department's producer price index (PPI) rose by 0.5% in January, marking its biggest one-month increase since October 2018. The Federal Reserve' also released the minutes from its January meeting, showing central bank officials think rates will remain at current levels for the time being. The minutes also reflected the coronavirus was being monitored by the Fed.
In corporate news, Garmin shares shot up more than 6% on the back of better-than-expected earnings. Meanwhile, Groupon plunged more than 40% after the company's quarterly results badly missed expectations. Groupon also unveiled reverse stock-split proposal.
Subscribe to for exclusive insights and analysis, and live business day programming from around the world.