BERLIN — Swiss bank UBS says it plans to buy back a fund set up during the 2008 financial crisis into which it offloaded high-risk assets.

UBS AG says it expects to exercise an option to buy the so-called StabFund from the Swiss National Bank in the fourth quarter. It says the move will boost its capital position.

The fund purchased $38.7 billion in UBS assets using money provided by the central bank — less than foreseen in the bailout package originally designed by the government, which reserved $54 billion to help UBS dispose of high-risk securities.

Tuesday's announcement came as UBS released its second-quarter earnings report, confirming that it earned 690 million francs ($743 million), up from 524 million francs a year earlier. Earnings at its investment bank leapt.