NEW YORK (TheStreet) -- Shares of Fannie Mae (FNMA) and Freddie Mac (FMCC) traded in wild fashion on Tuesday, reversing early gains to show large double-digit declines in the last few minutes of trading.

Fannie Mae's common shares were down 30.8% to close at $4.03, while Freddie's common shares were down 26.8% to close at $4.04, after Senate Banking Committee Chairman Tim Johnson (D., S.D.) Senator and Mike Crapo (R., Idaho), the ranking member of the committee, announced they had come to an agreement on a bi-partisan proposal to wind-down the mortgage giants.

Fannie and Freddie -- together known as the government-sponsored mortgage enterprises, or GSEs -- were taken under government conservatorship at the height of the U.S. housing market meltdown in September 2008. The GSEs' common and preferred stocks remained publicly traded, but values plunged because dividends to non-government shareholders were suspended, and because it appeared highly unlikely at the time at the GSEs would eventually return to being highly profitable.

Over the past year, many institutional investors have jumped on what they consider to be a unique investment opportunity to scoop up common and junior preferred shares of Fannie and Freddie and wait out a long legal battle over government's treatment of private investors.

When the GSEs were bailed out by the government, the original agreement required Fannie and Freddie to pay the U.S. Treasury 10% annual dividends on the government-held senior preferred shares, however, in August 2012, after the GSEs had returned to profitability and after they had stopped increasing their borrowings form the government, the bailout agreement was changed so that all GSE profits were paid to the government, in excess of minimal capital cushions.

Following their March dividend payments, Fannie and Freddie will have paid total dividends of $199 billion on $189.4 billion in senior preferred shares held by the Treasury. Factoring in warrants that were handed to the government to acquire up to 79.9% of the GSEs common shares, Rafferty Capital Markets analyst Richard Bove on last week estimated the government's return on its investment in Fannie and Freddie was $238 billion.

There's no mechanism in place allowing either Fannie or Freddie to repurchase any of the senior preferred shares held by the government.  This apparently suits the Obama administration fine, since the huge dividend payments lower the federal deficit.  Meanwhile, the government has been bombarded with some 20 lawsuits from private investors seeking a place at the GSE table.

There was no mention in the statement from Sen. Johnson and Sen. Crapo of any consideration for private investors.

With so many institutional investors going on the record to say they were committed to their GSE investments for the long term, it would appear that Tuesday's action for the stocks was driven by retail investors, many of whom may have been covering margin calls.

GSE junior preferred shares also took a beating, but to a much lesser extent.  Fannie Mae's preferred Series S shares (FNMAS) were down 3.3% to $11.90, while Freddie's preferred Series Z shares were down 3.9% to $12.25.  Both issues have face values of $25, with investors hoping the junior preferreds will trade up to par if their dividends are restored.

While Tuesday's action was certainly painful for some investors, this chart shows that the declines in GSE common shares were relatively small, when compared to the amazing run for the stocks over the past year:

FNMA ChartFNMA data by YCharts

Banks' Excess Capital Is 'Absolutely a Reality'

Philip W. van Doorn is a member of TheStreet's banking and finance team, commenting on industry and regulatory trends. He previously served as the senior analyst for Ratings, responsible for assigning financial strength ratings to banks and savings and loan institutions. Mr. van Doorn previously served as a loan operations officer at Riverside National Bank in Fort Pierce, Fla., and as a credit analyst at the Federal Home Loan Bank of New York, where he monitored banks in New York, New Jersey and Puerto Rico. Mr. van Doorn has additional experience in the mutual fund and computer software industries. He holds a bachelor of science in business administration from Long Island University.