Investors who are looking for high-yielding stocks should consider real estate investment trusts (REITs). Most of these companies invest in physical real estate, and because they are legally required to pay out at least 90% of their income as dividends annually, they often sport highly attractive yields.

Mortgage REITs, though, are a little different from those that invest in commercial rental property. Instead, they invest in real estate debt. The two biggest mortgage REITs are AGNC Investment (AGNC 0.97%) and Annaly Capital (NLY 1.02%). Which one is the better buy? 

Abstract picture of financial data

Image source: Getty Images.

AGNC and Annaly hold mortgage-backed securities guaranteed by the government

AGNC Investment invests primarily in mortgage-backed securities that are guaranteed against homeowner default risk by the U.S. government. These mortgage-backed securities are generally issued by the government-sponsored enterprises Fannie Mae and Freddie Mac. If you recently bought a house and your mortgage was backed by Fannie Mae or Freddie Mac, chances are, that loan ended up in a mortgage-backed security of the type that AGNC invests in. 

The failure of Silicon Valley Bank and the general stress that some regional banks are experiencing now stems partly from the declining market prices of the types of securities that AGNC owns. The difference is that AGNC Investment hedges its interest rate risk, while Silicon Valley Bank did not. Even with those hedges, mortgage REITs struggled last year as mortgage-backed securities underperformed U.S. Treasuries, a competing investment. 

Annaly has more credit risk than AGNC Investment

Annaly Capital invests in a wider variety of assets than AGNC Investment. Beyond its portfolio of agency mortgage-backed securities, it invests in mortgages that are not guaranteed by the government. Annaly's non-agency mortgages are typically made to professional real estate investors and developers. These tend to carry higher interest rates to compensate for the added credit risk. 

It also buys mortgage servicing rights -- one of the only mortgage-related asset types that did well last year amid rising interest rates. Mortgage servicers perform the administrative duties involved with loans on behalf of the investors who own them. Servicers send out the monthly bills, collect payments, forward those payments to investors, ensure that taxes and insurance are paid, and work with the borrower in the event of default. In return, servicers are paid 0.25% annually of the remaining principal on each loan they handle. The right to perform these services is worth something, so it's categorized as an asset. Mortgage servicing rights are among the few assets that increase in value as interest rates rise. As such, they saved the day financially for a lot of mortgage companies last year. 

Mortgage servicing valuations have been supported by two things: rising interest rates and extremely low delinquencies. The Federal Open Market Committee signaled at its last meeting that its interest rate hikes may be coming to an end, but if it succeeds in slowing down the economy to cool off inflation, delinquencies will likely go up. The big risk for Annaly Capital is that rather than a slowdown into a soft landing for the economy, the U.S. will slide into a recession. 

A recession would hurt Annaly more than AGNC Investment

A recession would hit Annaly Capital much more than AGNC Investment. Because AGNC Investment's portfolio is mainly government-guaranteed, rising delinquencies will not affect it as much. But rising delinquencies would hurt Annaly's servicing portfolio since those increase its servicing costs. Annaly's credit products will probably see an increase in delinquencies, especially if U.S. real estate prices plateau or go down. 

At their current share prices, AGNC Investment yields 15.7%, while Annaly Capital yields 13.9%. Annaly cut its dividend last year -- as did most mortgage REITs. But AGNC Investment has thus far maintained its payout at previous levels despite the turmoil in the mortgage market. The mortgage industry will probably remain under pressure until the Fed gives the all-clear signal on interest rate hikes. So investors might want to wait until that happens before diving in to this stock. That said, the prospective returns in the mortgage sector relative to interest rates are at historically attractive levels.

A recession is probably the biggest risk that mortgage REITs face in the near term, but if one occurs, AGNC would fare better than Annaly.