Fannie Mae and Freddie Mac passed the first official test designed to measure whether the two largest buyers of U.S. mortgages have enough capital to withstand wide swings in interest rates or home prices.

Fannie Mae's total capital was $27.3 billion as of Sept. 30, exceeding a risk-based capital requirement of $21.4 billion, according to the Office of Federal Housing Enterprise Oversight, the companies' regulator. Freddie Mac's total capital was $23.1 billion, exceeding its requirement of $4.9 billion.

The standard measures whether Fannie Mae and Freddie Mac can withstand a "severe" interest rate increase or decrease. The regulator also tested the effect on Fannie Mae and Freddie Mac's capital if home prices were to drop the most they've ever fallen anywhere in the United States for any 10-year period in the past 20 years.

"There's no doubt Fannie Mae and Freddie Mac are prepared for the perfect storm in interest rates; the question is at what cost" they pay to hedge their positions, said Paul J. Miller, an analyst at Friedman Billings Ramsey & Co. in Arlington. Miller, who rates both companies "outperform," said the results of the test were expected.

Fannie Mae shares declined 16 cents, to $65.04, in New York Stock Exchange trading. Concern that Fannie Mae was taking on too much risk to meet its earnings growth target has contributed to an 18 percent decline in the company's shares this year. Freddie Mac rose 19 cents, to $59.01. Its shares are down 10 percent this year.

The oversight office has the authority to remove management, eliminate stock dividends or force sales of assets if either company fails to comply with the risk-based capital standard.

Rising home prices, interest rate hedges and mortgage insurance have combined to increase the value of collateral on the loans owned by Fannie Mae and Freddie Mac, reducing the risk of default and the amount of required capital, the regulator said in a statement.

Fannie Mae's core capital, which includes common stock, preferred stock and retained earnings, was $26.5 billion, or $729 million more than its mandated minimum, $25.8 billion. Freddie Mac had core capital of $22.7 billion, more than its $20.5 billion minimum.

Critics of Fannie Mae and Freddie Mac have said the companies use the advantages of their government charters to increase the size of their borrowings to levels that could pose a risk to the financial system and taxpayers if they fail.

The companies have the ability to ask the Treasury to buy up to $2.25 billion of their debt, which investors have said suggests the government would take measures to prop them up in times of financial difficulties.