What happened

The stock market is having a decent day on Wednesday, with the Dow Jones Industrial Average and S&P 500 both up by about 1% as of 11 a.m. EDT today.

But mortgage real estate investment trusts, or mortgage REITs, were another story altogether. Most of these volatile high-yield stocks are soaring today. Sector leader Annaly Capital Management (NYSE:NLY) was higher by 24%, New Residential Investment (NYSE:NRZ) was 25% in the green, and some of the smaller mortgage REITs are doing even better. New York Mortgage Trust (NASDAQ:NYMT) and TPG Real Estate Finance Trust (NYSE:TRTX) were up by 42% and 30%, respectively.

This comes on the heels of big gains earlier in the week. The four companies mentioned above are all sitting on gains of 36% to as much as 80% since the beginning of the week.

House keys on top of mortgage loan documents.

Image source: Getty Images.

So what

For one thing, mortgage REITs were absolutely crushed in the recent market downturn. Most are still down by 50% or more since the beginning of February, even after the massive rallies so far this week. And before we can understand why these stocks are rising this week, it's important to understand why they've been so beaten down lately.

While falling interest rates are generally thought to be good for mortgage REITs, the main problem has been uncertainty. The recession resulting from the COVID-19 pandemic is still in its very early stages, and there's no way to know how long or deep it could be. This is making the mortgage-backed securities owned by these companies worth less until we get some clarity (especially those that own non-agency mortgages). After all, in a prolonged recession, more homeowners could have a tough time paying their bills, as opposed to a quick V-shaped recovery. Higher credit risk translates to lower prices.

Plus, short-term borrowing costs have spiked as fears about liquidity in the mortgage market have increased recently. Mortgage REITs generally borrow at short-term interest rates and buy mortgages that pay higher long-term rates, profiting from the difference between them. When short-term costs go up, their profits shrink. This typically happens when short-term benchmark interest rates (like the federal funds rate) rise, but not always.

Finally, mortgages REITs own hedges to protect against rising interest rates, and these hedges have plunged in value as benchmark rates have fallen to record lows. And lower mortgage rates bring higher prepayment risk (refinancing applications were up 144% year over year last week).

All of this has led to margin calls, dividend cuts like the one New Residential just announced, and other tough conditions for these companies. Mortgage REITs are mainly attractive to investors because of their massive dividends, so if the payouts are in jeopardy, it's bad news.

Now what

In a nutshell, mortgage REITs do best in stable environments. You could use many different words to describe the stock market recently, but stable isn't one of them. These REITs do best when both short-term interest rates and mortgage rates stay relatively constant.

Well, this week we're starting to get the first signs of stability since the pandemic began. Not only have interest rates begun to stabilize, but we're starting to see signs that the number of new COVID-19 cases and deaths may be reaching their peak, which means overall economic stability could return sooner than originally feared.

In addition, it looks like many of the mortgage REITs are taking prudent steps to address their near-term financial issues, such as New Residential's dividend cut after liquidating some of its assets to satisfy a margin call.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.