The government of Taiwan has decided that it is time to buy stocks.

The self-ruled island mobilized a national fund to arrest declines in its battered equity market, after Taiwanese stocks continued to slide while other regional markets recovered recently.

A committee running Taiwan’s National Stabilization Fund, which was established more than two decades ago, said late Tuesday that it would intervene to help support the island’s stock market. It said the fund has the equivalent of about $16.7 billion to deploy, but didn’t specify how much it would spend and what stocks it intends to buy.

“There is a clear lack of market confidence,” said Taiwan’s Ministry of Finance. It pointed to recent declines in trading volume and an exodus of foreign capital, which contributed to a nearly $340 billion loss of market value in Taiwanese stocks in the first half of this year.

Taiwan’s main stock benchmark, the Taiex, jumped 2.7% on Wednesday following the announcement, led by gains in the world’s largest contract chip maker, Taiwan Semiconductor Manufacturing Co. A day earlier, the index had fallen to a 19-month low and was down more than 25% from a recent high.

Authorities pointed to Russia’s invasion of Ukraine, which has resulted in higher inflation. Bigger and faster interest-rate raises by central banks in other countries have also turned global investors off stocks and riskier assets.

The national fund’s mission is to stabilize Taiwan’s stock market in the event of “significant occurrences at home or abroad” or “large-scale movements of international capital” that affect public confidence, according to the fund’s official statute. Its money comes from borrowings from financial institutions, pension funds and postal-savings deposits.

So far this year, around $32 billion in foreign money has left Taiwan’s market, data from the Taiwan Stock Exchange shows. That compares with a $15 billion outflow in all of 2021 and $18 billion outflow in 2020.

The Taiwan Stock Exchange had a total market capitalization of about $1.8 trillion in May, according to the most recent data from the World Federation of Exchanges. The Taiex is heavily weighted toward electronics stocks, making it vulnerable to souring sentiments on tech stocks and a global growth slowdown, which is weighing on the semiconductor industry’s business cycle.

Vivian Pai, a Taipei-based equity-portfolio manager at Fidelity International, said the intervention by Taiwan’s national stabilization fund should help give investors some confidence that the state will help support the market. Ultimately, however, the performance of individual stocks will boil down to corporate earnings and companies’ growth prospects, she added.

The fund has intervened in Taiwan’s market seven other times since its formation in 2000. Its investments in the market have varied in size, from tens of millions of dollars to several billion dollars’ worth of purchases, according to its previous disclosures. The fund typically invests in dozens of large-cap Taiwanese stocks, holds them for some time and then gradually unloads its holdings as the market calms down.

It last sprung into action in March 2020, during a global market rout triggered by the early spread of Covid-19 world-wide. Then, the fund spent about $25 million and bought 19 stocks including TSMC and some financial companies. It held on to them until mid-October the same year and then gradually unloaded all its holdings over 28 days, according to the fund’s filings. In the process, it collected $7.8 million in profit.

The fund was also mobilized in 2008 during the global financial crisis, in 2011 during the European debt crisis, and in 2015 when China’s stock market crashed.