The JSE. Photo: Simphiwe Mbokazi.

South Africa's broad All-share index booked its highest close in its 17-year history on Wednesday, edging up 0.2 percent as lower-than-expected inflation data boosted hopes of an interest rate cut.

Shares of retailers such as Woolworths and other companies sensitive to consumer spending - like paper maker Mondi - were among the biggest gainers, as investors bet lower interest rates could help fatten sales.

But broader gains were capped as investors waited to see if the US Federal Reserve would announce new stimulus measures to revive the world's largest economy.

“We're obviously all waiting to see what's going to happen with the Federal Reserve decision later on,” said Paul Theron, an analyst at Vestact. “On balance, people are expecting some accommodative language.”

The All-share index, the broadest measure of South African stock performance, rose 0.21 percent to 34,788.37, its highest finish on record. Earlier in the session it hit a record high of 34,808.92.

The benchmark Top-40 index closed up 0.19 percent at 30,764.32, after hitting 30,799.88, its highest level since February.

Consumer inflation in South Africa slowed to within the central bank's 3-6 percent target range in May, surprising markets and raising expectations that the central bank may have room to cut interest rates this year.

A rate cut would likely be positive for consumer spending, giving businesses a much-needed boost.

Woolworths, a retailer of clothing and high-end food, gained 2.8 percent to 52 rand. Mondi, a paper maker also sensitive to consumer spending, rose 3.4 percent to 73.37 rand.

Gold miners were hit by a drop in the spot price of bullion. The gold price fell below $1,600 an ounce ahead of the Federal Reserve statement.

Harmony Gold fell 2.7 percent to 84.65 rand, followed by bigger rivals Gold Fields and AngloGold Ashanti, down 1.9 percent and 1.07 percent, respectively.

A total of 204 million shares changed hands, up from 201 million in the previous session. Advancers outpaced decliners at 165 to 123. Another 76 stocks remain unchanged. - Reuters