The world's biggest buyers of gold are getting ready to load up

Employees push a trolley laden with crates of one kilogram gold bars at the YLG Bullion International Co. headquarters in Bangkok, Thailand.Getty Images/Dario Pignatelli/BloombergCentral banks are set to pile into gold like they haven't throughout this year as they look for yield, according to Capital Economics.

The World Gold Council said on Thursday that central banks sold more gold than they bought in May — a net 10.6 metric tons.

From January through May, they decreased their reserves by about 8.7 metric tons. The biggest drop came from Venezuela, which is struggling to keep its economy going.

Meanwhile, gold prices have been surging. The metal was the best-performing asset in the volatile first quarter, and has gained 8% since the UK referendum to leave the EU in June.

It's those high prices have, in part, kept central banks from buying gold, wrote Simona Gambarini in a note Wednesday.

She continued:

"That said, high gold prices haven't prevented the official sector from increasing their gold reserves in the past. What's more, according to a Fitch Ratings report, the level of negative-yielding global debt has risen to almost $12 trillion in July, a 12.5% increase since the end of May as the economic and political uncertainty following the UK's vote to leave the European Union ("Brexit") has boosted demand for safe havens. With rates having turned negative in most of Europe and Japan and likely to remain so for some time on "Brexit" woes, the opportunity cost of holding gold has all but disappeared."

Central banks and retail investors alike are hunting for safe assets with a decent yield. As Gambarini noted, the government bonds of some the world's strongest economies are safe bets but have negative yields.

That's likely to boost the case for gold as a strategic asset for the world's central banks, according to Gambarini.

"In particular, we expect central banks from developing economies to be the main source of demand from the official sector in the future," wrote Gambarini. Historically, they've had much less gold in their reserves compared to their developed counterparts, she said.