Stocks closed higher on Wall Street for the third straight day Thursday, erasing most of the plunge they took at the start of the week on worries about the worsening trade fight between China and the U.S.

Technology stocks, banks and health care companies accounted for much of the market’s broad gains. Chipmakers slumped a day after the Trump administration labeled Chinese telecom equipment giant Huawei a security risk and imposed export curbs on U.S. technology sales to the company.

On Thursday:

The S&P 500 index rose 25.36 points, or 0.9%, to 2,876.32.

The Dow Jones Industrial Average climbed 214.66 points, or 0.8%, to 25,862.68.

The Nasdaq composite gained 75.90 points, or 1%, to 7,898.05.

The Russell 2000 index of small company stocks picked up 8.97 points, or 0.6%, to 1,557.24.

For the week:

The S&P 500 is down 5.08 points, or 0.2%.

The Dow is down 79.69 points, or 0.3%.

The Nasdaq is down 18.90 points, or 0.2%.

The Russell 2000 is down 15.75 points, or 1%.

For the year:

The S&P 500 is up 369.47 points, or 14.7%.

The Dow is up 2,535.22 points, or 10.9%.

The Nasdaq is up 1,262.77 points, or 19%.

The Russell 2000 is up 208.68 points, or 15.5%.