The bank said its second-quarter results reflect 120 million francs it booked in the German case.
Prosecutors in the German city of Bochum confirmed the settlement. They said they expect also to close proceedings against individual bank employees in exchange for fines, and that in one case they have sought a 250,000-euro fine.
UBS's quarterly financial statement said all of its business divisions and regions delivered strong second-quarter operating performances, and that it continued to build its capital reserves in keeping with global and Swiss rules.
"We delivered strong underlying results in a market environment that remained challenging for our clients and the industry," Chief Executive Sergio Ermotti said.
Looking ahead, the bank said the outlook is clouded by challenges in Europe, where economic growth remains fragile and fiscal and monetary policy issues in the U.S., where the Federal Reserve is gradually tightening its stimulus taps. It also cited global geopolitical instability, with Western powers considering more sanctions on Russia and with fighting on the rise parts of the Middle East.
Other possible problems remain. In its report, UBS said it is "responding to inquiries" from U.S. regulators and the New York attorney general over the operation of its "dark pool," an alternative trading system.
Those include a 2 ½ year-old investigation by the Securities and Exchange Commission into features "including certain order types and disclosure practices that were discontinued two years ago," UBS said, adding that it is cooperating.
It said it also is among dozens of defendants, including trading exchanges and high-frequency trading firms, named in putative class-action suits pending in New York federal court.
Last month, New York's attorney general announced a securities fraud lawsuit against Britain's Barclays PLC, which he said misled large institutional investors and other clients by falsely telling them it was taking measures to protect them from predatory high-frequency traders.
UBS's German rival Deutsche Bank said in its own second-quarter report Tuesday that it had "received requests for information from certain regulatory authorities related to high frequency trading," and is cooperating. It said that it also had been named as a defendant in putative class-action complaints allegation violations of U.S. securities laws.
UBS shares slid 0.9 percent to 16.47 francs in Zurich trading.