TORONTO -- The Toronto Stock Exchange closed in the black Friday after a wild week that took traders on a roller-coaster of huge drops and advances largely linked to a slowing Chinese economy.

Toronto's S&P/TSX index finished 98.40 points higher to settle at 13,865.07, its fourth consecutive advance after a six-day slide in which Canada's main market lost more than 1,200 points, including a 420-point drop on Monday alone.

Much of the strength came from the energy sector amid a strong, two-day rebound in oil prices from multi-year lows.

The October crude contract rose $2.66 or 6.3 per cent to US$45.22 a barrel on top of a 10.3 per cent advance Thursday, the biggest one-day gain for U.S. benchmark oil since March 2009.

"I think the most interesting thing today is the continuing rally in oil," said Stephen Lingard, senior vice-president at Franklin Templeton Solutions.

"I'm not sure if that's a short squeeze or just more positive risk sentiment," added Lingard, noting that an overabundance of crude supply remains.

"There is not a lot of people bullish on commodities and oil specifically."

New York markets softened after huge jumps the two previous sessions followed a weeklong plunge that saw the Dow Jones industrial index shed almost 1,900 points.

At the close, the Dow Jones was down 11.76 points at 16,643.01, while the broader S&P 500 eked out a gain of 1.21 points to 1,988.87 and the Nasdaq moved up 15.62 points to 4,828.32.

"People are taking a little bit of a pause," Paul Springmeyer, senior portfolio manager at the Private Client Reserve at U.S. Bank, told The Associated Press. "We're finally winding down here where maybe we're seeing more rational behaviour."

Lingard said he expects volatility to continue into the fall, especially in advance of policy rate meetings of the Federal Reserve as traders speculate on when and how quickly the U.S. central bank will move to raise interest rates from historically low levels near zero.

However, he also sees better times ahead.

"One of the big things that the market doesn't focus on is this lower oil price that we've seen. This 60 per cent fall in oil off the highs (of just over a year ago) is ultimately very beneficial to the majority of the global economy," he said.

"While we may still face a little bit of pain given we're more an oil-producing country, at some point that global growth or that global oil dividend will come through."

The Canadian dollar was up 0.02 of a cent at 75.67 cents U.S. after having hit an 11-year low of 74.93 cents U.S. earlier in the week.

October natural gas was up five cents at US$2.71 per thousand cubic feet and December gold rose $11.40 to US$1,134 an ounce.