* UBS makes 865 mln francs provision to settle U.S. lawsuit, other matters
* UBS Q2 net profit up by nearly two thirds year-on-year
* Julius Baer H1 results beat expectations; net new money below target
* Shares in UBS and Julius Baer surge to two-year highs
* Credit Suisse estimated U.S. litigation to cost Europe banks $11 bln
UBS's second-quarter profit beat forecasts even though it agreed to settle a lawsuit with the U.S. housing regulator over the mis-selling of mortgage-backed bonds, boosting shares in Switzerland's largest bank to two-year highs.
A number of European banks - including Deutsche Bank , Barclays, Credit Suisse, HSBC and Royal Bank of Scotland - collectively face possible multi-billion dollar bills arising from U.S. cases involving mortgages, which lay at the heart of the 2008 financial crisis.
UBS said on Monday it had reached an agreement in principle with the Federal Housing Finance Agency (FHFA), prompting it to release its headline second-quarter results more than a week early, showing net profit had jumped by nearly two thirds.
The Zurich-based bank did not say how much the FHFA settlement would cost but it took a charge of about 865 million francs ($920 million) to cover litigation costs, provisions and writedowns related to the deal and a Swiss tax agreement with Britain.
The FHFA sued 18 banks, accusing them of misleading U.S. government-sponsored mortgage companies Fannie Mae and Freddie Mac about $200 billion in mortgage-backed bonds they purchased.
UBS did not reveal on Monday whether it would admit to mis-selling the bonds, although it said the settlement cost would be covered by charges taken in the second quarter and previous periods. Citigroup and General Electric have already settled with the FHFA for undisclosed sums.
Last week 14 banks, including UBS, lost an attempt to have a U.S. appeals court intervene in their cases with the FHFA amid complaints by the banks about the judge hearing their cases.
Analysts at Credit Suisse had previously estimated UBS faced a possible $1.2 billion litigation loss from the FHFA lawsuit and a further $2.3 billion in U.S. mortgage-related legal costs including class action suits by investors.
They also estimated a total $11 billion hit for European banks from U.S. mortgage-related litigation. UBS and Deutsche Bank, with a possible bill of $2.1 billion, would account for just over half that.
Deutsche had set aside 2.4 billion euros at the end of the first quarter to cover litigation, with sources telling Reuters the biggest outlay was for U.S. mortgage-related costs.
Despite the uncertainty over lingering U.S. litigation, shares in UBS jumped by more than four percent to 18.35 francs - levels not seen since March 2011 - after the bank said its second-quarter net profit rose to 690 million francs from 425 million in the same period last year. This beat analysts' forecasts that were closer to 560 million.
"The earnings are quite a bit a better than expected, capital also looks good, and net new money at the private banks surpassed our estimates," Zuercher Kantonalbank analyst Andreas Venditti said. He has an "overweight" rating on the stock.
TAX & MORTGAGES
UBS did not give a break-down of its second-quarter profit, with detailed results due on July 30, but analysts said they suggested strong performances from both the investment bank and its wealth management arm.
UBS said its wealth management arm attracted 10.1 billion francs of new money and its U.S.-based brokerage attracted 2.7 billion, although its asset management division suffered 2 billion francs in outflows
The private bank, which attracted the most customer money in six years in the first quarter, is the centrepiece of UBS's drive to recover from the financial crisis, after selling large parts of its fixed income business and cutting 10,000 jobs.
Activist investor Knight Vinke, which is calling for UBS to hive off its investment bank, said possible losses at the investment division remained a threat and it would seek a meeting with the bank's board after meeting fellow investors.
So far, New York-based Knight Vinke has met shareholders representing over 30 percent of UBS's shares to drum up support for its campaign. Meetings will continue through most of the third quarter, it said in a statement.
Smaller domestic rival Julius Baer also beat profit expectations on Monday due to increased trading by clients, propelling its shares to two year peaks.
Unlike UBS's strong private banking performance, however, Julius Baer missed new money targets and raised the cost of integrating Bank of America Merrill Lynch's overseas private bank, a flagship acquisition last year, by around 55 million francs.
At 1320 GMT, Julius Baer stock was up 5.68 percent at 42 francs, its highest level since February 2011, making it the second-fastest riser on the European banking index. UBS shares were up 2.67 percent at 18.08 francs.
Swiss banks are also under threat from attacks on strict banking secrecy in the country by cash-strapped foreign governments fed up with tax evasion by rich citizens.
Julius Baer is negotiating with U.S. officials to settle allegations it helped its wealthy U.S. customers to evade tax.
Chief Executive Boris Collardi told reporters the bank will make a provision in its accounts for a settlement once it has an indication of the cost. Negotiations over costs should begin before the end of the year, he said, adding that he expected it to be affordable.
Part of UBS's 865 million charge in the second quarter includes 100 million francs it had already disclosed as part of a withholding tax agreement between Switzerland and Britain, which came into force this year. They signed the agreement to settle a dispute over tax evasion by wealthy Britons holding accounts with Swiss private banks.
Private banks such as UBS and Julius Baer are spending far more to vet new clients as regulators get tough on firms that harbour tax cheats and money launderers, which eats into their profit margins.