The Swiss bank UBS has reached a $19.4 billion agreement to buy back bonds in the biggest settlement yet over claims that banks misled investors to buy auction-rate securities, the Massachusetts Secretary of State’s office said Friday.

The agreement has been reached between UBS Financial Services Inc. and the federal Securities and Exchange Commission and regulators in several states, including Massachusetts and New York.