(Bloomberg) -- Banks and other lenders have found a way to potentially make billions of dollars from the coronavirus-fueled upheaval in the U.S. mortgage market -- yet it risks burning bond investors in the process.

The earnings would come from an unanticipated side-effect of Congress’ decision in March to allow homeowners affected by the pandemic to delay loan payments for as long as a year, combined with arcane regulations governing mortgage-backed securities.

The net result is that lenders would get the chance to buy tens of billions of dollars in mortgages out of bonds for less than their current market value -- transactions that can hurt investors. Banks including Wells Fargo & Co. and U.S. Bancorp are already buying, frustrating bond holders who say the purchases are leading to losses. Lenders counter that the practice is hardly risk-free and has more to do with accounting issues than trying to score a quick profit.

“The banks are setting themselves up for a huge windfall,” said former Ginnie Mae President Ted Tozer, who now is a senior fellow at the Milken Institute and does consulting work for lenders. “It’s almost pure profit.”

Key to the transactions is Ginnie, a government-owned corporation that guarantees the payment of principal and interest on bonds containing mortgages insured by the Federal Housing Administration, Department of Veterans Affairs and other government agencies.

Ginnie Rules

Ginnie rules allow banks and other lenders to buy loans out of mortgage securities at their par value when a borrower hasn’t made payments for 90 days. Investors value most of those loans at 5% to 10% above par, meaning the purchases result in an immediate writedown for the bond holders and a potential profit for the lender when they’re able to resell the loan.

Wells Fargo in July and August bought $19 billion of loans out of Ginnie securities for $1.5 billion less than the loans’ market price, according to Dhivya Krishna, head of research for hedge fund Metacapital Management LP, which invests in Ginnie mortgage bonds.

U.S. Bancorp bought $5 billion of such loans for $380 million less. Other lenders have made smaller purchases, but some bond investors say the buying opportunities will grow in coming months as more borrowers go months without paying. Of course, that probably won’t materialize if the economy rapidly improves and lots of homeowners exit forbearance before reaching 90 days.

Read More: FHA Mortgage Delinquencies Reach a Record, Led by New Jersey

Wells Fargo and other lenders issue home loans and then package them into mortgage bonds that are backed by Ginnie. The servicers earn a fee for collecting borrowers’ monthly payments and then forwarding them to bond investors. If homeowners go into forbearance, the servicers still must advance payments to bond investors, though they eventually get reimbursed. They can eliminate that expense by buying delinquent loans out of mortgage securities.

‘In the Money’

Another factor at play is that accounting rules force lenders to put loans on their balance sheets if they have an option to buy the mortgages that is in the money, meaning that exercising it would turn a profit. On Wells Fargo’s second-quarter earnings call last month, Chief Financial Officer John Shrewsberry said accounting requirements had prompted its loan purchases.

Wells Fargo spokesman Tom Goyda said the bank regularly buys delinquent loans out of Ginnie pools to manage balance sheet impacts and to reduce expenses. “I can’t speculate about any potential future transactions involving the loans we’ve repurchased,” Goyda said in a statement.

Loan buyouts aren’t new but what’s different about the current situation is the sheer number of homeowners who’ve opted to delay their monthly payments because lawmakers have protected them from foreclosures. Many if not most of those borrowers are expected to start paying their mortgages again. That means that unlike in the 2008 financial crisis, lenders that buy delinquent loans might be able to easily resell them at premium prices as the mortgages become current.

Read More: Why Mortgage Market Bailout Left Everyone Confused

Ginnie in June introduced new rules meant to slow buyouts, essentially requiring that servicers hold loans on their balance sheets for at least seven months before being allowed to re-pool them into new Ginnie securities. Seth Appleton, who leads Ginnie, wrote that loan purchases “could undermine the integrity of the MBS program.”

Some investors say they are concerned that lenders could attempt to circumvent the new rules by modifying delinquent borrowers’ loans, such as by slightly reducing their interest rate, which would allow them to resell the loan more quickly.

Not Riskless

Still, Bank of America mortgage security strategist Michael Khankin said lenders that engage in extensive buyouts do face a potential downside.

“This is not a riskless transaction,” said Khankin, who noted borrowers might default while a lender holds the loan or government agencies could change the rules again for when mortgages can be re-securitized.

While banks have done most loan purchases so far, the profit opportunities could incentivize nonbank lenders to join in, said Krishna of Metacapital Management.

“If non-banks were to conduct large scale buyouts too, then Ginnie securities will begin to trade even worse,” said Krishna, noting that Ginnie prices have worsened compared with similar mortgage bonds since the buyouts started. For consumers that obtain a Ginnie-backed loan -- many of whom are first-time buyers or borrowers with lower incomes -- that would lead to higher mortgage rates.

Certain factors could suppress nonbank purchases. Nonbanks have fewer low-interest financing options than banks, which are awash in cash and other low-cost funding sources. Despite that, there are signs that nonbanks are at least exploring buying loans.

PennyMac’s Opportunity

Nonbank PennyMac Financial Services said on its earnings call earlier this month the firm might tap some of its liquidity sources to buy more Ginnie loans out of pools, describing the purchases as an “opportunity.”

PennyMac CEO David Spector said in a statement that there are high costs involved in managing government-guaranteed loans and responding to borrower hardships.

“The potential revenue opportunities as presented by Ginnie Mae’s early buyout guidelines are an important offset to appropriately reimburse these expenses for a large Ginnie Mae servicer like PennyMac,” he said.

©2020 Bloomberg L.P.