U.S. stocks rallied Monday as technology companies and banks helped companies regain much of the ground they lost last week, although the calm that has defined the market this year wasn’t quite restored.

Almost 90 percent of the Standard & Poor’s 500 index finished higher. Technology stocks outpaced the rest of the market following a strong report on the state of Japan’s economy.

advertisement | advertise on newsday

Last week, rising tensions between the U.S. and North Korea sent stocks to some of their biggest losses in 2017. That eased Monday after officials said fighting is not imminent.

“What the market really reacted negatively to on Thursday was Trump’s somewhat incendiary comments about ‘fire and fury,”’ said Dave Lafferty, chief market strategist of Natixis Global Asset Management. “The administration sort of walked back Trump’s comments over the weekend.”

Bond prices slipped only by a small amount and gold finished a little lower, while silver prices rose.

The S&P 500 jumped 24.52 points, or 1 percent, to 2,465.84. The Dow Jones industrial average gained 135.39 points, or 0.6 percent, to 21,993.71.

The Nasdaq composite added 81.06 points to 6,337.62. The Russell 2000 index of smaller companies climbed 20.08 points to 1,394.31.