Stocks closed sharply lower on Wall Street Wednesday, led by a swoon in technology companies that erased the S&P 500 and the Dow Jones Industrial Average’s gains for the year.

The technology-heavy Nasdaq composite had its worst day since in seven years and finished 12.3 percent below its August peak. Several companies sustained heavy drops after reporting disappointing quarterly results.

On Wednesday:

The S&P 500 lost 84.59 points, or 3.1 percent, to 2,656.10.

The Dow tumbled 608.01 points, or 2.4 percent, to 24,583.42.

The Nasdaq slid 329.14 points, or 4.4 percent, to 7,108.40.

The Russell 2000 index of smaller-company stocks gave up 57.89 points, or 3.8 percent, to 1,468.70.

For the week:

The S&P 500 is down 111.68 points, or 4 percent.

The Dow is down 860.92 points, or 3.4 percent.

The Nasdaq is down 340.63 points, or 4.6 percent.

The Russell 2000 is down 73.34 points, or 4.8 percent.

For the year:

The S&P 500 is down 17.51 points, or 0.7 percent.

The Dow is down 135.80 points, or 0.5 percent.

The Nasdaq is up 205.01 points, or 3 percent.

The Russell 2000 is down 66.81 points, or 4.4 percent.