As Omicron looms as a worry for global markets, China's stocks and the yuan have held firm with investors betting the country can cope with the coronavirus variant better than elsewhere, potentially prolonging its "virus bonus".

China's economy recovered earlier than most from COVID-19, with its exports - including electronics goods and textile - jumping when the pandemic disrupted production elsewhere.

During the initial Omicron panic in global markets, China saw rising interest in its A-shares, said Yifan Hu, regional chief investment officer & China economist at UBS Global Wealth Management.

"And such optimism is also reflected in yuan's recent strength" said Hu.

"As the global pandemic situation becomes volatile, China's advantage in its highly resilient supply chain resurfaced."

China's benchmark Shanghai Composite Index has barely budged since Nov. 24, when Omicron was first reported to the World Health Organization (WHO) from South Africa. During the period, the Dow Jones Industrial Average  lost as much as 5%.

The yuan  is also firm, having strengthened roughly 0.3% against the dollar, while China's official yuan index  flirts with fresh six-year highs. In contrast, as investors braced for a hit to global growth and delays in U.S. monetary tightening, the broad dollar index  fell 0.7%.

To be sure, Chinese assets have their own challenges such as massive debt problems in the property sector, sluggish consumption growth and rising regulatory risks.

But while global concerns about Omicron have abated somewhat, scientists are still trying to fully understand the new strain with uncertainty expected to remain for the rest of the year.

Ken Cheung, strategist at Mizuho Bank, said that the concern over the Omicron variant could prod manufacturers to stick to China's resilient supply chains, potentially fuelling upside export momentum.

"One reason behind China's strong exports in recent months is that the global spread of the Delta virus kept production lines in China," Cheung said, adding Omicron could sustain China's COVID "bonus".

There had been concerns in Beijing that a global recovery from the pandemic, helped by vaccinations, would reduce overseas demand for Chinese goods as economies elsewhere resumed production.

If, however, extended restrictions remain in place elsewhere, demand for Chinese goods could persist.

"In the near-term, the emergence of the Omicron variant is likely to support demand for China's exports. But its impact further ahead is still uncertain," Julian Evans-Pritchard, China economist at Capital Economics, wrote on Tuesday.

Liu Liuyang, forex strategist at China Minsheng Banking Corp, said the yuan already has a "safe haven" status, next to the Japanese yen and the Swiss Franc, in a global pandemic.

"If the pandemic situation worsens, a fresh round of flight to safety will further hit the dollar and benefit the yuan."

Investors also see Omicron as benefiting China stocks.

"China's rapid response and zero-Covid strategy can help the country cope with any type of variants," Kelly Li, strategist at Soochow Securities (HK) wrote.

"If the new variant is more harmful than Delta, China's virus bonus may last longer than expected."

Reflecting the bet, foreign inflows via the China-Hong Kong Connect scheme into mainland stocks have been robust over the past two weeks.

(Reporting by Samuel Shen and Vidya Ranganathan; Editing by Sam Holmes)