Considering investing in a bank stock? Before you do, take a moment to survey the industry in these seven charts. There are some critical trends playing out right now, and understanding them will be a big help in finding the perfect bank stock for your portfolio.

1. The number of banks continue to shrink
The banking industry has been consolidating for years now, and in the post-financial-crisis world, that trend has continued.

Chart

At the start of 1984, there were 17,886 banks in the U.S. At the start of the 2015 third quarter, there were only 6,348 left. The trend is changing the dynamics of the industry, and therefore, understanding how it's happening is critical to making a successful, long-term bank-stock investment.

Some of this consolidation has been driven by bank failures -- primarily, the Savings and Loan Crisis of the late '80s and early '90s, and followed by the financial crisis in the late 2000s. Some of the consolidation has also been driven by mergers and acquisitions; banks today are considerably larger than they were in prior generations.

2. The biggest banks are gobbling up a majority of industry assets
Between all the M&A and bank failures, the largest U.S. banks have ended up with a huge share of industry assets.

Chart

The 111 largest U.S. banks, those with at least $10 billion in total assets, control 81.4% of all the assets in the banking industry as of the second quarter.

The four U.S. megabanks -- JPMorgan Chase (NYSE:JPM), Bank of America (NYSE:BAC), Citigroup (NYSE:C) and Wells Fargo (NYSE:WFC) -- combine to control $8.15 trillion in assets. That's 52% of the entire industry.

However, during the past five years, these behemoths have had a more difficult time finding growth. JPMorgan saw its total assets increase just 14% from the second quarter of 2010 through Q2 of 2015. Citigroup and Bank of America both shrank during the same period, losing 7.75% and 8.15% of total assets, respectively. Wells Fargo has been the only mega bank to find meaningful growth, boosting assets by 41% during this five-year period.

This dynamic implies that the large, but not-quite-mega banks have been driving the increased concentration of industry assets, at least during the past five years.

3. Understanding the changing growth dynamic is one thing, but aren't we in this for profits?
Growing fast, and controlling heaps of capital, does not necessarily equate to strong returns, a fact we can see by looking at the breakdown of the industry's return on assets.

Chart

The largest banks are reporting decent returns on assets, but their performance is in no way outshining the numbers being reported by mid-sized competitors. The smallest banks, however, do clearly lag the rest of the industry.

During the past four quarters, banks with total assets between $1 billion and $10 billion have reported better returns on assets than their larger competitors. In the 10 quarters before that, these mid-sized banks matched or beat the large bank segment six times.

4. and 5. Why? A few reasons.
To dig deeper into the question of profits, a good place to look is the efficiency ratio. The efficiency ratio is calculated by dividing a bank's non-interest expenses into its net revenue. A lower ratio is considered more efficient, as it represents fewer expenses necessary to generate revenue.

As the chart below clearly shows, the largest banks have had a tough time with this metric during the past six years.

Chart

The first driver of higher efficiency ratios is higher costs. For banks, the most dramatic change in costs during this time period has been related to new regulations. The Dodd-Frank regulatory legislation began rolling out in 2011, followed quickly by the higher capital requirements of the Basel III accords in 2013. Those two major regulatory overhauls are still being gradually phased in today, and will continue until at least 2019.

Higher capital requirements are forcing banks out of high-yielding assets and high-margin businesses, while simultaneous implementation of new regulatory requirements in risk management, reporting, analysis, and stress testing are driving up expenses in personnel and infrastructure.

It doesn't help that many banks have faced significant litigation expenses and fines related to practices prior to the financial crisis. Bank of America shareholders, perhaps more than anyone else, can identify with this.

While much of this increased regulatory burden is focused on the largest banks, it's also driving the smallest banks to sell to larger rivals in search of scale. The little guys simply don't have the resources to comply with the regulations and still earn a decent shareholder return. The end result is a push to the middle ground -- banks that are large, but not that large.

