(Reuters) - U.S. stocks rallied on Monday, boosted by heavyweight technology shares and on surprise strength in U.S. manufacturing activity, following a sharp selloff last week on concerns about the economic impact from the fast-spreading coronavirus out of China.

U.S. factory activity rebounded in January after contracting for five straight months amid a surge in new orders, according to the Institute for Supply Management (ISM).

“Investors are looking beyond the potential negative impacts of the coronavirus,” said Michael Arone, chief investment strategist at State Street Global Advisors in Boston. “Historically, these events have proven to be a buying opportunity for investors, and there could be an element of folks getting comfortable with where we are with the coronavirus moving forward.”

The Dow Jones Industrial Average rose 143.78 points, or 0.51%, to 28,399.81, the S&P 500 gained 23.4 points, or 0.73%, to 3,248.92, and the Nasdaq Composite added 122.47 points, or 1.34%, to 9,273.40.

Microsoft shares rose 2.4%, leading a 1.3% rise for the S&P 500 technology sector.

Shares of Google parent Alphabet Inc gained 3.5% ahead of the company’s quarterly results. But the shares fell in after-market trading, wiping out the day’s gains, following release of the results.

The energy sector slumped 1.3% as crude prices dropped.

Slideshow ( 5 images )

Investors were eyeing a busy U.S. political week. Democrats in Iowa kick off the party’s nominating process on Monday with the state caucuses.

The U.S. Senate was due to vote on Wednesday on whether to remove President Donald Trump from office following the impeachment process, with the Republican-controlled body widely expected to acquit him.

“The uncertainty caused by the impeachment case looks like it will be over by the middle of the week,” said Peter Tuz, president of Chase Investment Counsel in Charlottesville, Virginia.

In company news, Tesla Inc shares soared 19.9% as Panasonic Corp reported the first quarterly profit in its U.S. battery business with the electric vehicle maker.

Gilead Sciences Inc shares gained 5.0% after the drugmaker said it has provided its experimental Ebola therapy for use in a small number of patients with the coronavirus.

Nike Inc shares rose 3.1% after JP Morgan added the stock to its focus list.

Slideshow ( 5 images )

The fourth-quarter earnings season is about halfway done. About 228 S&P 500 companies have reported so far, and earnings are expected to have climbed 1.1% in the period, according to IBES data from Refinitiv.

Advancing issues outnumbered declining ones on the NYSE by a 1.76-to-1 ratio; on Nasdaq, a 1.76-to-1 ratio favored advancers.

The S&P 500 posted 29 new 52-week highs and 10 new lows; the Nasdaq Composite recorded 65 new highs and 74 new lows.

About 7.7 billion shares changed hands in U.S. exchanges, slightly above the daily average over the last 20 sessions.