ZURICH, Switzerland -- ( TheStreet) - Shares of UBS ( UBS) were trading almost 7% higher in Europe after the Swiss bank posted stronger-than-expected second-quarter profits. UBS swung to a profit of 2 billion Swiss francs ($1.9 billion) from a year-earlier loss of 1.4 billion francs, exceeding analysts' estimates. UBS said operating income rose to 9.19 billion francs from 5.77 billion francs a year earlier. Pretax profit at UBS' investment bank rose 10% to 1.3 billion francs. The earnings included a credit gain of 595 million francs. "This was a good result in volatile market conditions, and demonstrates the progress we are making," UBS CEO Oswald Gruebel said. "I remain confident in our future and I firmly believe that we have the right strategy in place." UBS said net outflows at its private banking business were 5.2 billion francs in the second quarter, down from 8 billion francs in the first quarter. The bank warned that doubts about the economic recovery could lead to subdued client activity later this year. Meanwhile, UBS said it expected an end to its U.S. regulatory problems now that the Swiss parliament has approved closer cooperation with the Internal Revenue Service. -- Reported by Joseph Woelfel in New York. Get more stock ideas and investing advice on our sister site, Stockpickr.com.