Sudden twists in the price of oil and currency trading turned the stock market into a roller-coaster ride. Indexes ended slightly lower after an early rally fizzled. The price of crude oil stabilized after a prolonged rout, bringing relief to energy stocks and the Russian ruble, both of which have been battered by a slump in oil. The price of oil has fallen by half since June.

On Tuesday:

The Dow Jones industrial average fell 111.97 points, or 0.7 percent, to 17,068.87

The Standard & Poor's 500 index fell 16.89 points, or 0.9 percent, to 1,972.74.

The Nasdaq composite lost 57.32 points, or 1.2 percent, to 4,547.83.

For the week:

The Dow is down 211.96 points, or 1.2 percent.

The S&P 500 index is down 29.59 points, or 1.5 percent.

The Nasdaq is down 105.76 points, or 2.3 percent.

For the year:

The Dow is up 492.21 points, or 3 percent.

The S&P 500 index is up 124.38 points, or 6.7 percent.

The Nasdaq is up 371.24 points, or 8.9 percent.