On second quarter conference calls this year, almost every national and regional bank was forced to talk about the energy markets. For good reason, analysts want to better understand how banks are exposed to the industry and how each one is handling the bust in oil prices and the dramatic slow down in shale drilling, exploration, and investment.

Regional bank Comerica (NYSE:CMA) was no different. Comerica has significant exposure to the oil and gas industry thanks to its large presence in the Texas market, a fact that's driving its stock price sharply lower over the past year. I think this decline is an overreaction, however, and savvy contrarian investors willing to dig into the details will find this to be a great buying opportunity.

A little more detail on why the stock is getting hammered
As of the second quarter, Comerica had about $70 billion in total assets, making it a large but not huge regional player. It has a presence in Texas, Michigan, and California.

The bank returned 7.2% on equity for the quarter driven by a higher than usual efficiency ratio of 64%, meaning it cost the bank 64 cents in operating expenses to generate every $1 of net revenue. 

The big pain point for investors was a substantial jump in the bank's quarterly provision for loan losses. Every quarter, banks put aside a little cash to cover any future losses projected in the loan portfolio. The process is a little bit science and a little bit art, but generally speaking it represents management's best guess of future loan losses.

Comerica's second quarter provision leapt from $14 million in the first quarter to $47 million in Q2.

Comerica Chart Ni And Prov

That's clearly a huge change, with a significant impact on the bank's quarterly profits.

Is this a sign of impending doom, or is there something else going on? We have to dig a little deeper to find out.

You can't just read the headline. You've got to dig in.
Let's start our deep dive by first looking at the bank's core earnings, which I'll define here as net income before the provision.

We can easily add the quarterly provision back to quarterly net income to get a picture of how the underlying profit engine is tuned.

($in millions)

Q2 '15

Q1 '15

Q2 '14

Net Income

 $135

 $134

 $151

Provision for credit losses

 $47

 $14

 $11

Net Income + Provision

 $182

 $148

 $162

Excluding the provision for the quarter, earnings look pretty great. Net income as adjusted here shows a 12% improvement year over year and a 23% jump quarter over quarter.

Of course, if the loans exposed to the oil and gas industry are about to implode, then this point is moot. A portfolio of failing loans will quickly overwhelm even the strongest of profits. That is, unless the bank already has sufficient reserves in place to offset those losses.

As of the second quarter, Comerica reported that 0.5% of its assets were considered non-performing -- that is, they were either severely past due or in foreclosure. That number is below the industry average, but it's an increase for Comerica over the past few quarters. The rise has been driven by rising delinquencies in the oil and gas portfolio (not surprising, right?).

There were $119 million of oil and gas related loans in non-accrual status at quarter end. Non accrual status is an accounting term that means, more or less, "in serious trouble."

Sticking with the accounting perspective, there are two different buckets of reserves for loan losses, the general reserve and the specific reserve. The general reserve is determined using qualitative methods like economic forecasts, prior performance, and management instincts. The specific reserves are calculated with an analysis of the individual loans that takes into consideration any collateral, the borrower's financial strength, and other empirical factors.

With the piles of troubled oil and gas loans increasing as they are, you'd expect the bank's higher provision for loan losses would be driven by an increase in the specific reserve. That would show that there is a very real loss potential, calculated from an analysis of actual loans with poor cash flow and weak collateral.

But it turns out that isn't the case.

The rise in the provision for loan and lease losses is actually being driven almost exclusively by a rise in the general reserve. That means management thinks things are going to get worse in the future, but as of now the actual loans look fairly safe. In this case, "safe" doesn't mean they're good loans -- it just means that they could have strong collateral or other credit enhancements to protect the bank from losses. And in fact, 95% of the bank's oil and gas exposure have marketable collateral.

That's a good sign for investors. It suggests that management is all over the problem and that they're taking steps to protect the bank from potential losses. It's prudent. It's proactive.

What the market saw as a sign of impending doom in the oil and gas sector I see as management getting ahead of the curve. Sure, earnings may be depressed in the short term, but remember that adjusted net income chart above? As soon as the cyclical oil prices reverse, all that earning power will be unleashed.

Unleashing the beast
Comerica has been in the business of oil and gas loans for over 30 years. This isn't the first time the bank has seen falling prices.

Going back to the last time oil prices fell rapidly in 2009, Comerica charged off 7.7 times more energy sector loans than it did in the 2015 second quarter. A charge off is when the bank writes off a loan as a bust and accepts the loss on the income statement.

The bank charged off about $2 million of these loans in Q2, meaning that at peak 2009 levels, we could expect to see something like $15.3 million in charge offs in a comparable situation.

Don't forget that management put aside $47 million in the second quarter, over three times that $15.3 million estimation. Assuming the $15.3 million charge-off rate more or less works out, then the second quarter provision added about 9 months worth of reserves. That's a lot.

Another way to look at it is on a quarter-by-quarter basis. If the bank does end up charging off $15 million or so of oil and gas loans per quarter, that means its provision must equal that to replenish the reserves each quarter. A dollar out must be replaced by another dollar in or the reserve could fall dangerously low.

If we use that provision estimation with our adjusted net income of $182 million from above, we could reasonably expect the bank to earn $167 million per quarter. That's 23.5% higher than the actual net income reported for the second quarter.

Using historical price to earnings ratios, the upside in a variety of valuation scenarios is clear.

Projected P/E Ratio

13.5x

14.5x

15.5x

Projected Stock Price

$49.46

$53.12

$56.79

% Above Current Stock Price

20.6%

29.6%

38.5%

Current stock price as of 8/25/2015

Proper preparation prevents poor performance
The situation in the oil and gas market in Texas could certainly end up much worse than it is today. The bank's reserves could prove grossly inadequate. Gas prices could stay lower for longer than anyone is predicting. There's just no way to know the future.

However, based on the facts we have and a few seemingly reasonable assumptions, management at Comerica appear to be making prudent and appropriate decisions as they prepare the bank to weather the storm. Those decisions may temporarily weaken earnings, a fact that I think the market has overblown. When gas prices turn around, which historically they always have, Comerica should be very well positioned to unleash its core profit engine.

Jay Jenkins has no position in any stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.