WASHINGTON — In the latest sign that the worst might be over for the battered US housing market, the two government-controlled mortgage finance giants, Fannie Mae and Freddie Mac, this week reported some of their best quarterly results since the real estate collapse.
On Wednesday, Fannie Mae posted second-quarter net income of $5.1 billion. That is up from $2.7 billion in the first quarter of this year and an improvement from a net loss of $2.9 billion in the second quarter of last year. Fannie requested no additional money from the Treasury and said it would pay a $2.9 billion dividend to taxpayers.
On Tuesday, its brother organization, Freddie Mac, announced second-quarter net income of $3 billion, up from $577 million in the first quarter and a net loss of $2.1 billion in the year-ago second quarter. It also requested no additional federal aid and said it would pay a $1.8 billion dividend to the federal government.
“We’ve have had two very good quarters,’’ Timothy J. Mayopoulos, who became Fannie Mae’s chief executive in June, said in an interview. ‘‘In the longer term, we’re encouraged by what we see, but it’s going to be driven by factors that are bigger than we are,’’ including unemployment and consumer confidence.
The mortgage giants have moved into the black as US home prices have increased, delinquency rates have continued to fall, and what analysts have cautiously described as a housing recovery has begun to take hold.
Both Fannie Mae and Freddie Mac said that loans made during the housing bubble — loans on which homeowners were more likely to default — were becoming smaller proportions of their portfolios.
This week, CoreLogic, a real estate data firm, said that home prices rose 2.5 percent in June compared with a year ago. There has also been a surge in refinancing, as homeowners have taken advantage of record low interest rates.
‘‘At the halfway point, 2012 is increasingly looking like the year that the residential housing market may have turned the corner,’’ Anand K. Nallathambi, CoreLogic’s president, said in a statement.
Both mortgage financiers said that loans made during the housing bubble — loans on which homeowners were more likely to default — were becoming smaller proportions of their portfolios. That means that the two mortgage giants expect smaller losses on bad loans and better earnings on good ones.
Freddie said loans that originated from 2005 to 2008 accounted for about a quarter of their portfolio of single-family mortgages, and loans originated after 2008 were more than half.
Housing specialists caution that the increase in home prices might not augur a housing turnaround — and that further losses might still lie ahead for the mortgage financiers. Although prices increased in June, home sales declined by 5.6 percent, the largest drop in 16 months, according to Capital Economics.
The housing recovery is held back by broader economic sluggishness, analysts said. Unemployment remains stuck above 8 percent. Wage growth is sluggish. Many US households are saddled with debt. Consumer confidence is low. That means relatively few families have the means or the desire to invest in a new house.
‘‘It’s too early to declare a national housing recovery,’’ Mayopoulos said. ‘‘The second half of the year is not likely to be as strong as the first half of the year. A big part of results we’re seeing came from a significant increase in home prices — and it is not clear to us that we’ll see further sustained increase in home prices for the next few quarters.’’