Strong mortgage banking results helped Wells Fargo (WFC) beat fourth-quarter analyst estimates even as the mega bank experienced another quarter of net interest margin decline.

Given Wells Fargo's strong progression in mortgage banking as well as encouraging revenue trends and steady expense base, FBR Capital Markets (FBR) reiterated its 'outperform' rating of the company, which is set to remain one of the best positioned big banking firms to weather the current economic environment.

"Its strong balance sheet and mortgage banking platform should offset the effects of low rates, falling margins, and continued de-leveraging," analysts at FBR said.

Click on the graph to view non-interest income.

Wells Fargo securities available for sale rose by $5.8 billion on new investment activity. More agency mortgage-backed securitization purchases occurred in 4Q12 as rates rose and yields became more attractive, according to Wells Fargo's quarterly earnings report.

The company also posted strong mortgage originations and a rising gain-on-sale margin, leading to increased revenue from the third to fourth quarter. Mortgage banking revenue represented 29% of operating fee revenue in 4Q12.

Click on the chart to view diversified fee generation.

While some argue mortgage banking will not be a sustainable source of earnings for Wells Fargo, diminished capacity in the origination market, as well as strong refinancing volumes, bode well for the resilience of mortgage banking in 2013, analysts noted. Refinancing volumes benefited from low rates and the government's enhanced Home Affordable Refinancing Program (HARP 2.0).

For 4Q12, originations fell by $14 billion due to lower correspondent volumes, while retails volumes remained intact. Wells Fargo noted it purposefully shifted focus to its higher-margin retail business, boosting the gain-on-sale margin.

"Given our belief that mortgage banking will remain strong, we contend that it will continue to support Well Fargo's earnings for some time," FBR Capital analysts said.

Wells Fargo posted headline earnings per share of $0.91 in the fourth quarter, which was ahead of expectations of $0.87 a share. The company continued to manage capital in the quarter, repurchasing 42 million shares for $1.3 billion and announcing an advance share repurchase of 6 million.

Thus, investors seeking quality names at opportunistic prices will benefit from Wells Fargo as the company represents an attractive buying opportunity, FBR stated.

"Wells Fargo’s largely domestic footprint and its stable deposit base shelter it from wider market turmoil, we believe making it an attractive defensive holding in a volatile market," the report said.

The banking company also experienced another quarter of solid balance sheet growth, with total loans increasing $16.9 billion, or 2%. This included a $9.7 billion growth in mortgages as the refinancing boom continued to support an increase in earnings.

Loan runoff was isolated to Wells Fargo’s non-strategic and liquidating portfolios. Deposits also rose significantly in 4Q12, up 5.3% quarter-over-quarter, to $1 trillion.

The net interest margin for Wells Fargo fell 10 basis points in 4Q12 after declining 25 basis points the previous quarter. This change is due to higher deposits, driving larger cash and short-term investment balances as well as continued balance sheet repricing.

The company noted it has identified attractive investment opportunities and is expected to use deposit growth to fund loans.

Nonetheless, FBR noted margins are expected to remain under pressure. 

"We estimate net interest margin will fall to 3.40% by 4Q13, representing 16 basis points of decline in the next year," the FBR Capital report said.