This article is part of a series of articles that looks at Fannie Mae (FNMA 1.37%) and Freddie Mac (FMCC 1.10%) from an investment perspective. To read the full analysis, click here.

Just a few years ago, most investors and many members of the public had written off government sponsored entities Fannie Mae and Freddie Mac as dead.

But now the futures of Fannie and Freddie are far from certain.

Big name investors are talking up their investments in these companies, politicians are squaring off in a fight that has both sides in agreement and disagreement at the same time, and a series of lawsuits have been filed alleging unconstitutional actions at the highest government levels.

But I'm writing this series for the ordinary investor who looks at this and just wants to know in plain English what happened in the past, what's happening now, and what's the future holds for Fannie and Freddie investors.

What they did and why they went bust
In writing background information on Fannie Mae and Freddie Mac, I first acknowledge that I cannot include every detail of what happened at these companies as such information would fill multiple books and indeed, already has.

Instead, I am noting the key facts and details investors should know and condensing them into one background article to preface this series.

Fannie Mae and Freddie Mac traces their roots back to 1938 and 1970, respectively, and through their recent history they have been tasked with both delivering profits for their shareholders and promoting affordable housing.

They each built massive operations around guaranteeing mortgages and when most people pay their mortgages on time, and the GSEs only guarantee the highest quality mortgages to begin with, this is a relatively stable and profitable operation.

However, the mortgage bubble and subsequent meltdown brought the perfect storm to bleed the GSEs of billions of dollars.

Not only were more mortgages going into foreclosure but, in the years prior to the actual meltdown, the GSEs started buying and guaranteeing more lower quality sub-prime mortgages the increased default rates even higher.

The cause of Fannie and Freddie's lower quality portfolios remains quite the subject of political debate today with one side arguing the GSEs were pressured into taking these risks by the government while the other side blames poor lending practices at major banks and their strategy of shifting low quality loans off onto the GSEs.

Either way, Fannie and Freddie bled cash like you would expect companies living at the center of a mortgage meltdown to do.

A plan was put together to put the GSEs into conservatorship, with the Federal Housing Finance Agency (FHFA) as the conservator. In exchange for government bailout money, the Treasury obtained warrants to purchase 79.9% of each GSE's common stock and a deal whereby the GSEs would issue senior preferred stock yielding 10% to the Treasury in exchange for cash.

This arrangement continued until early 2012 at which point Fannie and Freddie had issued a combined $189 billion in 10% yielding senior preferred stock in exchange for cash.

But in 2012, the bleeding stopped and the GSEs even returned to a slight profit.

However, in August of that year, an amendment was added to the senior preferred stock purchase agreement whereby instead of the GSEs paying a 10% interest rate on the outstanding senior preferred stock, virtually all the profits of Fannie and Freddie would be paid to the Treasury on a quarterly basis.

The payments would not go toward reducing the outstanding senior preferred stock and would continue indefinitely.

As this agreement remained in place, Fannie and Freddie continued to grow their profits all the while shipping them to the Treasury per the terms of the amendment.

But as profits rose into the billions and then into the tens of billions, speculators began to take an interest in the common shares driving them from their lows around $0.30 up above the $1.00 level and drove preferred stock from trading as low as two cents on the dollar to around 10 cents on the dollar.

Further profit growth and the movements by large investors pushed common shares into the $3 to $4 range today and preferred shares to trade at around thirty to forty cents on the dollar varying by series.

The bottom line
Fannie Mae and Freddie Mac suffered extensive financial damage from their involvements in higher risk mortgages and this culminated in a government bailout that rose to a peak of $189 billion.

But since the, Fannie and Freddie have turned profitable again, but all those profits go to the Treasury under the terms of a new amendment added to the senior preferred stock purchase agreement in Aug. 2012.

With the government in control of Fannie and Freddie, the GSEs have only two ways out of limbo: Congress and the courts.

This article is part of a series of articles that looks at Fannie Mae and Freddie Mac from an investment perspective. To read the full analysis, click here.