Johannesburg - South African stocks ended the year near record highs on Monday, after a 22% surge that marks their best annual return since 2009, lifted by a runaway performance from the booming retailing industry.
Equities have confounded market watchers this year, as shares largely shrugged off lacklustre economic growth and three months of crippling strikes in the crucial mining sector that sparked credit downgrades.
"It surprised everybody. If you look back at the consensus forecasts, even the optimists were not even close," said Abri du Plessis, chief investment officer at Gryphon Asset Management in Cape Town.
"Our market is running ahead and it is already discounting the commodities cycle picking up again, and I still cannot see that with what's happening in Europe... For that reason, I'm a bit negative on our market in the first half."
The benchmark Top 40 - (Tradeable) [JSE:J200] index finished the half day of trade down 0.39% at 34 795.50, just off its record high hit last week and up 22.22% for the year.
That was the Top 40's best annual performance since 2009, when it rose nearly 29%.
The broader All Share [JSE:J203] index finished the session 0.34% lower at 39 250.24, also near a record high and up 22.71%t for the year.
Shares of Assore surged 94% in 2012, making the base mineral mining company the top performer on the blue-chip index.
Retailers have been the real standout in Johannesburg this year, lifted by optimism that government grants to the poor and the growth of a middle class will translate into stronger consumer spending.
Woolworths, a clothing and high-end food retailer that is expanding its sub-Saharan presence beyond South Africa, rose 82% in 2012.
Mr Price, which targets money-conscious consumers, gained 76%, while grocer Shoprite gained 51%.
Some investors have cautioned that retailers were now too expensive after this year's steep gains. Eight of the largest retailers were trading at an average price-to-earnings ratio of 21, well above the average of 14 for the Top 40.
Like other emerging markets, South Africa was helped this year by global monetary stimulus that increased demand for riskier assets.
"It's the emerging markets story again. As global sentiment started to ease and got a bit more positive... emerging markets are one of the first that investors pick," Du Plessis said.
In local currency terms, South Africa was the tenth best performer among 31 emerging stock markets tracked by Thomson Reuters.
The best performing emerging market this year was Venezuela, where the benchmark index has quadrupled in value.
In dollar terms, however, the Top 40 managed a more modest 16% return, putting South Africa in 18th place among the emerging market indices.
The rand has been hit this year by concerns about the outlook for Africa's top economy, which is saddled with high unemployment, slow growth and labour unrest.
Ratings agencies Moody's and Standard & Poor's have both downgraded South Africa's credit rating this year. Analysts expect Fitch will cut its rating at its next annual review in January.
Follow Fin24 on Twitter, Facebook, Google+ and Pinterest.