JOHANNESBURG, Sept 17 (Reuters) - South Africa's rand weakened on Friday, reversing some early gains and was set to close the week with an overall loss of almost 3.8% as the U.S. dollar rose and weak domestic economic data weighed on sentiment.

At 1610 GMT the rand traded at 14.7400 against the dollar, 1.03% weaker than its previous close.

After three weeks of strong gains, the rand has reversed direction since Tuesday, buffeted by poor domestic retail data, a retreat in commodity prices and a recommendation from investment bank JPMorgan to sell the currency.

The dollar climbed to a three-week peak on Friday, continuing to be boosted by strong U.S. retail sales data released on Thursday, reviving fears that a Fed tapering might be close. This has led to fall in riskier currencies and outflow of money from emerging markets.

Markets focus is now on next week's local consumer price index (CPI) data, South Africa's central bank interest rates decision on Sept. 23 and the Federal Reserve policy meeting for indications on how soon the U.S central bank will start to taper stimulus.

Shares listed on the Johannesburg Stock Exchange (JSE) continued their steady decline on Friday as investors worried that the boom in the commodity cycle was nearing an end which could hit South Africa's foreign currency earnings.

The slide was further worsened by a fall in Wall Street shares driven by decline in technology stocks and fears of a rise in corporate taxes in the United States.

The benchmark all-share index closed down 0.71% to 62,862 points, ending the day with a weekly drop of 2.2%, its third consecutive week of decline, which has brought the broader index down to its early February level.

The blue-chip index of top 40 companies slipped by 0.86% to 56,605 points.

The yield on the government's benchmark 2030 bond was up 7 basis points to 8.985%.

(Reporting by Olivia Kumwenda-Mtambo and Promit Mukherjee Editing by Mark Potter and David Evans)