What you need to know if Fannie and Freddie go away

AP

Five years after the housing market imploded, Congress has revived a debate about what to do with Fannie Mae and Freddie Mac, the two government-backed mortgage lenders that taxpayers bailed out in 2008.

President Barack Obama stepped in Tuesday, saying it was time to "wind down" the agencies.

But given the long list of thorny issues surrounding the housing collapse, Fannie and Freddie's role in that and the ongoing decline in U.S. home ownership, don't expect to see big changes in the mortgage market anytime soon.

There's no shortage of proposals to put Fannie and Freddie out of business. In the House, Republicans want mortgages funded pretty much entirely by private investors. In the Senate, a bipartisan bill would keep the government involved with a more limited mortgage guarantee designed to keep mortgages more widely available and affordable than those backed only by private investors.

In any case, removing Fannie and Freddie guarantees will likely raise the cost of getting a mortgage because private investors would have to bear a bigger share the cost of defaults.

Why do we need Fannie and Freddie in the first place?

Fannie and Freddie have deep roots in the U.S. mortgage market that stretch all the way back to the housing collapse in the Great Depression. After private lending all but dried up, the government stepped in to buy mortgages, which freed up cash to finance the next wave of home loans. The system worked fairly well for more than 50 years before a mania of bad lending sank the mortgage market.

Private lending has once again all but shut down. Without Fannie and Freddie—or some similar government-backed alternative—the housing market would likely grind to a halt.

During the housing boom, more than 60 percent of mortgages were funded by investors in the so-called secondary market without government backing. Since then, private investors essentially have fled the mortgage finance market. Nearly 90 percent of mortgages written today are backed by Fannie or Freddie.

That helps lower the cost of borrowing and makes more money available to homebuyers, but it increases the cost to taxpayers when Fannie and Freddie take on too much risk.

(Read more: Obama to push for housing reform of mortgage giants)

How did Fannie and Freddie get into so much trouble?

The simple answer is that they tried to compete with Wall Street. During the housing boom, mortgage brokers and Wall Street bankers cooked up a financial model that churned out hundreds of billions of dollars in profits funding loans for borrowers who couldn't pay them back. Fannie and Freddie, which are both owned by shareholders, followed Wall Street deep into the mortgage mess to capture some of those profits for shareholders.

As any kid with a little extra lunch money will tell you, lending to people who can't pay you back turned out to be a huge mistake. Mortgage default rates soon soared and house prices collapsed, sending the global economy and financial system into a tailspin. When the dust settled, Fannie and Freddie were broke. To keep them going, the government took them over and fed them $187 billion in cash.

Wow. Are they still siphoning money from the Treasury? How much is all this costing us?

Fortunately, the bleeding stopped in March 2011. Since then, the money has been flowing the other way.

Just as the housing market has recovered, so have Fannie and Freddie's finances. That's because the two major forces that swamped them with losses—falling home prices and rising mortgage defaults—are now helping to boost profits. On Wednesday, Freddie Mac said second-quarter earnings jumped 65 percent, to $5 billion, its second-highest profit ever.

Loans written and guaranteed since the bust are performing much better, largely because the job market is improving and credit standards are far tighter. The average credit score for a Fannie and Freddie loan was 756 last year—up from 720 in the go-go lending of 2006.

And the value of loans on their books has bounced back as house prices have risen.

Since returning to the black in 2011, Fannie and Freddie have been sending profits back to the Treasury, paying nearly $132 billion in dividends to the government. Freddie is also sitting on some $29 billion in potential gains from tax credits, which helped Fannie pay a nearly $60 billion dividend in the first quarter.

In other words, if the housing recovery stays on track, Fannie and Freddie will have repaid the bailout within a few years and will keep generating a reliable stream of cash for the federal government.

(Read more: Buying a home is not for everyone: HUD Secretary)

So why not just keep them going?

First of all, everyone wants to avoid a repeat of the Fannie-Freddie bailout. Some—including Obama—argue that the risk of that happening remains as long as they can generate profits, writing new loans, with taxpayers on the hook for losses.

"For too long, these companies were allowed to make huge profits buying mortgages, knowing that if their bets went bad, taxpayers would be left holding the bag," Obama said Tuesday in Phoenix. "It was 'heads we win, tails you lose.' "

Though they're profitable, Fannie and Freddie still cost the government billions more in what amounts to a subsidy for covering the risk of future defaults. It's not unlike letting an insurer collect premiums on a policy that it then hands over to the government when the policyholder files a claim for losses.

(Read more: Higher mortgage rates may mean easier credit)

What are Congress and the White House proposing to do about it?

The devil is in the details, which are still far from finalized.

The goal of all of these plans is to move more from the government to private lenders. But very few private lenders are willing to finance home mortgages under current rules. The only way to get them back into the market is to offer them great financial incentives—which will result in higher costs for borrowers.

''It will mean higher mortgage rates,'' said Mark Zandi, chief economist at Moody's Analytics. ''The question is how much higher.''

That's going to make it difficult to pull off one of the other major goals of Fannie and Freddie reform: Keeping mortgages widely available and affordable, especially for first-time buyers.

Housing advocates argue that these proposal don't go far enough in making sure that homeownership—which has declined to a 17-year low—doesn't fall further.

"Home ownership for the middle class or those entering the middle class is still—despite the financial crisis—the most significant way of developing intergenerational wealth," said David Berenbaum, chief program officer at the National Community Reinvestment Coalition. "We need to be sure the new system sustains that."

All these proposals still face a major hurdle. Until there's much stronger evidence that private mortgage financing is coming back, any effort to wind down Fannie and Freddie would throw a large bucket of cold water on a housing recovery that has only recently begun to gain momentum.

And no member of Congress—let alone the president—wants to run the risk of having his or her name on a law that slows or reverses that recovery.

—By CNBC's John W. Schoen. Follow him on Twitter at @johnwschoen.