Both onshore and offshore yuan have been rallying, driven predominantly by a blow-up in yuan borrowing costs offshore and tighter liquidity. The spread between the two spot rates widened to its highest since 2010.

Chinese authorities are keen to deter speculation in the currency and traders suspect policymakers have sought to prevent it from weakening to the 7-per-dollar level, ahead of U.S. President-elect Donald Trump's inauguration on Jan. 20.

Traders said the market had long held a strong "one-way" expectation of depreciation in the yuan and the rally in the currency over the week was the authorities' attempt to alter such views.

It is not clear if Chinese authorities have engineered the spike in yuan borrowing rates in Hong Kong this week. But they had used such a tactic before to support offshore yuan exchange levels and by extension relieve some of the pressure on the yuan onshore, which is trading at more than eight-year lows.

But while policymakers may have some success in the short-run in arresting the yuan's descent, pressure will remain on the yuan to depreciate over time, they said.

"I don't think the volatility in the yuan so far this week will reverse the trend of depreciation. But the yuan is at least unlikely to have another rapid fall ahead of the Lunar New Year," said a Shanghai-based trader at a foreign bank, referring to the week-long holiday starting at the end of January.

The People's Bank of China (PBOC) set the official midpoint for the yuan, which is allowed to move in a tight band around that guidance rate, at 6.8668 per dollar prior to the market opening, 639 pips or 0.9 percent, firmer than the previous fixing.

That made it the largest upward move since the yuan was revalued and taken off a fixed dollar peg in July 2005.

The spot market opened at 6.8789 per dollar and settled at 6.9230 as of 4:30 p.m (0830 GMT), 400 pips weaker than the previous late session close and 0.82 percent softer than the midpoint.

The Chinese currency traded 0.6 percent weaker against the dollar late on Friday, but is still around 0.3 percent firmer than last week's close and is on track to log its best week in more than a month.

Onshore yuan's retreat on Friday was a result of increasing dollar demand by companies after the U.S. currency eased off 14-year highs, said a trader at a Chinese bank.

BATTLING YUAN BEARS

Interbank rates for the offshore yuan have been surging this week, suggesting China is keen to squeeze speculators by making it prohibitively expensive to short-sell the yuan. Yuan liquidity conditions in Hong Kong, the main offshore yuan hub, have been tightening.

Overnight yuan interbank rates in Hong Kong were fixed at 61.333 percent on Friday, up sharply from 38.335 percent on Thursday, while yuan deposit rates implied by the offshore forward market ballooned to 112 percent before easing.

Some of the pressure on yuan funding has also been on account of a drying up of yuan deposits in Hong Kong as investors steadily lost faith in a currency which fell 6.6 percent in 2016, its biggest annual fall since 1994.

China's currency reserves data due this week is also expected to show reserves are close to falling below the critical $3 trillion figure, which would partly explain the authorities' desire to stem capital outflows and bets that the currency will keep depreciating.

The offshore yuan, or CNH, has risen about 2.5 percent since Tuesday, with its gains over Wednesday and Thursday being the biggest two-day gains since its introduction in 2010.

Its rally rippled across major currency markets, causing the U.S. dollar to give up some of its recent gains against the euro and yen.

Still, few seem to be altering their expectations for a weaker yuan in the coming months.

"We believe the surge in the CNH is not sustainable," Gao Qi, FX strategist at Scotiabank in Singapore, wrote in a note.

Gao expects the yuan to depreciate about 5 percent against the dollar this year amid market worries over potential political and trade conflicts between the United States and China after Trump takes office.

A Reuters poll of almost 60 currency strategists taken this week showed the onshore yuan will likely weaken over 4 percent this year to 7.20 by end-December 2017.

It is forecast to fall to 7.00 by end-March and 7.10 by end-June.

China's central bank will not tolerate sustained depreciation of the yuan, the China Securities Journal said on Friday.

The Chinese currency was not obviously over-valued, and the appreciation of the U.S. dollar has its upper limit, it said in a commentary.

(Editing by Jacqueline Wong)

By Winni Zhou and John Ruwitch