HONG KONG (BLOOMBERG) - In one of the more surprising twists this year, China's currency is beginning to look like a haven.
Two years after Chinese policy makers devalued the yuan, an act that torpedoed global markets, the currency is the best performer in Asia and momentum indicators are near the highest since 2005.
Typical risk-off events seem only to heighten demand for the exchange rate.
North Korea firing a missile? Buy the yuan. Dysfunction in the White House? Buy the yuan.
Several factors are helping cement the currency's recent status as a sure bet. The slumping dollar is prompting traders to find alternatives. The yen's position as a global haven is undermined by Japan's vulnerability to North Korean missiles. Capital controls have stifled outflows from China, while surging stock markets in Shanghai and Hong Kong are increasing the lure of the nation's assets.
There is also a perception that officials will keep the currency elevated before a Communist Party meeting next month (October).
Still, the currency's newfound strength has yet to be tested by a sustained rebound in the greenback, with the Bloomberg Dollar Spot Index sinking 9 per cent this year to near its lowest level since early 2015.
China's policy makers can be unpredictable when it comes to intervening in the nation's financial markets, while the country's position as North Korea's ally means it is not immune to worsening tensions.
"There's talk of the yuan as a safe haven because investors have come around to the view that the People's Bank won't let it slide," said Mr Mark Williams, chief Asia economist at Capital Economics in London. "But the picture could change if President Trump introduced wide-ranging trade sanctions on China or if something caused the US dollar to strengthen abruptly."
For now, at least, the yuan has a number of things going for it.
The People's Bank of China has tightened funding conditions this year while the Federal Reserve has signalled a cautious approach to further rate hikes, contributing to China's widening yield advantage.
Then there is the reversal in the so-called Trump trade as investors unwound bets on an ambitious growth agenda centred around major tax reforms and infrastructure spending.
"The yuan has found support from an unexpected source: President Donald Trump," Bloomberg Intelligence analysts Fielding Chen and Tom Orlik wrote in a note. "Political turmoil in the US has dented the dollar."
China's economic data have also held steady, and the People's Bank of China's fixings have signalled a preference for a stronger exchange rate ahead of next month's Party Congress. And while Mr Trump outlined plans for new sanctions that could target China, investors remain unconvinced he will actually take action.
If the US restricts trade with China, "all that's really going to happen is for those products which you can't substitute locally, the prices are going to go up, so it's going to be inflationary for the consumers inside the US", said Mr Hayden Briscoe, head of Asia Pacific fixed income at UBS Asset Management in Hong Kong.
And because of China's massive current-account surplus, foreign-exchange reserves and capital controls, the yuan has always been steadier than most emerging-market currencies.
Still, tight state control is a double-edged sword: the yuan is far from being a haven in the classic sense, as it is far easier to put money in freely-traded haven currencies like the yen.
"The yuan may be less vulnerable than some other emerging market currencies at times of heightened global risks," Mr Louis Kuijs, head of Asia economics at Oxford Economics in Hong Kong, wrote in an e-mail. "However, I do not have the impression that the yuan is a 'haven' currency like the Japanese yen."
Markets are starting to show jitters over the yuan's outlook as well. One-month implied volatility, which is used to price options, jumped to the highest since February on Tuesday, while the currency fell as much 0.4 per cent.
While it remains to be seen whether the yuan can hold this quarter's gain, its strength has forced banks including Standard Chartered, Credit Agricole CIB and Mizuho Bank to increase their forecasts for its 2017 performance.
"The renminbi is strong because of the strong Chinese economy and a weaker dollar," said chief Asia economist Shen Jianguang at Mizuho Securities Asia.