What happened

Mortgage giants Fannie Mae (OTC:FNMA) and Freddie Mac (OTC:FMCC) have been some of the best-performing stocks in the market recently, thanks to optimism and anticipation surrounding the Trump administration's plans to overhaul the U.S. mortgage finance system and return the two companies to the private market.

In the past month, the two companies have risen by nearly 50%, and on Monday alone, Fannie and Freddie are up by 23% and 22%, respectively, as of 11 a.m. EDT.

For sale sign in front of a house.

Image source: Getty Images.

So what

As I mentioned, the Trump administration recently unveiled its plan to reform Fannie and Freddie, but the plan failed to get investors excited. There were simply too many vague statements and an overall lack of answers to the question of how the mortgage giants will be recapitalized.

On Monday, Treasury Secretary Steven Mnuchin gave investors some much-wanted details, saying on Fox Business that an agreement between the Treasury and the FHFA that would end the profit sweep from the two companies is in the works, allowing them to retain earnings and recapitalize. If you aren't familiar, since the government's crisis-era bailout, Fannie and Freddie have been required to send their profits to the government.

The administration's plan vaguely called for the agencies to retain some of their profits to start building up capital, raising questions about how they could build enough capital to reasonably function as private companies.

Now what

Mnuchin said that the forthcoming agreement would produce "a significant increase in capital and a step in the right direction to us ultimately raising third-party capital" and also emphasized that the priority is to build up adequate capital before the companies are released from government control.

A government focus on building up capital for the companies is a big step in the right direction, and investors seem to agree.