By Neil MacLucas

ZURICH--The Swiss National Bank and the People's Bank of China have agreed to set up a currency swap line designed to boost trade and investment flows between the two countries and help to make Zurich an offshore hub for trading the yuan.

The Swiss and Chinese central banks Monday said the three-year agreement will allow them to buy and sell their currencies up to a limit of 150 billion renminbi, or 21 billion Swiss francs ($23.4 billion).

The deal will also allow the SNB to buy up to 2 billion francs worth of Chinese bonds, helping it diversify its foreign-exchange reserves which have swelled to almost 450 billion francs.

"From China's perspective the agreement creates the infrastructure to solve two problems. The first is how domestic banks are going to be financed as the county opens its capital accounts and the second is to allow foreign investors to invest in the market," said Diana Choyleva, economist at consultancy Lombard Street Research.

The Zurich-based SNB said the agreement will further strengthen collaboration between it and its Chinese counterpart and is a "key requisite for the development of a renminbi [yuan] market in Switzerland."

The Swiss Department of Finance welcomed the agreement, which it said represented a key precondition for expanding the trade in yuan in Switzerland and in emphasizing the role played by Switzerland in expanding the global use of the Chinese currency.

The head of the department of finance, Eveline Widmer-Schlumpf, and SNB President Thomas Jordan met with the Chinese centralbank governor, Zhou Xiaochuan, in June to discuss greater financial-sector cooperation.

Since 2009, as part of its effort to revamp the country's creaky financial system, the Chinese government has been pushing for a greater role for the yuan on the world stage.

So far China's central bank has signed currency-swap agreements with central banks in more than 20 countries--including the U.K. and Australia, and the European Central Bank.

The swap deals are designed primarily to allow central banks to ease liquidity squeezes during periods of financial market tension, but will also boost two-way investment.

"There is very little investment activity in the Chinese currency so this is good news for small and large Swiss banks," according to UBS currency strategist Thomas Flury.

China is a key trade partner for the Alpine country, and represents its biggest export market outside of Europe and North America. Two-way trade between them reached about 5.4 billion francs in 2013, and this volume is likely to increase after the two last year signed a free-trade agreement, giving them improved access to each others markets.

In addition to the potential trade flow benefits, the swap deal also shows the SNB is actively trying to diversify its reserves of foreign currency, whose ratio has swelled to around 70% of its economic output, compared with less than 10% before the financial crisis erupted in 2008.

"Switzerland is not too late to the party," Lombard Street Research's Ms. Choyleva said.

Swiss authorities have to be very careful in assessing the risk associated with the Chinese bond market, she added.

Write to Neil MacLucas at neil.maclucas@wsj.com

(END) Dow Jones Newswires

July 21, 2014 06:49 ET (10:49 GMT)

Copyright (c) 2014 Dow Jones & Company, Inc.