The JSE. Photo: Simphiwe Mbokazi.

Johannesburg - South African stocks ended slightly lower on Wednesday, pulling the main indices back from record highs notched in the previous session, with retailers among the biggest decliners due to valuation worries.

A downbeat tone came from major overseas markets after data showed the US economy unexpectedly contracted in the fourth quarter, adding to bearish sentiment.

But mining shares restricted the downside momentum as metal prices such as copper and gold cruised higher.

The benchmark JSE Top-40 index lost 0.43 percent to 36,082.03 and the broader All-share index was off 0.47 percent at 40,461.18.

Retailers, managers' must-haves in their portfolios for most of 2012, were the worst performers on the benchmark index on growing worries that their share price ratings were not justified by their earnings or outlooks.

“Investors are worried about how retailers would sustain sales growth to justify their high multiples,” said Greg Davies, a trader at Johannesburg-based Cratos Capital.

Building materials retailer Cashbuild plunged 7.9 percent to 136.68 rand after the company said quarterly sales fell by 5 percent.

Clothing retailer Truworths slipped 5.71 percent to 99 rand and rival Mr Price shed 5.13 percent to 117.50 rand.

News that African Bank Ltd, the country's biggest unsecured credit lender, failed to grow its loan book in the first quarter raised concerns about retailers' ability to grow sales because some consumer spending in recent years has been underpinned by credit cards and other loans.

Among the gainers were AngloGold Ashanti, which inched up 0.88 percent to 252 rand. Kumba Iron Ore improved 3 percent to 598.43 and BHP Billiton was 1.21 percent better at 307.33 rand.

Gold prices rose 1 percent on Wednesday to a session high of $1,680.80 an ounce while copper climbed to its highest level in nearly a month.

A total of 190 million shares changed hands, according the preliminary data from the JSE, with decliners outnumbering advancers 152 to 142 while 57 shares were unchanged. - Reuters