What happened

Shares of the Federal National Mortgage Association (FNMA 0.34%) were surging on Wednesday, up about 18.8% as of 2:15 p.m. ET. The over-the-counter (OTC) security, also known as Fannie Mae, is trading at around $0.59 per share and is up some 68% year to date.

The markets were trending lower on Wednesday as the S&P 500 index fell 14 points (0.3%), the Dow Jones Industrial Average dropped 57 points (0.1%), and the Nasdaq Composite plunged 80 points (0.6%) as of 2:15 p.m. ET.

So what

Federal National Mortgage Association, or Fannie Mae, is a government-sponsored entity that acquires mortgage loans from smaller banks or credit unions and guarantees these loans for low- to median-income borrowers on the secondary market.

The stock surged on Wednesday, likely on the news that a federal grand jury awarded shareholders $612 million in a lawsuit they filed against the Federal Housing Finance Agency (FHFA). The shareholders claimed that the FHFA improperly amended stock purchase agreements in 2012 to sweep all the profits from Fannie Mae and its brother organization Freddie Mac, or the Federal Home Loan Mortgage Corp. (FMCC 1.47%) to the U.S. Treasury.

The shareholders in the case, Berkley Insurance Co., et al., vs. the Federal Housing Finance Authority, et al., initially sought $1.6 billion, but was awarded $612.4 million by the jury, split fairly evenly between Fannie Mae and Freddie Mac.

"The government deserved and would have received, without the net worth sweep, a huge profit on its investment. But it was not entitled to 100% of all profits forever. That was not the deal made in September 2008. Private preferred shareholders invested over $32 billion, of which $20 billion was at the behest of government regulators during the housing crisis years of 2007 and 2008," lead attorney for the shareholders, Hamish Hume with Boies Schiller Flexner, said, reported National Mortgage Professional.

Now what

So, while it was a good day for Fannie Mae and Freddie Mac shareholders, keep in mind that these are OTC penny stocks that don't trade on the major exchanges. As such, they are volatile and prone to wild swings, as we've seen in recent years.

Also, the housing market is still struggling, with high interest rates and low supply. That said, the outlook is improving, and Fannie Mae saw a 7% year-over-year increase in net income in the second quarter to $5 billion. After a couple of brutal years the past two years, it might still have a little more bounce in it. But long-term, you can expect volatility.