A surge in oil and gas companies pulled the stock market out of a five-day slump on Friday, as the price of crude swung higher. Oil prices jumped after the International Energy Agency predicted drillers would cut production this year.

The Dow Jones industrial average climbed 190.86 points, or 1.1 percent, to close at 17,511.57.

The Standard & Poor's 500 index rose 26.75 points, or 1.3 percent, to finish at 2,019.42.

The Nasdaq composite rose 63.56 points, or 1.4 percent, to 4,634.38.

For the week:

The Dow was down 225.80 points, or 1.3 percent.

The S&P 500 was down 25.39 points, or 1.2 percent.

The Nasdaq was down 69.68 points, or 1.5 percent.

For the year:

The Dow is down 311.50 points, or 1.8 percent.

The S&P 500 is down 39.48 points, or 1.9 percent.

The Nasdaq is down 101.67 points, or 2.2 percent.