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

Johannesburg - South Africa's main stock indices touched record highs for the third straight day on Wednesday, before retreating slightly to close slightly lower as investors booked profits.

The benchmark JSE Top-40 index was down 0.19 percent at 45,644 after earlier notching up to 46,010.

The broader All-share index dipped 0.15 percent to 50,659.

Both indices have been hitting historic highs in recent weeks that have pushed gains in Africa's most liquid bourse to nearly 10 percent so far this year.

But charts suggest the indices have limited further upside, with their 14-day relative strength index showing they have strayed into overbought territory.

“The market has run ahead of itself in the last few months,” said Greg Katzenellenbogen, director at Sanlam Private Investments.

“It would be healthy if the market does pull back by five-odd percent because it is difficult to find some value at the moment.”

Recently-battered platinum shares topped the gainers' list on Wednesday, with Anglo American Platinum rising 2.26 percent and rival Impala Platinum up 1.86 percent.

Platinum producers have been among the worst performing stocks this year as a five-month wage strike that has hit 40 percent of world production drags on.

About 184 million shares changed hands, with 146 stocks advancing while 177 declined. - Reuters