China’s holdings of U.S. Treasuries rose for a third straight month in April, reaching the highest in half a year amid signs the economy is stabilising.

Chinese ownership of U.S. government bonds, notes and bills increased by US$4.6 billion to US$1.09 trillion in April, remaining the second-largest foreign holder of American debt, according to a monthly Treasury Department report released on Thursday. Japan, the largest non-U.S. holder, decreased its total to US$1.11 trillion, down US$12.4 billion from a month earlier.

Things are starting to look up in China following several years of persistent capital flight and soft economic performance. The manufacturing sector is growing again, factory prices are reflating, and capital outflows have shown signs of abating. All that has helped to stabilise the yuan and enabled the People’s Bank of China to accumulate reserves.

After bottoming in January, the nation’s reserves rose US$55 billion to US$3.05 trillion in May, contributing to a US$34 billion increase in China’s Treasury holdings this year.

Foreign-exchange reserves at central banks tend to rise when the nation runs a current account surplus by selling more goods than it buys internationally.

Dollars also pile up when authorities sell the local currency against the greenback to prevent it from appreciating too fast, like China did to slow the rise of the yuan for the better part of the last decade, resulting in its burgeoning coffers.

China is prepared to increase its holdings of Treasuries under the right circumstances, as officials judge the assets are becoming more attractive than other sovereign debt and the yuan stabilises, people familiar with the matter said last week. The yuan has climbed more than 2 per cent against the dollar this year, after plunging 6.5 per cent in 2016 in its biggest decline in more than two decades.

Belgium’s ownership of Treasuries, often seen as a home to China’s custodial accounts, fell in April to US$96.4 billion.

Total foreign ownership of U.S. Treasuries amounted to about US$6.07 trillion in April, down by US$28.6 billion from the previous month. The report, which also contains data on international capital flows, showed a total cross-border inflow, including short-term securities such as Treasury bills and stock swaps, of US$65.8 billion.