When it comes to dealing in mortgages, bankers must know when to hold them and went to unload them, and a growing number of banks are opting for the latter option.

More banks are opting to sell their 10- and 15-year mortgages rather than keeping them in their loan portfolio. Bankers, wary of exposure to assets with long terms and fixed rates, had already shown an aversion to 30-year mortgages. For most bankers, declining yields on mortgage loans are not worth the longer-term risk of rising interest rates.

"It's incredibly dangerous" to book longer-term fixed-rate mortgages, says Mark Fitzgibbon, an analyst at Sandler O'Neill & Partners. Doing so "wreaks havoc" on a bank's rate sensitivity and "it scares the daylights out of the regulators."

BB&T has been selling 10- and 15-year mortgages in the secondary market since the second quarter, and other banks have followed its lead. More community banks decided in the third quarter to start shedding such loans, which they have historically held on their balance sheets.

"We're not even adding any more 15-year mortgages," says Gerard Host, the president and chief executive at Trustmark in Jackson, Miss. The $10 billion-asset company is retaining 10-year fixed-rate and adjustable-rate mortgages. But Trustmark views the 15-year mortgage as "a longer term loan and, at a relatively low rate, it creates interest rate risk," he says.

The average yield on a 15-year mortgage has fallen 58 basis points this year, reaching 2.66% last week, according to Freddie Mac. Bankers usually need at least a 3% spread between deposit and loan rates to make money.

"We're trying to manage our spread income without taking too much interest rate risk," says Philip Wenger, incoming chairman, president and chief executive at Fulton Financial in Lancaster, Pa. In August the $16.3 billion-asset company began limiting the amount of 15-year mortgages it would originate and keep in its portfolio in any given month.

Still, many banks are underwriting more mortgages than they have in recent years, because people are refinancing to take advantage of low rates. Wenger says Fulton began holding 10- and 15-year mortgages last year.

"In a normal rate environment, a 10-year mortgage is very rare," Wenger says. "With rates as low as they are, a lot of people are refinancing ... and they're going from 15 years to 10."

Still, there are smaller banks that are being tempted to originate and hold more mortgages because they need to reduce exposure to commercial real estate and are struggling to book commercial and industrial loans.

Keeping long-term fixed-rate mortgages on the books could be a big mistake. "That is going to be a very slow-ticking time bomb," Dominic Ng, the chairman and chief executive of East West Bancorp in Pasadena, Calif., said during an Oct. 18 conference call.

Bankers are finding buyers for their loans because a strong secondary market exists for 15-year mortgages. "It's better and more profitable for us to sell our product into the secondary market," Host says.

Trustmark typically caps the size of its mortgage book at $1 billion. During the third quarter, though, Trustmark sold all of its newly underwritten mortgages — it originated more than $500 million in the quarter — allowing its existing portfolio to contract to about $850 million.

The Federal Reserve Board's latest round of quantitative easing played a role by pushing interest rates down during the quarter, Host says. The Fed has indicated that it will keep rates artificially low through 2015, but holding a mortgage for 10 years is starting to look too risky. The Mortgage Bankers Association forecast last week that mortgage rates should edge up next year.

Borrowers with a 10-year mortgage usually pay it off in six to eight years. But Fitzgibbon says current borrowers will likely hold onto their loans longer if they see rates jump. That means banks that booked 10-year mortgages at record-low rates would start to get squeezed.

If interest rates rise, banks with longer-term loans will have "some challenges" as borrowers refuse to refinance, Ng said.

It also remains a challenge to model interest rate risk. "We've been waiting for the rates to go up and they never did," Ng said. "So continually, we are wrong."