SHANGHAI - Having spent all year trying to put a floor under the tumbling yuan, China's central bank is suddenly faced with the opposite problem and is turning to subtle ways to stop the currency from appreciating sharply.

The usually restrained yuan has strengthened 1.3% against the dollar in August, recouping nearly all its losses in the first half of the year. On Friday, it looked set for its fifth straight weekly gain, the longest winning streak in more than three years.

While none of the underlying drivers at home, namely a weak economy and capital flight, has changed, the yuan has been helped by growing bets for Federal Reserve interest rate cuts, which are weakening the dollar, and by a rally in the Japanese yen.

Meanwhile, Chinese authorities have worked behind the scenes to ensure the currency doesn't spike abruptly, which could roil fragile domestic financial markets and hurt exporters. They have surveyed the market to gauge the pressure, and quietly relaxed restrictions on imports of gold and trading positions in the yuan for some banks.

"The government is probably less concerned about depreciation but remains wary of FX volatility," said Gary Ng, senior economist for Asia Pacific at Natixis.

"While the pressure on the yuan may ease as the Fed may finally cut interest rates, there may be sudden and significant movements in capital flows."

One big reason for the People's Bank of China (PBOC) to be worried is the build-up of speculative short yuan positions during the currency's steady decline since early 2023, which could be unwound messily if the currency rises fast.

Foreign companies operating in China, domestic exporters and investors have swapped yuan for dollars to earn better returns in what is known in market circles as the yuan carry trade.

Analysts at the Macquarie Group estimate exporters and multinational companies have accumulated foreign currency holdings of more than $500 billion since 2022.

"As the yuan appreciates... concerns about the potential unwinding of yuan carry trade and shocks to financial markets may arise," said Zhu Chaoping, global market strategist at J.P. Morgan Asset Management.

"Recent market volatility in Japan might have reminded policymakers about these risks."

China's currency regulator, the State Administration of Foreign Exchange (SAFE), and the PBOC did not immediately respond to Reuters requests for comment.

PREVENT A STAMPEDE

Possibly to get an idea of pent-up yuan buying that could come as the currency appreciates, SAFE surveyed banks about their clients' FX conversion ratio - the proportion of revenues exporters convert into yuan - last week, two people with direct knowledge of the matter told Reuters.

"FX settlement is the issue that everyone in the market is mostly concerned about, besides the Fed rate cut," said Liu Yang, general manager of the financial market business department at minerals exporter Zheshang Development Group.

"After all, exports are the only major driver of China's economy among its traditional 'troika' (traditional growth engines), and regulators do not want the yuan to appreciate rapidly and substantially to weaken the competitiveness of export products," he said.

Separately, guidance given to banks last year banning them from keeping short yuan positions at the end of a day's trading has also been relaxed for some banks, two people with direct knowledge of the matter told Reuters.

Chinese banks have also been given new gold import quotas by the central bank, Reuters reported. Gold imports are usually curtailed when the yuan faces depreciation pressures.

The measures are subtle, analysts said, and together with the trend in the PBOC's daily benchmark guidance setting for the yuan, simply point to a desire to contain volatility, rather than thwart gains.

Still, market participants are revising their yuan forecasts.

Analysts at BofA Securities expect the yuan will continue to weaken, "given subdued growth and PBOC's easing bias", but see the yuan at 7.38 per dollar by year-end, not 7.45 as they had previously forecast. It is currently around 7.14 per dollar.

(Reporting by Shanghai Newsroom Editing by Vidya Ranganathan and Kim Coghill)