UBS (UBS) - Get UBS Group AG Report finally agreed to buy back illiquid auction rate securities, a move that took some of the uncertainty out of the stock. Its shares traded higher as part of the broader financial sector's modest move higher Friday.

The Swiss-based bank has been under pressure for months as various states have filed lawsuits against the bank claiming it misled customers about the risk levels of the product. UBS had listed the product as a cash equivalent and implied to customers that it would support the auction and not let them fail. However, the auctions collapsed and UBS was unable to find markets for its customers. UBS reached an

agreement that will cost it $19.4 billion

to take back the bonds. UBS shares rose 95 cents, or 4.6%, to $21.35.

The NYSE Financial Sector index advanced 162.43, or 2.6%, to 6,543.02.

Auction rate securities have also caused trouble for

Bank of America

(BAC) - Get Bank of America Corp Report

, which has received subpoenas and requests for information from the

Securities and Exchange Commission

and various state agencies. BofA also faces lawsuits similar to what UBS has faced. But the stock managed to weather the news fairly well, and shares were actually rising 91 cents, or 2.9%, to $32.43.

MBIA

(MBI) - Get MBIA Inc. Report

managed to rally on its

second-quarter earnings report

TheStreet Recommends

Friday. The bond insurer jumped 8.5% to $8.98 after reporting that its profits benefited from the gain in value on its derivatives. The gain was recognized due to a new accounting rule. Recent downgrades have created a more difficult environment to win new business, but investors focused on the positive and sent the stock skyward.

As expected,

Fannie Mae

undefined

reported a

loss for the second quarter

, but it was triple what the market had expected. The nation's largest mortgage lender will be making major cutbacks and raising fees, which will be passed on to borrowers. Fannie lost $2.54 a share whereas analysts had forecast a loss of 68 cents a share, according to Thomson Reuters. The loss was blamed on homeowners defaulting on loans. The stock plunged 8.5% to $9.10.

The news from Fannie Mae sent

Washington Mutual

(WM) - Get Waste Management, Inc. Report

, another big lender, tumbling as well. WaMu shares fell 6.6% to $4.64 as investors again began to worry about the health of the bank. Its chief executive assured investors after the market closed on Thursday that the bank did not need to raise any more capital and that it had shored up its balance sheet. But by Friday, investors lost comfort and began selling.

Across the pond, the

Royal Bank of Scotland

(RBS) - Get Royal Bank of Scotland Group plc Sponsored ADR Report

reported a huge loss of $1.56 billion for its first half, the first in the bank's 40-year history as a public company. But apparently, it wasn't as bad as some analysts had forecast and the stock was only down 2 cents at $4.76. The U.S. subprime-mortgage market was to blame for the losses.