The reception area of the Johannesburg Stock Exchange. File picture: Leon Nicholas

Johannesburg - South African stocks reversed the previous session's gains on Thursday as sentiment toward mining companies soured after data showed the sector's output slumped again in December.

Impala Platinum, the world's second-largest producer of the precious metal, led the way, losing over 3 percent after the company reported a 78 percent plunge in first-half profit and said it would issue a $500 million convertible bond to prop up its ailing balance sheet.

Johannesburg's Top-40 index lost 0.28 percent to 36,285.09 and the All-Share index shed 0.19 percent to 40,732.86.

Both indices - which have repeatedly hit record highs since last year - are within striking distance of their recent peaks and analysts said more market gains could be on the cards.

“I think the buying comes in on dips and the underlying trend remains quite firm,” said Ferdi Heyneke, portfolio manager at Afrifocus Securities.

Thursday's dip was partly triggered by data that showed South African gold output fell 21 percent in December while that for platinum plunged 23 percent, underscoring the impact of a wave of violent wildcat strikes that rocked the industry last year.

Gold Fields, which unveiled a 20 percent fall in headline earnings it attributed to the strikes, fell almost 2 percent to 90.26 rand.

Global mining giant Anglo American was down 1.4 percent at 75.32 rand.

Retailer Woolworths shed 2.6 percent after reporting a 21 percent rise in first-half profit, as investors worried the stock price has outpaced the company's growth potential.

Bucking the downtrend, gold producer Sibanye, a spin-off of two Gold Fields' mines in South Africa that listed on Monday, shot up almost 8 percent to 16.30 rand.

Analysts have said the company should be a good yield play as the mines are mature and should deliver cash and dividends.

Some 169 million shares were traded, according to preliminary bourse statistics with decliners outpacing advancers 159 to 110. - Reuters