There's a company that has gained nearly 50% in the past year; its future looks bright and shiny even as the rest of the market foresees doom and gloom. Would you believe I'm talking about a company whose sole business model is surrounded by leveraging in mortgage-backed securities?

Believe it. Welcome to Annaly Capital Management (NYSE: NLY).

On Tuesday, New York-based Annaly reported fourth-quarter net income of $151 million, or $0.37 per share, versus $0.23 per share during fourth-quarter 2006.

Talk about a dark horse. The company seems untouched by the toxic subprime fallout that has been so brutal to so many companies associated with mortgages.

Its business basics are pretty straightforward: The company raises capital and invests in mortgage-backed securities, and the difference between the cost of borrowing money and the interest received from the investment, minus expenses, equals total profit. This is similar to a bank's net interest margin.

Because this spread can be small -- Annaly's annualized interest rate spread for the quarter averaged just 0.88% -- it requires a lot of leverage to juice returns. It produces hefty cash flow when times are good, but it can come back to bite you when the value of your investments falls, as was the case for Annaly competitors Impac Mortgage Holdings (NYSE: IMH) and Newcastle Investment (NYSE: NCT) over the past year. 

What sets Annaly apart from the rest of the REIT crowd? It didn't get involved with debt that isn't guaranteed by government-sponsored Fannie Mae (NYSE: FNM), Freddie Mac (NYSE: FRE), or Ginnie Mae. That said, the investments it holds are safer. The majority of the industry got cozy with subprime debt that provided higher returns in previous years. Annaly stuck to its guns and played it safe. Now we know why.

On top of that, Annaly mixes its investment portfolio with a variety of fixed- and adjustable-rate mortgages that hedge each other out in different interest rate environments. Right now falling rates favor the fixed-rate side; rising interest rates of years past favored the adjustable-rate end.

At the end of Q4, Annaly's average leverage ratio stood at 8.7:1 -- for every $1 of equity, it borrowed $8.7 to invest with. This time last year, the leverage ratio was 10.4:1, which shows that Annaly has scaled back in light of the turbulent market. Nonetheless, Annaly held $52.9 million worth of mortgage-backed securities at the end of Q4, up 75% from a year earlier.

As with any industry that experiences a period of irrational exuberance, as the mortgage market did in the past several years, there comes a shakeout that purges those who got carried away. While many are going or gone, Annaly looks like it will stand firm.

For related Foolishness:

Annaly is a Motley Fool Income Investor recommendation. You can enjoy a 30-day free trial to our market-beating service by signing up today.

Fool contributor Morgan Housel doesn't own shares in any companies mentioned in this article. He appreciates your questions, comments, and complaints. The Fool's disclosure policy is all about investors writing for investors.