Wells Fargo's (WFC -1.11%) second-quarter earnings report is a good reason to give the stagecoach a once-over with a SWOT -- Strengths, Weaknesses, Opportunities, and Threats -- analysis. The headline numbers were solid, record net income and results that beat analyst expectations on earnings and revenue. The market liked the story and tacked nearly 2% to the stock price. Let's dig a little deeper and see what drove the numbers.

Strengths:

  • This quarter's net income brings the string of consecutive increases to 14.
  • The Tier 1 Common Equity Ratio -- a key risk measure -- is up from last quarter and from last year's second quarter.
  • Net loan charge-offs declined from last quarter and the year-ago quarter.
  • Mortgage originations and applications were up from the first quarter despite the increase in mortgage rates. More on that later.

Weaknesses:

  • Net interest margin has dropped for four consecutive quarters. The driving factor is an increase in deposits. Net interest income was up slightly from last quarter, but down compared to the year-ago quarter.
  • The home mortgage pipeline was down from last quarter. The pipeline, originations, and applications were down from the year-ago quarter.

Opportunities:

  • At some point, the Federal Reserve will raise short-term rates and scale back on QE. If loan rates climb faster than deposit rates, the net interest margin will expand.
  • An improving economy, even slowly improving, offers opportunities to make more auto, business, home improvement, and other loans. It also means loan losses should continue to decrease.
  • Recent rate increases will increase the spread between cost of deposits -- which is still dirt-cheap -- and new loans.

Threats:

  • It's hard to classify a minuscule 0.14% average deposit cost as a threat, but a bump in short-term Fed rates would raise those costs. Of course, if loan rates increased enough to maintain or increase Wells' spread, higher rates would be a positive.
  • Wells Fargo has a significant exposure to the mortgage market. The home purchase mortgage business did well last quarter, but refinancing was down.

The mortgage business:
The recent run-up in mortgage rates had me concerned that we would see Wells Fargo's mortgage business take a hit. I was pleasantly surprised to see an uptick from the first quarter, but the decreased pipeline is not a good sign for future growth in mortgages. We did see a big change in the mortgage split between purchases and refinance. Over the past four quarters, refinancing has been 62%-69% of mortgage origination. For the second quarter, that dropped to 56%, and the dollar value of refinancing is in a clear down trend. There was a significant bump up in purchase volume and that will offset the drop in refinancing if home sales can continue to improve with higher mortgage rates. That's a big if. The chart below shows the dollar value of mortgage originations over the past five quarters broken down by refinance and purchase.

Source: Wells Fargo 2Q 2013 Quarterly Supplement and author's calculation.

During the conference call, the CEO and CFO emphasized that Wells has a diversified business and many parts of the bank will benefit from higher rates. That shows up in the numbers with credit cards, auto loans, and commercial loans all up compared to the first quarter and year-over-year. The key items to watch over the next few quarters are whether purchase mortgages and other lines of business can offset an expected slowdown in mortgage refinancing.

I think Wells Fargo's diversified business will be able to pick up the slack from one segment running into interest rate headwinds. Significant strengths and opportunities compared with manageable weaknesses and threats are key reasons behind my outperform CAPScall on Wells Fargo, and why the bank is a core holding in my portfolio.