IN MOST countries the priority with the public finances is how to stop debt spiralling. But some places have the opposite difficulty: how to manage piles of savings. China and Saudi Arabia are examples. Globally, governments have over $20trn stashed in state-run investment vehicles. That sum is three times the size of BlackRock, the world’s biggest asset manager. Managing it is fraught and becoming more so owing to protectionism. Governments with spare funds should study Singapore, which, as in many aspects of administration, has its head screwed on.

State investment funds come in several flavours. There are currency reserve funds, which are often managed solely by central banks. Then there is an array of entities that are lumped together under the “sovereign-wealth fund” label, which typically manage pension assets, oil revenues, some currency reserves, or own stakes in companies that governments view as strategic.

Central bank reserve kitties have existed for centuries, and sovereign-wealth funds date back to the 1950s, but both became prominent in 2004-08. High oil prices, trade surpluses and capital inflows meant that Asian and Arab countries were knee-deep in foreign earnings, which they reinvested in safe treasury bonds and also in riskier assets such as stakes in foreign firms. The spending spree peaked in 2008. By that point Western governments had become uneasy about the funds’ power.

There are still problems. Often the funds’ objectives are muddled. Some have their capital depleted by profligate politicians; others cannot decide whether to invest at home as well as abroad. It is a constant struggle to avoid cronyism and to persuade other countries that they are not a tool of foreign policy.

Judged by their size, state funds have trodden water. Since 2015 emerging countries have burned up reserves as capital flows reversed and commodity prices fell. Adding up all global currency reserves and sovereign-wealth funds, their weight in the financial system has stayed flat over the past six years, at 12% of the market value of all shares and bonds. Governance is patchy. A Malaysian state fund, 1MBD, has been at the centre of a corruption scandal. The $250bn Saudi Public Investment Fund is making huge, wild, bets on Silicon Valley and pursuing the pet projects of Muhammad bin Salman, the crown prince.

China has pots of money but has made little progress on reform. A body called SASAC owns stakes in firms at home, but fails to insulate them from political influence. Another fund, CIC, styles itself as an independent global asset manager, but holds stakes in local banks, talks up foreign policy aims such as the Belt and Road Initiative, and wants approval to play in the sagging domestic stockmarket. Even Norway’s $1trn fund has seen political rows over its approach to private investment and energy firms.

Relative to the pack, Singapore is doing well. Its funds have assets of about $770bn—the exact figure is secret. They have made an annual return (in dollar terms) of about 6% over the past two decades, slightly more than an indexed portfolio with two-thirds of its assets in shares and one-third in bonds. Their income pays for a fifth of government spending. The funds are free of scandal and enjoy a solid reputation both in China and the West.

There is a clear division of labour. The central bank runs $290bn of liquid reserves. A national piggy-bank manager called GIC runs an estimated $250bn, long-term, diversified foreign portfolio. Then a holding company, Temasek, has the rest, keeping a quarter of its portfolio in stakes in Singaporean firms. It also makes punchy bets abroad.

On the funds’ boards sit a combination of officials, politicians and captains of industry; Singapore’s elite can sometimes seem too tightly knit. Yet overall governance is good. The city-state’s leaders view reserves-management as a national mission. Advisory boards and staff include lots of outsiders: 37% of the total employees of Temasek and GIC are foreign, versus under 10% at CIC. There is little evidence of Temasek meddling in the local champions in which it invests, such as DBS, a bank. In 2014 it did raise its stake in Olam, a struggling local commodities firm, but made a modest profit on the deal. In 2015 it unsentimentally sold control of Neptune Orient, a shipping line, to a French firm.

The fiscal framework is admirably clear. The reserves have special protection under the constitution. Under rules put in place in 2008, the government can spend up to half of the long-term expected annual real return of its net reserves each year. In practice this equates to about 1.6% of the funds’ capital value. The aim is to ensure that the pool of reserves and their income remain constant as a share of GDP over time, which Singapore has achieved; its capital is about 220% of GDP, the same as in 1997, The Economist estimates. While the official calculations are confidential, a rough estimate is that annual nominal returns would need to drop below 5.5% before the state eats into its inheritance.

Keeping on the Strait and narrow

Few countries have Singapore’s graft-free civil service and polity, which make technocratic excellence easier. And there are blemishes. The funds are now so big that there is more risk of pointless duplication. In June, for example, both GIC and Temasek invested in Ant Financial, a Chinese fintech firm. Mistakes happen: in 2007-08 both funds made some badly timed bets on Western banks. As Singapore’s population ages, state health-care costs will rise by almost one percentage point of GDP over the next decade. There will be pressure to raid the piggy bank, or for the funds to juice up their returns by taking bigger risks.

Nonetheless, for many countries, including China and Saudi Arabia, Singapore’s model for state investment funds is the one to emulate. Markets are frothy, so rash investment decisions can be very expensive. And protectionism means that countries lacking a credible, apolitical investment process may suffer a worse fate: having their state funds locked out of foreign markets.