(Bloomberg) -- The struggle to maintain confidence in Hong Kong’s future is manifesting in its stock and currency markets.

Waves of mainland capital are flooding into equities, especially megacap Chinese banks, countering losses sparked by sweeping national security legislation. Tension is also building in the foreign exchange market, where options and forwards show the pegged currency will reach the weak end of its trading band.

Stability in financial markets would reinforce the message being promoted by officials and tycoons alike: that tougher laws on dissent will bring calm to a city wracked by violent protests. The city’s leader Carrie Lam cited gains in the Hang Seng Index on Tuesday as evidence that investors weren’t worried the new laws will undermine Hong Kong’s position as an international finance center.

“China needs to deploy some funds to help stabilize the Hong Kong dollar and capital flows in the city -- that’s paramount,” said Steven Leung, executive director with UOB Kay Hian (Hong Kong) Ltd. “Some foreign investors worry the security law will threaten Hong Kong’s status as an international financial center and they might exit.”

The city’s stocks need all the help they can get. The Hang Seng Index has lost almost 7% this month, clocking up the biggest drop relative to the MSCI All-Country World Index since the Asian financial crisis in 1998. Short selling volume on Hong Kong’s main board climbed to 18% of total turnover on Thursday, the second-highest proportion of the year.

The stakes are high: a panicked business community could trigger cascading outflows that crash its markets and cause runs on its banks. A wave of emigration could create a brain drain that damps its appeal as a financial center.

The $4.9 trillion stock market, the world’s fourth largest, is now the most volatile since 2012, according to a measure of historical 100-day swings on the Hang Seng Index. Options traders are preparing for more turbulence: eighteen of the 20 most-owned Hang Seng Index derivatives are puts protecting against losses.

While Hong Kong’s currency remains supported by tight liquidity conditions that keep its interest rates high versus those on the greenback, there are signs that some hedge funds may be changing their positions. The Hong Kong dollar’s 12-month forward points remain extremely elevated after spiking to the highest level since 1999 last week, showing demand to speculate against the currency.

Local companies are lining up to defend China’s expanded powers. Hong Kong property developers issued a statement saying the national security law will guarantee stability and prosperity, even as their shares tumbled to multi-year lows. More public displays of support will likely come: Hong Kong’s former leader Leung Chun-ying exhorted people on Friday with HSBC Holdings Plc accounts to stop using them, saying the British bank had yet to express its position on the law.

The city’s police chief Chris Tang added to the chorus, telling state broadcaster CCTV that the new legislation would help strengthen investor confidence in the city, according to Radio Television Hong Kong.

Such efforts to calm the business community aren’t new. Back in the early 1980s, the then free-floating currency plunged as London and Beijing held talks over the return of Hong Kong to Chinese rule. The colonial government arrested the slide by pegging the Hong Kong dollar to the greenback. Maintaining confidence became an important focus for the British rulers in the run up to the 1997 handover, especially as hundreds of thousands of Hong Kongers migrated to Canada in order to obtain overseas citizenship.

There is no shortage of evidence that Beijing has repeatedly intervened in its domestic stock market to maintain order during politically sensitive periods. It also has plenty of tools at its disposal to minimize moves in the currency. Such control has long dulled the appeal of Chinese assets to foreign investors.

Whether the Communist Party’s tightening grip over Hong Kong will extend to the city’s free-wheeling financial markets remains to be seen. But it’s increasingly becoming clear that in Hong Kong, like on the mainland, stability is paramount.

©2020 Bloomberg L.P.