Major U.S. stock indexes closed essentially flat Wednesday after an early rebound rally faded in the final minutes of trading.

The topsy-turvy day came as health authorities around the world take steps to monitor and contain a deadly virus outbreak in China to keep it from spreading globally.

Gains in technology, financial and health care stocks were offset by losses in industrial, energy, real estate and other sectors. Bond yields rose.

On Wednesday:

The S&P 500 index rose 0.96 points, or less than 0.1%, to 3,321.75.

The Dow Jones Industrial Average slipped 9.77 points, or less than 0.1%, to 29,186.27.

The Nasdaq composite gained 12.96 points, or 0.1%, to 9,383.77.

The Russell 2000 index of smaller company stocks fell 1.44 points, or 0.1%, to 1,684.46.

For the week:

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

The Dow is down 161.83 points, or 0.6%.

The Nasdaq is down 5.18 points, or 0.1%.

The Russell 2000 is down 15.17 points, or 0.9%.

For the year:

The S&P 500 is up 90.97 points, or 2.8%.

The Dow is up 647.83 points, or 2.3%.

The Nasdaq is up 411.16 points, or 4.6%.

The Russell 2000 is up 15.99 points, or 1%.