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

Johannesburg - South African stocks ended higher on Wednesday as shares of Discovery climbed after the health insurer said it expected higher half-year earnings while resource companies surged on higher gold prices.

Shares of Discovery climbed 4.2 percent to 77.93 rand, its biggest daily percentage jump in seven months.

“The Discovery results did surprise on the upside and investors looked at the stock in a positive light,” said Bruno van Eck, the head of trading at Thebe Stocktrading.

African Bank jumped after selling bonds worth 175 million Swiss francs ($196 million), which was seen as a sign of confidence in the ailing lender.

Shares of the bank gained 6.7 percent to 9.98 rand.

Johannesburg's Top-40 index added 1.33 percent to 41,828.91 and the All-Share index was up 1.22 percent to 46,425.11.

Gold and platinum companies such as Sibanye Gold, Gold Fields and Anglo American Platinum gained on high prices of precious metals.

They each gained between 4 and 7 percent on the bourse.

Bucking the trend were a handful of retailers including furniture seller JD Group, Wal-Mart's Massmart unit and fashion retailer Truworths amid growing concerns about a slowdown in consumer spending.

“There is definitely a switch out of the retailers and banking stocks into the mining names, and resource-based stocks,” said Van Eck.

Some 207 million shares were traded, according to preliminary bourse statistics with advancers outpacing decliners 176 to 124. - Reuters