The stock market closed higher Wednesday, ending a five-day losing streak, as investors cheered a slight upturn in the price of oil and hoped for more stimulus for Europe's struggling economy. The sharp drop in oil over the past six months has many worried that the global economy is slowing.

On Wednesday:

The Dow Jones industrial average rose 212.88 points, or 1.2 percent, to 17,584.52.

The Standard & Poor's 500 index rose 23.29 points, or 1.2 percent, to 2,025.90.

The Nasdaq composite rose 57.73 points, or 1.3 percent, to 4,650.47.

For the week:

The Dow is down 248.47 points, or 1.4 percent.

The S&P 500 is down 32.30 points, or 1.6 percent.

The Nasdaq composite is down 76.35 points, or 1.6 percent

For the year:

The Dow is down 238.55 points, or 1.3 percent.

The S&P 500 is down 33 points, or 1.6 percent.

The Nasdaq composite is down 85.59 points, or 1.8 percent.