Stocks climbed, as a rally in the price of oil boosted the shares of energy and materials companies after a weak jobs report.

The gains pushed major stock indexes into positive territory for the week.

U.S. bond yields and stocks initially fell sharply after the weaker-than-expected September jobs report, which deepened concerns about how slowing...