Last week, among the flurry of earnings results, came mixed earnings from a very old, established, and respected company that most people have never heard of. This company works in an esoteric part of the financial sector and its business model is itself esoteric, and its money-making model has been pressured repeatedly over the last few years, resulting in quarters of negative millions in net income.

I’m talking about Annaly Capital Management (NLY), which rose 4% following its earnings result. Never heard of it? Don’t fret—few have. That’s because this firm specializes in the mREIT space. Never heard of that? Again, not surprising—we’re talking about an obscure corner of an obscure sector.

Let’s back up and discuss what Annaly does before jumping into why it shot up.

Annaly is what’s known as a “mortgage real estate investment trust”, or “mREIT”. You may be familiar with REITs—firms structured to collect capital from multiple investors, pool it together, and invest it in real estate. Simple enough. Most REITs are known as equity REITs, meaning they buy, own, and rent out actual physical real estate and then pass on the rental income (minus management fees) to shareholders.

Simple enough.

mREITs follow the same principle, but instead of buying actual physical property, they buy mortgage-backed securities (MBSs). Here’s where things get complicated. MBS is familiar to anyone who has watched “The Big Short”—these are financial products that are created by pooling together hundreds or thousands of mortgages and creating a bond-like debt that pays out income from those mortgages. mREITs like NLY buy those MBS’s and get that income instead of the rent on property.

So why did the market cheer Annaly’s results? Mostly because of an EPS beat; earnings were a penny over expectations at 30 cents per share, which means the company has a 100% dividend coverage ratio. This is good news, since it’s been over a year since NLY covered its dividend fully.

Astute investors will quickly notice a problem. The short-term boost is a result of short-term good news. The larger picture is more distressing. Which is partly why the stock is down 35% over the last five years.

Also not helping: the dividend has been cut six times in the last five years as investment income has failed to cover its previous payout level. Net income has plummeted from a high of $3.75 billion in 2013 to $255.2 million over the last twelve months. This wouldn’t be a problem if total shares outstanding were going down, making the dividend easier to cover, but shares have gone up 4.6% over the last five years to breach 1 billion for the first time. This means total dividends paid on an annualized bases are now over $1.2 billion. That is an improvement from the $2.15 billion five years ago but much more than the $200 million paid a decade ago.

Okay, so more cash is going out—but is the firm earning enough to cover that?

We answer that question by going back to EPS and dividend per share—right now they’re about the same figure. But will EPS go up in the future?

To answer that question we need to understand the mechanics of how MBS’s and mREIT’s work. These issues require extensive study in and of themselves (MBS’s are well covered in the CFA exam), but we can summarize the issue as follows. MBS’s earn mREIT’s income as borrowers pay their mortgages. Borrowers who prepay their mortgages and borrowers who default endanger that income stream; defaults also endanger the capital, which needs to be captured by foreclosure and reselling. If the house is not underwater, the MBS owner can be made whole.

As you can see, MBS income depends on interest rates. Higher interest rates on mortgages mean more interest income, which means more earnings for the MBS owners (like mREITs such as NLY). So the recent increase in mortgage rates is a good thing for these firms.

Higher interest rates are also bad for mREITs and were a main cause of their steep decline and negative earnings in 2013-2014. mREITs don’t just raise capital from shareholders to buy mREITs. They also borrow money to leverage that capital. And they borrow a lot. NLY has $7.9 billion in long-term debt and $75.3 billion in total liabilities versus $87.9 billion in total assets. Some quick math will tell us that NLY can earn about a 8.4% income stream if it uses all of its liabilities to lever its assets, assuming mortgages earn a 5% return and NLY pays 1% in interest. That means $7.38 billion in income, far above the $1.2 billion in dividends paid out.

A few problems here. I’m making these figures up and I’m not accounting for fees. When you look at the actual figures, the numbers are a lot less rosy—but the investment thesis on NLY also becomes much clearer. To do these calculations using NLY’s actual results, I advise you to look up its 10-Q and recent press release; all of the figures you need to do this calculation accurately are there.