Costs aren't the only problem though; the efficiency ratio also has a revenue component that needs to be addressed. Since the financial crisis, the Federal Reserve has followed a near-zero interest-rate policy in an attempt to stoke the fire of the U.S. economy. For banks, that policy has resulted in steadily shrinking net interest margins. Net interest margins are a relative measure of a bank's net interest income -- the difference it pays for its funding, and the yield it earns on its loan and fixed-income investments.

Chart

Most analysts expect the Fed to begin raising interest rates later this year, or early in 2016. Rising rates will, in most cases, boost net interest income, and net interest margins. While this should benefit banks across the industry, it's unclear if banks with more than $10 billion in assets will be able to fully make up the margins lost during the past six years.

6. Switching gears, loan quality is looking better than it has in years
Over the long term, growth and profits don't mean much if a bank's loan portfolio doesn't get repaid. As of the second quarter, loan quality looks to be in pretty good shape across the industry.

Chart

Over the course of a normal credit cycle, loan losses are the most volatile and the most damaging of all bank expenses. High operating costs, or bloated staffing, can limit profits, or even drive losses, but loan losses can cause the bank to outright fail.

Net charge offs, as of the 2015 second quarter, were at their lowest level since 2006. On the one hand that's a strong performance, but on the other it's also a bit unsettling to know that it's taken almost a decade to return to these pre-crisis levels. For an investment today, we should consider where we are in the credit cycle currently, but more importantly, where we might be in the next few years.

7. Are we sitting on another ticking time bomb?
One way to look forward into the future of the credit cycle is to assess how easy it is to get a loan. If an individual or business can obtain financing with little documentation, weak cash flow, or a dodgy credit history, that's a sign that banks may be booking loans destined to create losses. One way to gauge this is by following the Federal Reserve's Survey of Senior Banking Officers. Part of this quarterly report measures the net percentage of banks tightening (or easing) their lending standards.

Easier money when the times are good tends to lead to bigger problems when the economy contracts. With this in mind, we can compare the expansion period prior to the financial crisis with what we see today.

Chart

While standards are easing today -- a negative percentage in the chart represents easing, a positive percentage represents tightening standards -- banks are far from the levels of easy money witnessed prior to the financial crisis. This doesn't mean that there is, or isn't, a recession on the horizon -- that's impossible to predict with any certainty -- but it does indicate that a future contraction likely won't be as severe as the one experienced in 2008 and 2009.

This chart only shows the commercial and industrial segment of the loan market. The pattern is essentially the same across other loan categories -- mortgages, commercial real estate, auto lending, etc. Lending standards are loosening, but not overly so.

There are two other segments that warrant pointing out specifically. Banks in the construction and development loan market -- a harbinger of speculation -- are actually tightening standards as of the second quarter. Likewise, there has been a spike in demand for subprime mortgages in recent months, but banks thus far have maintained, or even tightened, standards in that risky niche. Both of these examples are positive indications that the banking sector, in general, is not yet making the same mistakes of the last credit cycle.

What should you take away from this exercise?
Based on these industry dynamics, where should you start your search for a bank stock investment? First, I think it's best to avoid the smallest banks. Regulatory costs and competition are driving these local players out of market share and into M&A deals with larger competitors. Their challenges are clearly seen in the efficiency ratio and return on assets charts.

Second, the largest banks -- those with more than $10 billion in total assets -- are in general underperforming their mid-sized competition in terms of fundamental performance. With the smallest and the largest banks eliminated, I'd focus on those banks in the middle.

The group of banks in the $1 billion to $10 billion range -- and probably some just north of the $10 billion mark -- are big enough to absorb new regulatory costs, but not so big as to fall under the most stringent and costly regulatory regimes. This group has strong returns, efficiency, and has the same upside as the rest of the industry when interest rates begin to rise.

To me, those are the banks with the best chance of outperformance during the next several years.

Jay Jenkins has no position in any stocks mentioned. The Motley Fool owns and recommends Wells Fargo. The Motley Fool recommends Bank of America. 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.