Stocks rose on Monday, rebounding from a decline earlier in the day, led by solid gains in tech shares such as Amazon.
The Dow Jones Industrial Average gained 174.31 points, or 0.6%, to close at 29,276.82 after dropping more than 100 points to start off the session. The S&P 500 advanced 0.6% to 3,352.09 while the Nasdaq Composite gained 1% to end the day at 9,628.39. Both the S&P 500 and Nasdaq reached all-time highs.
Amazon rose 2.6% to a record high, breaking above $2,100 per share for the first time. Netflix and Alphabet both closed more than 1% higher while Facebook eked out a gain. Tesla, meanwhile gained more than 3% in another volatile session for the electric car maker.
Boeing was the best-performing Dow stock, closing 2% higher. Microsoft, Visa and Cisco Systems added to the 30-stock average's gains, advancing more than 1% each.
The major averages were coming off their first loss in five sessions, with the Dow falling more than 200 points on Friday. Mounting concerns over how the coronavirus would impact China's economy, the second-largest in the world, pressured stocks. Despite Friday's losses, Wall Street logged in its biggest weekly gain since June as the S&P 500 jumped 3.2%. Strong economic data along with solid corporate earnings reports fueled the market's weekly surge.
"Stock market investors are torn between fear that the coronavirus might continue to spread, weighing on global economic growth, and optimism given that the latest batch of global economic indicators is showing rebounding global growth," said Ed Yardeni, president and chief investment strategist at Yardeni Research, in a note.
Monthly U.S. employment data released Friday showed more than 200,000 jobs were created in January. The Institute for Supply Management said last week manufacturing activity rebounded in the U.S. last month while growth in the services sector picked up.
As of Sunday night, China said a total of 40,171 cases of coronavirus had been confirmed and 908 people had died, while 14 Americans have tested positive for the virus aboard a cruise ship quarantined in Japan. The death toll from the coronavirus has also overtaken that of the SARS outbreak in the early 2000s.
Chinese President Xi Jinping said China would speed up development of drugs aimed at treating pneumonia-like viruses. Xi also said China will win the fight against the coronavirus. He noted, however, the situation remains dire.
"The duration of this virus will determine how long businesses will be sidelined and what the effect will be on China and the global economy" said Bruce Bittles, chief investment strategist at Baird.
Apple shares fell as much as 1.9% on Monday amid concerns the outbreak will hurt production of the tech giant's best-selling product, the iPhone. Foxconn, one of Apple's biggest suppliers, got approval to resume production at a key manufacturing plant but only 10% of its workforce has returned, Reuters reported.
In other corporate news, Xerox raised its offer to buy HP Inc to $24 per share, or about $34 billion. That's up from a $22 per share offer made by Xerox in November. Xerox shares gained 1.4% while HP advanced 0.8%.
Meanwhile, L Brands is closing in on a sale of its Victoria's Secret brand to Sycamore Partners, sources told CNBC. L Brands shares gained more than 2%.
—CNBC's Elliot Smith contributed to this report.